/**
 * This function calculates the load distribution for each building in a complex.
 *
 * @param buildings A dictionary containing the buildings and their attributes
 *                  with the building ID as the key and the area as the value.
 * @param loadData A dictionary containing the load data for each building,
 *                 with the building ID as the key and the load value as the value.
 * @return A dictionary containing the building ID as the key and the load distribution
 *         as the value. The load distribution is calculated as the load value divided
 *         by the area of the building.
 */
fun calculateLoadDistribution(buildings: Map<String, Double>, loadData: Map<String, Double>): Map<String, Double> {

    val loadDistribution = mutableMapOf<String, Double>()

    // Iterate through each building in the complex
    for ((buildingId, area) in buildings) {
        // Check if the building ID exists in the load data
        if (buildingId in loadData) {
            // Calculate the load distribution
            loadDistribution[buildingId] = loadData[buildingId]!! / area
        }
    }

    return loadDistribution
}
/**
 * This function calculates the load distribution for each building in a complex.
 *
 * @param buildings A dictionary containing the buildings and their attributes
 *                  with the building ID as the key and the area as the value.
 * @param loadData A dictionary containing the load data for each building,
 *                 with the building ID as the key and the load value as the value.
 * @return A dictionary containing the building ID as the key and the load distribution
 *         as the value. The load distribution is calculated as the load value divided
 *         by the area of the building.
 */
fun calculateLoadDistribution(buildings: Map<String, Double>, loadData: Map<String, Double>): Map<String, Double> {
/**
 * This function calculates the load distribution for each building in a complex.
 *
 * @param buildings A dictionary containing the buildings and their attributes
 *                  with the building ID as the key and the area as the value.
 * @param loadData A dictionary containing the load data for each building,
 *                 with the building ID as the key and the load value as the value.
 * @return A dictionary containing the building ID as the key and the load distribution
 *         as the value. The load distribution is calculated as the load value divided
 *         by the area of the building.
 */
fun calculateLoadDistribution(buildings: Map<String, Double>, loadData: Map<String, Double>): Map<String, Double> {

    val loadDistribution = mutableMapOf<String, Double>()

    // Iterate through each building in the complex
    for ((buildingId, area) in buildings) {
        // Check if the building ID exists in the load data
        if (buildingId in loadData) {
            // Calculate the load distribution
            loadDistribution[buildingId] = loadData[buildingId]!! / area
        }
    }

    return loadDistribution
}