I succeed to get schedule for equipment aviablity schedule. I am really appreciate the effort of OS team for user supporting. Thank a lots.
I got schedule as follow : first try loop all thermal zone to get all space. For each space, i start to check if they have instance load assigned directly to this zone so they must have schedule there. i get space.spaceType and find around it. At the end i got schedule and assign it to equipment schedule. i add many info registers to get checking each step. Maybe it's not an efficient way but it really helps me to understand better about Ruby syntax and program structure. However, there are some points which i still want to optimize my measure :
- in case have many people loads in one zone or one space, i want to observe all people loads and schedule sets in each zone . The repeated if loop is not good in this case.
a)Is there any better approach for this work ?
b) My approach for central ventilation airloop schedule is making a new schedule which incorporate all Numberofpeople schedule in each zone. For this work in E+, it pretty easy with EMS and constant schedule every time zero people count in the building system is off. In OS , we need to setup schedule before running simulation, so i want to know that whether OS SDK has any method or general configuration for observing schedule.
- I try to make QC code for result by checking the the equipment method in thermalzone : link text but because of Model::object properties, im not able to loop through all equipment with zone.equipments.each do |equip|. How should i call a Model::object method ?
Thank
model.getThermalZones.each do |zone|
runner.registerInfo(" Check #{zone.name}")
zone.spaces.each do |space|
runner.registerInfo(" Check #{space.name}")
if not space.defaultScheduleSet.empty?
spc_default_schset = space.defaultScheduleSet
runner.registerInfo(" #{space.name} has schedule set #{spc_default_schset.name} ")
else
runner.registerInfo(" #{space.name} has no schedule set")
end
if not space.people.empty?
space_people = space.people.get
runner.registerInfo(" #{space.name} has people load #{space_people.name} ")
if not Space_people.numberofPeopleSchedule.empty?
runner.registerInfo(" #{space.name} has occupancy schedule")
space_sch_occ = space_people.numberofPeopleSchedule
else
runner.registerInfo(" #{space.name} has no occupancy schedule")
end
else
runner.registerInfo(" #{space.name} has no people load")
end
if space.spaceType.is_initialized
spc_type = space.spaceType.get
runner.registerInfo(" #{space.name} has space type #{spc_type.name} in zone #{zone.name}")
i = 0
spc_type.people.each do |spc_type_people|
i= i+1
if spc_type_people.numberofPeopleSchedule.is_initialized
@@schd = spc_type_people.numberofPeopleSchedule.get
runner.registerInfo(" in zone #{zone.name} has #{spc_type_people.name} has people schedule #{@@schd.name} ")
else
runner.registerInfo("in zone #{zone.name} has #{spc_type_people.name} people load but has no schedule ")
end
end
if i == 0
runner.registerInfo("in zone #{zone.name} has no people load ")
end
Is this related to this question? What I'm wondering is if you are trying to get HVAC schedules or schedules about internal loads?
Thank for reply. I make new question in order to clarify about class and inheritance relation of model. You can merge with my previous question but it's better for me when ask in separate question.
What i want is get Number of People schedule use for space and apply it to equipment