FMU/Source/Building.cpp
/**
 * @brief collects the occupants heatgains and sets for the zone
 * @details collects the heatgains of each occupant, calculates an average for per occupant
 * and sets the desired negotiated state to the zone
 * @param zone A pointer to a buldings zone
 */
@brief collects the occupants heatgains and sets for the zone
@details collects the heatgains of each occupant, calculates an average for per occupant
and sets the desired negotiated state to the zone
@param zone A pointer to a buldings zone
@brief collects the occupants heatgains and sets for the zone @details collects the heatgains of each occupant calculates an average for per occupant and sets the desired negotiated state to the zone @param zone A pointer to a buldings zone
void Building::setAppGainsForZone(std::shared_ptr<Building_Zone> zone) {
    double totalRadientGainsAppliance = 0;
    double aveRadientGains = 0;
    double numberOfOccupantsAppliance = 0;
    for (Occupant &agent : population) {
        numberOfOccupantsAppliance++;
        if  (agent.isActionAppliance(*zone)) {
            totalRadientGainsAppliance += agent.getDesiredAppliance(*zone);
        }
    }
    if (totalRadientGainsAppliance > 0) {
        aveRadientGains = totalRadientGainsAppliance /
                                    numberOfOccupantsAppliance;
    }
    zone->setAppFraction(aveRadientGains);
}
void Building :: setAppGainsForZone ( std :: shared_ptr < Building_Zone > zone ) { double totalRadientGainsAppliance = 0 ; double aveRadientGains = 0 ; double numberOfOccupantsAppliance = 0 ; for ( Occupant & agent : population ) { numberOfOccupantsAppliance ++ ; if ( agent . isActionAppliance ( * zone ) ) { totalRadientGainsAppliance += agent . getDesiredAppliance ( * zone ) ; } } if ( totalRadientGainsAppliance > 0 ) { aveRadientGains = totalRadientGainsAppliance / numberOfOccupantsAppliance ; } zone -> setAppFraction ( aveRadientGains ) ; }
@brief collects the occupants heatgains and sets for the zone
 @details collects the heatgains of each occupant, calculates an average for per occupant
 and sets the desired negotiated state to the zone
 @param zone A pointer to a buldings zone
@brief collects the occupants heatgains and sets for the zone @details collects the heatgains of each occupant calculates an average for per occupant and sets the desired negotiated state to the zone @param zone A pointer to a buldings zone