FMU/Source/Building.cpp
/**
 * @brief collects the heating setpoint states and sets the negotiated outcome
 * @details collects the heating setpoint states of each occupant, calls the negotiate function
 * and set the desired negotiated state to the zone
 * @param zone A pointer to a buldings zone
 */
@brief collects the heating setpoint states and sets the negotiated outcome
@details collects the heating setpoint states of each occupant, calls the negotiate function
and set the desired negotiated state to the zone
@param zone A pointer to a buldings zone
@brief collects the heating setpoint states and sets the negotiated outcome @details collects the heating setpoint states of each occupant calls the negotiate function and set the desired negotiated state to the zone @param zone A pointer to a buldings zone
void Building::setOccupantHeatDecisionsForZone(
      std::shared_ptr<Building_Zone> zone) {
  double state = zone->getHeatingState();
  std::vector<double> desires;
  std::vector<double> powers;
  for (const Occupant &agent : population) {
    double desire = agent.getDesiredHeatState(*zone);
    double power = agent.getPower();
    desires.push_back(desire);
    powers.push_back(power);
  }
  state = decisionDoubleVec(desires, powers, state);
  zone->setHeatingState(state);
}
void Building :: setOccupantHeatDecisionsForZone ( std :: shared_ptr < Building_Zone > zone ) { double state = zone -> getHeatingState ( ) ; std :: vector < double > desires ; std :: vector < double > powers ; for ( const Occupant & agent : population ) { double desire = agent . getDesiredHeatState ( * zone ) ; double power = agent . getPower ( ) ; desires . push_back ( desire ) ; powers . push_back ( power ) ; } state = decisionDoubleVec ( desires , powers , state ) ; zone -> setHeatingState ( state ) ; }
@brief collects the heating setpoint states and sets the negotiated outcome
 @details collects the heating setpoint states of each occupant, calls the negotiate function
 and set the desired negotiated state to the zone
 @param zone A pointer to a buldings zone
@brief collects the heating setpoint states and sets the negotiated outcome @details collects the heating setpoint states of each occupant calls the negotiate function and set the desired negotiated state to the zone @param zone A pointer to a buldings zone