CoilSystemCoolingWaterHeatExchangerAssisted::CoilSystemCoolingWaterHeatExchangerAssisted(const Model& model)
  : StraightComponent(CoilSystemCoolingWaterHeatExchangerAssisted::iddObjectType(),model)
{
  OS_ASSERT(getImpl<detail::CoilSystemCoolingWaterHeatExchangerAssisted_Impl>());

  CoilCoolingWater coolingCoil(model);
  setCoolingCoil(coolingCoil);

  HeatExchangerAirToAirSensibleAndLatent heatExchanger(model);
  heatExchanger.setSupplyAirOutletTemperatureControl(false);
  setHeatExchanger(heatExchanger);
}
  ModelObject ZoneHVACEnergyRecoveryVentilator_Impl::clone(Model model) const
  {
    auto cloneObject = ZoneHVACComponent_Impl::clone(model).cast<ZoneHVACEnergyRecoveryVentilator>();

    auto const supplyFanClone = supplyAirFan().clone(model).cast<HVACComponent>();
    cloneObject.setSupplyAirFan(supplyFanClone);

    auto const exhaustFanClone = exhaustAirFan().clone(model).cast<HVACComponent>();
    cloneObject.setExhaustAirFan(exhaustFanClone);

    auto const heatExchangerClone = heatExchanger().clone(model).cast<HVACComponent>();
    cloneObject.setHeatExchanger(heatExchangerClone);

    if (auto const controllerObj = controller()) {
      auto const controllerClone = controllerObj->clone(model).cast<ZoneHVACEnergyRecoveryVentilatorController>();
      cloneObject.setController(controllerClone);
    }

    return cloneObject;
  }