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

Revision history [back]

click to hide/show revision 1
initial version

I wanted to create the Schedules programatically using only user arguments supplied to my measure. I eventually opted for a different approach, instead of using user argument to create the custom schedules and then get the schedule values via sensors, I use the arguments directly in my EMS program combined with conditional statements, for example :

IF (CurrentTime >= #{cs}) && (CurrentTime <= #{ce})
    SET #{charging_auth.name} = 1
ELSE
    SET #{charging_auth.name} = 0 
ENDIF

or

IF (Month == #{drm}) && (DayOfMonth == #{drd}) && (CurrentTime>= #{drst})&& (CurrentTime<=#{dret}) 
    SET DR_flag = 1 
    SET #{atc_charging_auth.name} = 0 
    SET #{atc_discharging_auth.name} = 1
ELSE 
    SET DR_flag = 0 
ENDIF

It does the trick