当前位置: 首页>>代码示例>>C++>>正文


C++ HVACComponent::iddObject方法代码示例

本文整理汇总了C++中HVACComponent::iddObject方法的典型用法代码示例。如果您正苦于以下问题:C++ HVACComponent::iddObject方法的具体用法?C++ HVACComponent::iddObject怎么用?C++ HVACComponent::iddObject使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在HVACComponent的用法示例。


在下文中一共展示了HVACComponent::iddObject方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: operationSchemeComponent

// Some plant components air in a containingHVACComponent() and it is that
// container which needs to go on the plant operation scheme. Here is a filter to 
// figure that out. 
HVACComponent operationSchemeComponent(const HVACComponent & component) {
    boost::optional<HVACComponent> result;

    switch(component.iddObject().type().value())
    {
      case openstudio::IddObjectType::OS_WaterHeater_Mixed :
      {
        auto waterHeater = component.cast<WaterHeaterMixed>();
        if( auto hpwh = waterHeater.containingZoneHVACComponent() ) {
          result = hpwh;
        }
        break;
      }
      case openstudio::IddObjectType::OS_WaterHeater_Stratified :
      {
        auto waterHeater = component.cast<WaterHeaterStratified>();
        if( auto hpwh = waterHeater.containingZoneHVACComponent() ) {
          result = hpwh;
        }
        break;
      }
      default:
      {
        break;
      }
    }

  if( result ) {
    return result.get();
  }

  return component;
}
开发者ID:jtanaa,项目名称:OpenStudio,代码行数:36,代码来源:ForwardTranslatePlantEquipmentOperationSchemes.cpp

示例2: componentType

ComponentType componentType(const HVACComponent & component)
{
  switch(component.iddObject().type().value())
  {
    case openstudio::IddObjectType::OS_Boiler_HotWater :
    {
      return ComponentType::HEATING;
    }
    case openstudio::IddObjectType::OS_WaterHeater_Mixed :
    {
      return ComponentType::HEATING;
    }
    case openstudio::IddObjectType::OS_WaterHeater_Stratified :
    {
      return ComponentType::HEATING;
    }
    case openstudio::IddObjectType::OS_DistrictHeating :
    {
      return ComponentType::HEATING;
    }      
    case openstudio::IddObjectType::OS_Chiller_Electric_EIR :
    {
      return ComponentType::COOLING;
    }
    case openstudio::IddObjectType::OS_Chiller_Absorption_Indirect :
    {
      return ComponentType::COOLING;
    }
    case openstudio::IddObjectType::OS_Chiller_Absorption :
    {
      return ComponentType::COOLING;
    }
    case openstudio::IddObjectType::OS_ThermalStorage_Ice_Detailed :
    {
      return ComponentType::BOTH;
    }
    case openstudio::IddObjectType::OS_DistrictCooling :
    {
      return ComponentType::COOLING;
    }      
    case openstudio::IddObjectType::OS_CoolingTower_SingleSpeed :
    {
      return ComponentType::COOLING;
    }
    case openstudio::IddObjectType::OS_CoolingTower_VariableSpeed :
    {
      return ComponentType::COOLING;
    }
    case openstudio::IddObjectType::OS_CoolingTower_TwoSpeed:
    {
      return ComponentType::COOLING;
    }
    case openstudio::IddObjectType::OS_EvaporativeFluidCooler_SingleSpeed:
    {
      return ComponentType::COOLING;
    }
    case openstudio::IddObjectType::OS_FluidCooler_SingleSpeed:
    {
      return ComponentType::COOLING;
    }
    case openstudio::IddObjectType::OS_FluidCooler_TwoSpeed:
    {
      return ComponentType::COOLING;
    }
    case openstudio::IddObjectType::OS_GroundHeatExchanger_Vertical :
    {
      return ComponentType::BOTH;
    }
    case openstudio::IddObjectType::OS_GroundHeatExchanger_HorizontalTrench :
    {
      return ComponentType::BOTH;
    }
    case openstudio::IddObjectType::OS_HeatExchanger_FluidToFluid :
    {
      return ComponentType::BOTH;
    }
    case openstudio::IddObjectType::OS_SolarCollector_FlatPlate_PhotovoltaicThermal :
    {
      return ComponentType::HEATING;
    }
    case openstudio::IddObjectType::OS_SolarCollector_FlatPlate_Water :
    {
      return ComponentType::HEATING;
    }
    case openstudio::IddObjectType::OS_SolarCollector_IntegralCollectorStorage :
    {
      return ComponentType::HEATING;
    }
    case openstudio::IddObjectType::OS_PlantComponent_TemperatureSource :
    {
      return ComponentType::BOTH;
    }
    case openstudio::IddObjectType::OS_HeatPump_WaterToWater_EquationFit_Heating :
    {
      return ComponentType::HEATING;
    }
    case openstudio::IddObjectType::OS_HeatPump_WaterToWater_EquationFit_Cooling :
    {
      return ComponentType::COOLING;
    }
//.........这里部分代码省略.........
开发者ID:jtanaa,项目名称:OpenStudio,代码行数:101,代码来源:ForwardTranslatePlantEquipmentOperationSchemes.cpp

示例3: flowrate

boost::optional<double> flowrate(const HVACComponent & component)
{
  boost::optional<double> result;
  switch(component.iddObject().type().value()) {
    case openstudio::IddObjectType::OS_Boiler_HotWater :
    {
      auto boiler = component.cast<BoilerHotWater>();
      result = boiler.designWaterFlowRate();
      break;
    }
    case openstudio::IddObjectType::OS_WaterHeater_Mixed :
    {
      auto waterHeater = component.cast<WaterHeaterMixed>();
      result = waterHeater.useSideDesignFlowRate();
      break;
    }
    case openstudio::IddObjectType::OS_WaterHeater_Stratified :
    {
      auto waterHeater = component.cast<WaterHeaterStratified>();
      result = waterHeater.useSideDesignFlowRate();
      break;
    }
    case openstudio::IddObjectType::OS_DistrictHeating :
    {
      break;
    }      
    case openstudio::IddObjectType::OS_Chiller_Electric_EIR :
    {
      auto chiller = component.cast<ChillerElectricEIR>();
      result = chiller.referenceChilledWaterFlowRate();
      break;
    }
    case openstudio::IddObjectType::OS_Chiller_Absorption_Indirect :
    {
      auto chiller = component.cast<ChillerAbsorptionIndirect>();
      result = chiller.designChilledWaterFlowRate();
      break;
    }
    case openstudio::IddObjectType::OS_Chiller_Absorption :
    {
      auto chiller = component.cast<ChillerAbsorption>();
      result = chiller.designChilledWaterFlowRate();
      break;
    }
    case openstudio::IddObjectType::OS_ThermalStorage_Ice_Detailed :
    {
      break;
    }
    case openstudio::IddObjectType::OS_DistrictCooling :
    {
      break;
    }      
    case openstudio::IddObjectType::OS_CoolingTower_SingleSpeed :
    {
      auto tower = component.cast<CoolingTowerSingleSpeed>();
      result = tower.designWaterFlowRate();
      break;
    }
    case openstudio::IddObjectType::OS_CoolingTower_VariableSpeed :
    {
      auto tower = component.cast<CoolingTowerVariableSpeed>();
      result = tower.designWaterFlowRate();
      break;
    }
    case openstudio::IddObjectType::OS_CoolingTower_TwoSpeed:
    {
      auto tower = component.cast<CoolingTowerTwoSpeed>();
      result = tower.designWaterFlowRate();
      break;
    }
    case openstudio::IddObjectType::OS_EvaporativeFluidCooler_SingleSpeed:
    {
      auto mo = component.cast<EvaporativeFluidCoolerSingleSpeed>();
      result = mo.designWaterFlowRate();
      break;
    }
    case openstudio::IddObjectType::OS_FluidCooler_SingleSpeed:
    {
      auto mo = component.cast<FluidCoolerSingleSpeed>();
      result = mo.designWaterFlowRate();
      break;
    }
    case openstudio::IddObjectType::OS_FluidCooler_TwoSpeed:
    {
      auto mo = component.cast<FluidCoolerTwoSpeed>();
      result = mo.designWaterFlowRate();
      break;
    }
    case openstudio::IddObjectType::OS_GroundHeatExchanger_Vertical :
    {
      auto hx = component.cast<GroundHeatExchangerVertical>();
      result = hx.maximumFlowRate();
      break;
    }
    case openstudio::IddObjectType::OS_GroundHeatExchanger_HorizontalTrench :
    {
      auto hx = component.cast<GroundHeatExchangerHorizontalTrench>();
      result = hx.designFlowRate();
      break;
    }
//.........这里部分代码省略.........
开发者ID:jtanaa,项目名称:OpenStudio,代码行数:101,代码来源:ForwardTranslatePlantEquipmentOperationSchemes.cpp


注:本文中的HVACComponent::iddObject方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。