Question-and-Answer Resource for the Building Energy Modeling Community
Get started with the Help page
Ask Your Question
2

OS Model doesn't add schedule name to "Number of People Schedule Name" field in People object

asked 2017-03-24 11:11:09 -0500

nigusse's avatar

updated 2017-03-27 10:58:12 -0500

I am testing to create an OS Model of a single zone served with PTHP using CSharp binding method. I see all the OS and E+ objects created correctly.

One thing missing is that schedule name is not added to Number of People Schedule Name field of the People object (it is blank) but the schedule object is created correctly and is in the model. However, schedule names are correctly added to other People's object fields such as "Activity Level Schedule Name", "Work Efficiency Schedule Name", and "Clothing Insulation Schedule Name".

I tested it in OS version 2.0.2 and 2.0.05, both show the same problem. Lights, and ElectricEquipment objects also show the same problem. Am I missing something here?

edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
3

answered 2017-03-24 15:52:14 -0500

nigusse's avatar

updated 2017-03-27 10:59:06 -0500

Resolved. I removed the Unit Type input field from OS:ScheduleTypeLimits object when creating the schedules for People, Lights and ElectricEquipment objects.

Why not we use key input value of Fraction for this input field when creating lighting, people, and electric equipment schedules? I was expecting the Dimensionless key input value to work with this objects but it did not. This schedule values are dimensionless multipliers of the peak value. Just a thought!

edit flag offensive delete link more

Comments

I don't think the problem actually stems from "Unit Type" for the Number of People Schedule.

Julien Marrec's avatar Julien Marrec  ( 2017-03-27 11:53:21 -0500 )edit
2

answered 2017-03-27 12:12:13 -0500

updated 2017-03-27 13:57:45 -0500

I don't think "Unit Type" is at fault here for Number of People Schedule, as long as you use either empty, dimensionless, availability or controlmode, you're fine.

Since this can be confusing to track down for anyone who's first digging in the source code, these kind of rules are defined in ScheduleTypeRegistry.cpp. Here's an extract circa L273:

// className, scheduleDisplayName, scheduleRelationshipName, isContinuous, unitType, lowerLimitValue, upperLimitValue;
{"People","Number of People","numberofPeopleSchedule",true,"",0.0,1.0},
{"People","Activity Level","activityLevelSchedule",true,"ActivityLevel",0.0,OptionalDouble()},
{"People","Work Efficiency","workEfficiencySchedule",true,"",0.0,1.0},
{"People","Clothing Insulation","clothingInsulationSchedule",true,"ClothingInsulation",0.0,OptionalDouble()},

So here, you might get that you need a number of people schedule that is Continuous, no Unit Type, and between 0 and 1. Not that simple!

Then it gets a bit trickier, and I'll give you the semi-short story. ScheduleTypeRegistry > isCompatible will:

  • Ignore the Numeric Type (Discrete or Continuous)
  • Check the unit type which in turns calls ScheduleTypeLimits::units, esp L310, which is where you'll see that here really since the ScheduleTypeRegistry is expecting empty for unit type, you could use Dimensionless, availability or controlmode as well. If you use say "Temperature", it won't work.
  • Check the lower and upper limit values, that must be included in the [0;1] interval ([0.3;0.7] will work). They MUST be set!

Here's some code to play with and to demonstrate what I'm saying:

# Initialize an empty model with a people object
model = OpenStudio::Model::Model.new
people_def = OpenStudio::Model::PeopleDefinition.new(model)
people = OpenStudio::Model::People.new(people_def)

# Create a sch type limits
sch_limit = OpenStudio::Model::ScheduleTypeLimits.new(model)

# THE LIMITS MUST BE SET.
# Above 0.0 included
sch_limit.setLowerLimitValue(0.3)
# Less than 1.0 included
sch_limit.setUpperLimitValue(0.9)

# Whether you include the following two statements or not, it doesn't care
# If you put "Temperature", it'll fail
sch_limit.setUnitType("Dimensionless") 
# It should be Continuous but it is ignored...
sch_limit.setNumericType("Discrete") 

# Create a schedule and set the schedule type limit
sch = OpenStudio::Model::ScheduleRuleset.new(model)
sch.setScheduleTypeLimits(sch_limit)

# Assign the schedule, and check what the result is:
people.setNumberofPeopleSchedule(sch)

=> true
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Careers

Question Tools

Stats

Asked: 2017-03-24 11:11:09 -0500

Seen: 507 times

Last updated: Mar 27 '17