How to add fractional type Schedule using Openstudio SDK
This the code snippet I am using to set a schedule where my requirement is a fractional type schedule but it auto sets it as dimensionless
new_schedule = os.model.ScheduleRuleset(model1)
new_schedule.setName("New Schedule")
schedule_limits = os.model.ScheduleTypeLimits(model1)
schedule_limits.setName("New Schedule Type Limits")
schedule_limits.setUnitType("Fractional")
display=schedule_limits.unitType()
print(display)
schedule_limits.setLowerLimitValue(0.0)
schedule_limits.setUpperLimitValue(1.0)
new_schedule.setScheduleTypeLimits(schedule_limits)
hourly_values = [0.0] * 24
hourly_values[8:18] = [1.0] * 10
schedule_day = os.model.ScheduleDay(model1,24)
schedule_day.values = hourly_values
print(schedule_day.values)
Thanks
Is there any solution
One thing i have observed that it sets the type to whatever is written here schedule_limits.setName("New Schedule Type Limits") So if i export the file to osm type and open it again using openstudio application the schedule type is displayed (New Schedule Type Limits)