本文整理汇总了C++中People::peopleDefinition方法的典型用法代码示例。如果您正苦于以下问题:C++ People::peopleDefinition方法的具体用法?C++ People::peopleDefinition怎么用?C++ People::peopleDefinition使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类People
的用法示例。
在下文中一共展示了People::peopleDefinition方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: idfObject
boost::optional<IdfObject> ForwardTranslator::translatePeople( People & modelObject )
{
IdfObject idfObject(openstudio::IddObjectType::People);
m_idfObjects.push_back(idfObject);
for (LifeCycleCost lifeCycleCost : modelObject.lifeCycleCosts()){
translateAndMapModelObject(lifeCycleCost);
}
PeopleDefinition definition = modelObject.peopleDefinition();
idfObject.setString(PeopleFields::Name, modelObject.name().get());
boost::optional<Space> space = modelObject.space();
boost::optional<SpaceType> spaceType = modelObject.spaceType();
if (space){
boost::optional<ThermalZone> thermalZone = space->thermalZone();
if (thermalZone){
idfObject.setString(PeopleFields::ZoneorZoneListName, thermalZone->name().get());
}
}else if(spaceType){
idfObject.setString(PeopleFields::ZoneorZoneListName, spaceType->name().get());
}
boost::optional<Schedule> schedule = modelObject.numberofPeopleSchedule();
if (schedule){
idfObject.setString(PeopleFields::NumberofPeopleScheduleName, schedule->name().get());
}
idfObject.setString(PeopleFields::NumberofPeopleCalculationMethod, definition.numberofPeopleCalculationMethod());
double multiplier = modelObject.multiplier();
OptionalDouble d = definition.numberofPeople();
if (d){
idfObject.setDouble(PeopleFields::NumberofPeople, (*d)*multiplier);
}
d = definition.peopleperSpaceFloorArea();
if (d){
idfObject.setDouble(PeopleFields::PeopleperZoneFloorArea, (*d)*multiplier);
}
d = definition.spaceFloorAreaperPerson();
if (d){
idfObject.setDouble(PeopleFields::ZoneFloorAreaperPerson, (*d)*multiplier);
}
d = definition.fractionRadiant();
if (d){
idfObject.setDouble(PeopleFields::FractionRadiant, *d);
}
d = definition.sensibleHeatFraction();
if (d){
idfObject.setDouble(PeopleFields::SensibleHeatFraction, *d);
}
schedule = modelObject.activityLevelSchedule();
if (schedule){
idfObject.setString(PeopleFields::ActivityLevelScheduleName, schedule->name().get());
}
if (!definition.isCarbonDioxideGenerationRateDefaulted()){
idfObject.setDouble(PeopleFields::CarbonDioxideGenerationRate, definition.carbonDioxideGenerationRate());
}
if (!definition.isEnableASHRAE55ComfortWarningsDefaulted()){
if (definition.enableASHRAE55ComfortWarnings()){
idfObject.setString(PeopleFields::EnableASHRAE55ComfortWarnings, "Yes");
}else{
idfObject.setString(PeopleFields::EnableASHRAE55ComfortWarnings, "No");
}
}
if (!definition.isMeanRadiantTemperatureCalculationTypeDefaulted()){
idfObject.setString(PeopleFields::MeanRadiantTemperatureCalculationType, definition.meanRadiantTemperatureCalculationType());
}
// TODO: Surface Name/Angle Factor List Name
schedule = modelObject.workEfficiencySchedule();
if (schedule){
idfObject.setString(PeopleFields::WorkEfficiencyScheduleName, schedule->name().get());
}
schedule = modelObject.clothingInsulationSchedule();
if (schedule){
idfObject.setString(PeopleFields::ClothingInsulationScheduleName, schedule->name().get());
}
schedule = modelObject.airVelocitySchedule();
if (schedule){
idfObject.setString(PeopleFields::AirVelocityScheduleName, schedule->name().get());
}
for (int i = 0, n = definition.numThermalComfortModelTypes(); i < n; ++i) {
OptionalString s = definition.getThermalComfortModelType(i);
if (s) {
idfObject.pushExtensibleGroup(StringVector(1u,*s));
//.........这里部分代码省略.........