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


C++ model::ThermalZone类代码示例

本文整理汇总了C++中model::ThermalZone的典型用法代码示例。如果您正苦于以下问题:C++ ThermalZone类的具体用法?C++ ThermalZone怎么用?C++ ThermalZone使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


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

示例1: if

void InspectorController::moveBranchForZoneReturn(model::ThermalZone & zone, const Handle & newPlenumHandle)
{
  model::Model model = zone.model();

  if(boost::optional<model::AirLoopHVACReturnPlenum> returnPlenum = model.getModelObject<model::AirLoopHVACReturnPlenum>(newPlenumHandle))
  {
    if( boost::optional<model::ThermalZone> plenumZone = returnPlenum->thermalZone() )
    {
      zone.setReturnPlenum(plenumZone.get());
    }
  }
  else if(boost::optional<model::ThermalZone> plenumZone = model.getModelObject<model::ThermalZone>(newPlenumHandle))
  {
    zone.setReturnPlenum(plenumZone.get());
  }
  else
  {
    zone.removeReturnPlenum();
  }

  // This updates the plenum chooser combo box
  // Need to process events first because HVAC scene needs to redraw to supply colors to combo box
  QApplication::instance()->processEvents();
  OS_ASSERT(m_inspectorView);
  m_inspectorView->update();
}
开发者ID:ChengXinDL,项目名称:OpenStudio,代码行数:26,代码来源:InspectorController.cpp

示例2: linkInteriorSubSurface

bool SurfaceNetworkBuilder::linkInteriorSubSurface(model::ThermalZone zone, model::Space space, model::Surface surface, model::SubSurface subSurface,
  model::SubSurface adjacentSubSurface, model::Surface adjacentSurface, model::Space adjacentSpace, model::ThermalZone adjacentZone)
{
  LOG(Info, "Subsurfaces '" << subSurface.name().get() << "' and '" << adjacentSubSurface.name().get() << "' connect zone '"
    << zone.name().get() << "' to zone '" << adjacentZone.name().get() << "'");
  return true;
}
开发者ID:NREL,项目名称:OpenStudio,代码行数:7,代码来源:SurfaceNetworkBuilder.cpp

示例3: removeBranchForZone

void InspectorController::removeBranchForZone(model::ThermalZone & zone)
{
  model::OptionalAirLoopHVAC airLoop = zone.airLoopHVAC();

  if( airLoop )
  {
    airLoop->removeBranchForZone(zone);
  }
}
开发者ID:ChengXinDL,项目名称:OpenStudio,代码行数:9,代码来源:InspectorController.cpp

示例4: setHeatingSchedule

void ThermalZonesController::setHeatingSchedule(model::ThermalZone & thermalZone, model::OptionalSchedule & schedule)
{
  model::OptionalThermostatSetpointDualSetpoint thermostat = thermalZone.thermostatSetpointDualSetpoint();

  if( thermostat )
  {
    if( schedule )
    {
      thermostat->setHeatingSchedule(schedule.get());
    }
    else
    {
      thermostat->resetHeatingSchedule();
    }
  }
}
开发者ID:MatthewSteen,项目名称:OpenStudio,代码行数:16,代码来源:ThermalZonesController.cpp

示例5: setDehumidifyingSchedule

void ThermalZonesController::setDehumidifyingSchedule(model::ThermalZone & thermalZone, model::OptionalSchedule & schedule)
{
  model::OptionalZoneControlHumidistat humidistat = thermalZone.zoneControlHumidistat();

  if( humidistat )
  {
    if( schedule )
    {
      humidistat->setDehumidifyingRelativeHumiditySetpointSchedule(schedule.get());
    }
    else
    {
      humidistat->resetDehumidifyingRelativeHumiditySetpointSchedule();
    }
  }
}
开发者ID:MatthewSteen,项目名称:OpenStudio,代码行数:16,代码来源:ThermalZonesController.cpp

示例6: addBranchForZone

void InspectorController::addBranchForZone(model::ThermalZone & zone)
{
  model::OptionalHVACComponent hvacComponent = m_modelObject->optionalCast<model::HVACComponent>();

  model::OptionalAirLoopHVAC airLoop;

  if( hvacComponent )
  {
    airLoop = hvacComponent->airLoopHVAC();
  }

  if( airLoop )
  {
    model::Model model = zone.model();

    airLoop->addBranchForZone(zone,boost::none);
  }
}
开发者ID:ChengXinDL,项目名称:OpenStudio,代码行数:18,代码来源:InspectorController.cpp

示例7: QWidget

ZoneChooserItem::ZoneChooserItem(model::ThermalZone & zone, ZoneChooserView * parent)
    : QWidget(parent),
      m_zoneChooserView(parent),
      m_thermalZone(zone)
{
    QHBoxLayout * hLayout = new QHBoxLayout();

    m_checkBox = new QCheckBox();

    m_checkBox->setText(toQString(zone.name().get()));

    connect( m_checkBox, SIGNAL(clicked(bool)), this, SLOT(sendClickedSignal(bool)) );
    connect( this, SIGNAL(addZoneClicked(model::ThermalZone &)), m_zoneChooserView,SIGNAL(addZoneClicked(model::ThermalZone &)) );
    connect( this, SIGNAL(removeZoneClicked(model::ThermalZone &)), m_zoneChooserView,SIGNAL(removeZoneClicked(model::ThermalZone &)) );

    hLayout->addWidget(m_checkBox);

    setLayout(hLayout);

}
开发者ID:CraigCasey,项目名称:OpenStudio,代码行数:20,代码来源:ZoneChooserView.cpp

示例8: addComponentToZone

void ThermalZonesController::addComponentToZone(model::ThermalZone & zone, Handle & h)
{
  boost::optional<model::ZoneHVACComponent> libraryComp;

  model::Model library = OSAppBase::instance()->currentDocument()->componentLibrary();
  libraryComp = library.getModelObject<model::ZoneHVACComponent>(h);

  if( libraryComp )
  {
    std::vector<model::ModelObject> existingComps;
    existingComps = zone.equipment();

    std::vector<model::ZoneHVACComponent> exisitngHVACComps;

    for( auto it = existingComps.begin();
         it < existingComps.end();
         ++it )
    {
      if( boost::optional<model::ZoneHVACComponent> hvacComp = it->optionalCast<model::ZoneHVACComponent>() )
      {
        exisitngHVACComps.push_back(hvacComp.get());
      }
    }

    if( exisitngHVACComps.size() > 0 )
    {
      QMessageBox message(subTabView());
      
      message.setText("Sorry, only one piece of zone equipment is allowed at this time.");

      message.exec();

      return;
    }
  }

  bool wasSuccessful = false;

  if( libraryComp )
  {
    model::ZoneHVACComponent compClone = libraryComp->clone(model()).cast<model::ZoneHVACComponent>();
  
    bool added = compClone.addToThermalZone(zone);

    if( added )
    {
      wasSuccessful = true;
    }
    else
    {
      compClone.remove();
    }
  }

  if( ! wasSuccessful )
  {
    QMessageBox message(subTabView());
    
    message.setText("The selected component is not allowed at this location.");

    message.exec();
  }
}
开发者ID:MatthewSteen,项目名称:OpenStudio,代码行数:63,代码来源:ThermalZonesController.cpp

示例9: linkExteriorSubSurface

bool SurfaceNetworkBuilder::linkExteriorSubSurface(model::ThermalZone zone, model::Space space, model::Surface surface, model::SubSurface subSurface)
{
  LOG(Info, "Subsurface '" << subSurface.name().get() << "' connects zone '" << zone.name().get() << "' to the ambient");
  return true;
}
开发者ID:NREL,项目名称:OpenStudio,代码行数:5,代码来源:SurfaceNetworkBuilder.cpp


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