void MechanicalCoolingControl::output_func(IO_Bag& yb) { PortValue<BuildingEvent*> pv; pv.port = onOffCmd; pv.value = new OnOffEvent(COOLING_UNIT,4,1); yb.insert(pv); }
void MechanicalCoolingControl::delta_ext(double e, const IO_Bag& xb) { IO_Bag::const_iterator iter = xb.begin(); for (; iter != xb.end(); iter++) { assert((*iter).port == tempData); TemperatureEvent* temp = dynamic_cast<TemperatureEvent*>((*iter).value); if (temp->getItem() == THERMOSTAT_THERMOMETER && temp->getUnit() == 4) { if (off && temp->getTempC() > setPoint) change_mode = true; else if (!off && temp->getTempC() < setPoint-deadBand) change_mode = true; } } }
void delta_ext(double,const IO_Bag& xb) { active = true; u = xRef-(*(xb.begin())); }
void output_func(const double* q, const bool*, IO_Bag& y) { y.insert(q[1]); }
void external_event(double*,double,const IO_Bag& xb) { u = *(xb.begin()); }
void output_func(IO_Bag& yb) { yb.insert(u); }
void MechanicalCoolingControl::gc_output(IO_Bag& yb) { IO_Bag::iterator iter = yb.begin(); for (; iter != yb.end(); iter++) delete (*iter).value; }