ZoneHVACUnitHeater::ZoneHVACUnitHeater(const Model& model,
                     Schedule & availabilitySchedule,
                                       HVACComponent & supplyAirFan,
                     HVACComponent & heatingCoil)
  : ZoneHVACComponent(ZoneHVACUnitHeater::iddObjectType(),model)
{
  OS_ASSERT(getImpl<detail::ZoneHVACUnitHeater_Impl>());

  bool ok = setAvailabilitySchedule(availabilitySchedule);
     
  if (!ok) 
  {
    remove();
    LOG_AND_THROW("Unable to set " << briefDescription() << "'s availability schedule to "
                << availabilitySchedule.briefDescription() << ".");
  }

  ok = setSupplyAirFan(supplyAirFan);
  OS_ASSERT(ok);

  ok = setHeatingCoil(heatingCoil);
  OS_ASSERT(ok);

  autosizeMaximumSupplyAirFlowRate();

  setFanControlType("OnOff");

  setMinimumHotWaterFlowRate(0.0);

  setHeatingConvergenceTolerance(0.001);

  setString(OS_ZoneHVAC_UnitHeaterFields::AvailabilityManagerListName,"");
}
 bool ZoneHVACUnitHeater_Impl::setHeatingCoilAsModelObject(const boost::optional<ModelObject>& modelObject) 
 {
   if (modelObject) 
 {
     OptionalHVACComponent intermediate = modelObject->optionalCast<HVACComponent>();
     if (intermediate) 
   {
       setHeatingCoil(*intermediate);
       return true;
     }
   }
   return false;
 }
ZoneHVACLowTempRadiantVarFlow::ZoneHVACLowTempRadiantVarFlow(const Model& model,
                                                             Schedule& availabilitySchedule,
                                                             HVACComponent& heatingCoil,
                                                             HVACComponent& coolingCoil)
                                                             
  : ZoneHVACComponent(ZoneHVACLowTempRadiantVarFlow::iddObjectType(),model)
{
  OS_ASSERT(getImpl<detail::ZoneHVACLowTempRadiantVarFlow_Impl>());

  bool ok = setAvailabilitySchedule(availabilitySchedule);
  
  if (!ok) 
  {
    remove();
    LOG_AND_THROW("Unable to set " << briefDescription() << "'s availability schedule to "
                  << availabilitySchedule.briefDescription() << ".");
  }
  
  ok = setHeatingCoil(heatingCoil);
  OS_ASSERT(ok);

  ok = setCoolingCoil(coolingCoil);
  OS_ASSERT(ok);
}