本文整理汇总了C++中HVACComponent::handle方法的典型用法代码示例。如果您正苦于以下问题:C++ HVACComponent::handle方法的具体用法?C++ HVACComponent::handle怎么用?C++ HVACComponent::handle使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类HVACComponent
的用法示例。
在下文中一共展示了HVACComponent::handle方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: setFan
void AirTerminalSingleDuctParallelPIUReheat_Impl::setFan( HVACComponent & hvacComponent )
{
bool isTypeCorrect = false;
if( hvacComponent.iddObjectType() == IddObjectType::OS_Fan_ConstantVolume )
{
isTypeCorrect = true;
}
if( isTypeCorrect )
{
setPointer(OS_AirTerminal_SingleDuct_ParallelPIU_ReheatFields::FanName,hvacComponent.handle());
}
}
示例2: setReheatCoil
void AirTerminalSingleDuctParallelPIUReheat_Impl::setReheatCoil( HVACComponent & hvacComponent )
{
bool isTypeCorrect = false;
if( hvacComponent.iddObjectType() == IddObjectType::OS_Coil_Heating_Electric )
{
isTypeCorrect = true;
}
else if( hvacComponent.iddObjectType() == IddObjectType::OS_Coil_Heating_Gas )
{
isTypeCorrect = true;
}
else if( hvacComponent.iddObjectType() == IddObjectType::OS_Coil_Heating_Water )
{
isTypeCorrect = true;
}
if( isTypeCorrect )
{
setPointer(OS_AirTerminal_SingleDuct_ParallelPIU_ReheatFields::ReheatCoilName,hvacComponent.handle());
}
}
示例3: idfObject
//.........这里部分代码省略.........
}
// SupplyAirFanObjectType
HVACComponent supplyAirFan = modelObject.supplyAirFan();
if( boost::optional<IdfObject> _supplyAirFan = translateAndMapModelObject(supplyAirFan) )
{
idfObject.setString(ZoneHVAC_PackagedTerminalAirConditionerFields::SupplyAirFanObjectType,_supplyAirFan->iddObject().name() );
idfObject.setString(ZoneHVAC_PackagedTerminalAirConditionerFields::SupplyAirFanName,_supplyAirFan->name().get());
if( airOutletNodeName )
{
if( _supplyAirFan->iddObject().type() == IddObjectType::Fan_ConstantVolume )
{
_supplyAirFan->setString(Fan_ConstantVolumeFields::AirInletNodeName,heatingCoilOutletNodeName);
_supplyAirFan->setString(Fan_ConstantVolumeFields::AirOutletNodeName,airOutletNodeName.get());
}
}
}
// HeatingCoilObjectType
HVACComponent heatingCoil = modelObject.heatingCoil();
if( boost::optional<IdfObject> _heatingCoil = translateAndMapModelObject(heatingCoil) )
{
idfObject.setString(ZoneHVAC_PackagedTerminalAirConditionerFields::HeatingCoilObjectType,_heatingCoil->iddObject().name() );
idfObject.setString(ZoneHVAC_PackagedTerminalAirConditionerFields::HeatingCoilName,_heatingCoil->name().get() );
if( _heatingCoil->iddObject().type() == IddObjectType::Coil_Heating_Water )
{
_heatingCoil->setString(Coil_Heating_WaterFields::AirInletNodeName,coolingCoilOutletNodeName);
_heatingCoil->setString(Coil_Heating_WaterFields::AirOutletNodeName,heatingCoilOutletNodeName);
}
else if( _heatingCoil->iddObject().type() == IddObjectType::Coil_Heating_Gas )
{
_heatingCoil->setString(Coil_Heating_GasFields::AirInletNodeName,coolingCoilOutletNodeName);
_heatingCoil->setString(Coil_Heating_GasFields::AirOutletNodeName,heatingCoilOutletNodeName);
}
else if( _heatingCoil->iddObject().type() == IddObjectType::Coil_Heating_Electric )
{
_heatingCoil->setString(Coil_Heating_ElectricFields::AirInletNodeName,coolingCoilOutletNodeName);
_heatingCoil->setString(Coil_Heating_ElectricFields::AirOutletNodeName,heatingCoilOutletNodeName);
}
}
// CoolingCoilObjectType
HVACComponent coolingCoil = modelObject.coolingCoil();
boost::optional<IdfObject> _coolingCoil;
if( boost::optional<CoilCoolingDXSingleSpeed> dxCoil = coolingCoil.optionalCast<CoilCoolingDXSingleSpeed>() )
{
_coolingCoil = translateCoilCoolingDXSingleSpeedWithoutUnitary(dxCoil.get());
m_map.insert(std::make_pair(coolingCoil.handle(),_coolingCoil.get()));
}
else
{
_coolingCoil = translateAndMapModelObject(coolingCoil);
}
if( _coolingCoil )
{
idfObject.setString(ZoneHVAC_PackagedTerminalAirConditionerFields::CoolingCoilObjectType,_coolingCoil->iddObject().name() );
idfObject.setString(ZoneHVAC_PackagedTerminalAirConditionerFields::CoolingCoilName,_coolingCoil->name().get() );
if( _coolingCoil->iddObject().type() == IddObjectType::Coil_Cooling_DX_SingleSpeed )
{
_coolingCoil->setString(Coil_Cooling_DX_SingleSpeedFields::AirInletNodeName,mixedAirNodeName);
_coolingCoil->setString(Coil_Cooling_DX_SingleSpeedFields::AirOutletNodeName,coolingCoilOutletNodeName);
}
}
// FanPlacement
idfObject.setString(ZoneHVAC_PackagedTerminalAirConditionerFields::FanPlacement,modelObject.fanPlacement());
// SupplyAirFanOperatingModeScheduleName
if( boost::optional<Schedule> schedule = modelObject.supplyAirFanOperatingModeSchedule() )
{
if( boost::optional<IdfObject> _schedule = translateAndMapModelObject(schedule.get()) )
{
idfObject.setString(ZoneHVAC_PackagedTerminalAirConditionerFields::SupplyAirFanOperatingModeScheduleName,_schedule->name().get());
}
}
return idfObject;
}
开发者ID:ORNL-BTRIC,项目名称:OpenStudio,代码行数:101,代码来源:ForwardTranslateZoneHVACPackagedTerminalAirConditioner.cpp
示例4: setSupplyAirFan
bool ZoneHVACTerminalUnitVariableRefrigerantFlow_Impl::setSupplyAirFan(const HVACComponent & component)
{
return setPointer(OS_ZoneHVAC_TerminalUnit_VariableRefrigerantFlowFields::SupplyAirFan,component.handle());
}
示例5: setWaterCoil
void ControllerWaterCoil_Impl::setWaterCoil( const HVACComponent & comp )
{
auto result = setPointer(OS_Controller_WaterCoilFields::WaterCoilName,comp.handle());
OS_ASSERT(result);
}
示例6: setHeatingCoil
bool ZoneHVACUnitHeater_Impl::setHeatingCoil(const HVACComponent & heatingCoil)
{
bool result = setPointer(OS_ZoneHVAC_UnitHeaterFields::HeatingCoilName, heatingCoil.handle());
return result;
}
示例7: setSupplyAirFan
bool ZoneHVACUnitHeater_Impl::setSupplyAirFan(const HVACComponent& HVACComponent)
{
bool result = setPointer(OS_ZoneHVAC_UnitHeaterFields::SupplyAirFanName, HVACComponent.handle());
return result;
}
示例8: setHeatingCoil
bool AirTerminalSingleDuctConstantVolumeFourPipeBeam_Impl::setHeatingCoil(const HVACComponent& coilHeatingFourPipeBeam) {
bool result = setPointer(OS_AirTerminal_SingleDuct_ConstantVolume_FourPipeBeamFields::HeatingCoilName, coilHeatingFourPipeBeam.handle());
if (!result) {
if ( !coilHeatingFourPipeBeam.optionalCast<CoilHeatingFourPipeBeam>() ) {
LOG(Error, "Cannot set the heating coil to something else than CoilHeatingFourPipeBeam for " << briefDescription());
}
}
return result;
}
示例9: setCoolingCoil
bool ZoneHVACLowTempRadiantVarFlow_Impl::setCoolingCoil(HVACComponent& coolingCoil)
{
bool result = setPointer(OS_ZoneHVAC_LowTemperatureRadiant_VariableFlowFields::LowTempRadiantVariableFlowCoolingCoilName, coolingCoil.handle());
return result;
}
示例10: removeFromLoop
bool HVACComponent_Impl::removeFromLoop( const HVACComponent & systemStartComponent,
const HVACComponent & systemEndComponent,
unsigned componentInletPort,
unsigned componentOutletPort )
{
auto _model = model();
auto thisObject = getObject<HVACComponent>();
if( systemStartComponent.model() != _model ) return false;
if( systemEndComponent.model() != _model ) return false;
auto inletComponent = connectedObject( componentInletPort );
auto outletComponent = connectedObject( componentOutletPort );
auto inletComponentOutletPort = connectedObjectPort( componentInletPort );
auto outletComponentInletPort = connectedObjectPort( componentOutletPort );
if( ! inletComponent ) return false;
if( ! outletComponent ) return false;
if( ! inletComponentOutletPort ) return false;
if( ! outletComponentInletPort ) return false;
auto inletNode = inletComponent->optionalCast<Node>();
auto outletNode = outletComponent->optionalCast<Node>();
boost::optional<Splitter> splitter;
boost::optional<Mixer> mixer;
if( inletNode ) {
if( auto mo = inletNode->inletModelObject() ) {
splitter = mo->optionalCast<Splitter>();
}
}
if( outletNode ) {
if( auto mo = outletNode->outletModelObject() ) {
mixer = mo->optionalCast<Mixer>();
}
}
if( systemStartComponent.handle() == inletComponent->handle()
&& systemEndComponent.handle() == outletComponent->handle() ) {
// This component is between the systemStartComponent and the systemEndComponent
// ie. the supply or demand inlet or outlet Nodes,
// or the oa system end points on either the relief or inlet air streams.
_model.disconnect(thisObject,componentInletPort);
_model.disconnect(thisObject,componentOutletPort);
_model.connect( inletComponent.get(), inletComponentOutletPort.get(),
outletComponent.get(), outletComponentInletPort.get() );
return true;
} else if( systemEndComponent.handle() == outletComponent->handle() ) {
// Here the systemEndComponent is immediately downstream of this component,
// but there are other components (besides systemStartComponent) upstream.
boost::optional<ModelObject> newInletComponent;
boost::optional<unsigned> newInletComponentOutletPort;
// Make sure we don't end up with two nodes next to each other after this component is removed
if( inletNode && outletNode ) {
newInletComponent = inletNode->inletModelObject();
newInletComponentOutletPort = inletNode->connectedObjectPort(inletNode->inletPort());
OS_ASSERT(newInletComponent);
OS_ASSERT(newInletComponentOutletPort);
} else {
newInletComponent = inletComponent;
newInletComponentOutletPort = inletComponentOutletPort;
}
_model.disconnect(thisObject,componentInletPort);
_model.disconnect(thisObject,componentOutletPort);
// inletNode->remove() would have failed if we did it before the disconnect
if( inletNode && outletNode ) {
inletNode->remove();
}
_model.connect( newInletComponent.get(), newInletComponentOutletPort.get(),
outletComponent.get(), outletComponentInletPort.get() );
return true;
} else if( splitter && mixer ) {
// If the component is the only component (except nodes) between a splitter mixer pair
OS_ASSERT(inletNode);
OS_ASSERT(outletNode);
int i = splitter->branchIndexForOutletModelObject(inletNode.get());
int j = mixer->branchIndexForInletModelObject(outletNode.get());
OS_ASSERT(i == j);
splitter->removePortForBranch(i);
mixer->removePortForBranch(i);
_model.disconnect(thisObject,componentInletPort);
_model.disconnect(thisObject,componentOutletPort);
inletNode->remove();
outletNode->remove();
if( ! splitter->lastOutletModelObject() )
{
Node newNode(_model);
_model.connect(splitter.get(),splitter->nextOutletPort(),newNode,newNode.inletPort());
//.........这里部分代码省略.........
示例11: setExhaustAirFan
bool ZoneHVACEnergyRecoveryVentilator_Impl::setExhaustAirFan(const HVACComponent& exhaustAirFan) {
bool result = setPointer(OS_ZoneHVAC_EnergyRecoveryVentilatorFields::ExhaustAirFanName, exhaustAirFan.handle());
return result;
}
示例12: setHeatExchanger
bool ZoneHVACEnergyRecoveryVentilator_Impl::setHeatExchanger(const HVACComponent& hxAirToAirSensibleAndLatent) {
bool result = setPointer(OS_ZoneHVAC_EnergyRecoveryVentilatorFields::HeatExchangerName, hxAirToAirSensibleAndLatent.handle());
return result;
}
示例13: setHVACComponent
bool PortList_Impl::setHVACComponent(const HVACComponent & hvacComponent)
{
return setPointer(OS_PortListFields::HVACComponent,hvacComponent.handle());
}