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

EMS for night cooling with outdoor air

asked 2017-02-08 17:01:18 -0500

updated 2017-04-26 14:07:39 -0500

Caveat: I can spell "EMS", but have very limited familiarity with it. I've pored over the example files and think I've got syntax and organization correct ... but it still doesn't work.

Nonetheless, I think I'm trying to do something fairly simple - turn on a fan when the sun is down and the indoor temp is warmer than the outdoor temp. Simple or not, EnergyPlus tells me it cannot process the line :

"IF (SunIsUp==0) && (OutdoorTemp<23.9) && (ZoneTemp-RSP4th:RSP>29.4)" in the code below. If you can give me a clue why that is, I'll be grateful.

EnergyManagementSystem:Sensor, OutdoorTemp, Environment, Site Outdoor Air Drybulb Temperature;

EnergyManagementSystem:Sensor, ZoneTemp-RSP4th:RSP, RSP4th:RSP, Zone Mean Air Temperature;

EnergyManagementSystem:Actuator, NightClgActuator, Sched_NightClg, Schedule:Compact, Schedule Value;

EnergyManagementSystem:ProgramCallingManager, NightClg MgmtSys1, BeginTimestepBeforePredictor, NightClgControl1;

EnergyManagementSystem:Program, NightClgControl1, IF (SunIsUp==0) && (OutdoorTemp<23.9) && (ZoneTemp-RSP4th:RSP>29.4), SET NightClgActuator = 1.0, ELSE, SET NightClgActuator = Null, ENDIF;

edit retag flag offensive close merge delete

2 Answers

Sort by » oldest newest most voted

answered 2017-02-08 17:15:08 -0500

I think perhaps you have some characters in your variable names that aren't allowed. Here are the rules.

edit flag offensive delete link more


Perfect and thank you very much. You were exactly right and I now know that spaces and dashes are not legit in variable names.

Jim Dirkes gravatar image Jim Dirkes  ( 2017-02-08 17:42:34 -0500 )edit

One more detail, please....

The schedule value created in the EMS objects is used to turn two fans (in separate air loops) on / off. It's referenced only in the fan object's Availability Schedule Name field.

When E+ runs, it tells me that I have an "invalid Availability Schedule Name" for the two fan objects where that schedule is used. I have a similar EMS schedule to turn off several DX coils below 13C. That one works perfectly, so it doesn't make sense that this one, doing something very similar, doesn't work.


Jim Dirkes gravatar image Jim Dirkes  ( 2017-02-08 19:34:17 -0500 )edit

Nothing springs immediately to mind. Sometimes when I'm stuck on an error I'll search the source with generic parts of the error text, to find where in the program it's being triggered. This might help narrow it down.

Eric Ringold gravatar image Eric Ringold  ( 2017-02-09 10:15:44 -0500 )edit

Apparently :(, I am supposed to create a schedule which the EMS routine can then modify. I had done that a couple years ago when creating the EMS routine that was working properly. I did not do that for the recent effort. After adding the schedule, the EMS routine seems to work perfectly.

Thanks for your patience. The catalyst for helping me see that problem was Eric's comment "the schedule name in the actuator object and the actual schedule name need to be the same".

On to other issues.... (while smarter than I used to be)

Jim Dirkes gravatar image Jim Dirkes  ( 2017-02-10 12:10:57 -0500 )edit

answered 2017-02-09 11:18:27 -0500

Hoping to clarify.... These severe errors result for the second EMS program shown below, but NOT for the first one.

* Severe * Invalid Actuated Component Unique Name =SCHEDNIGHTCLG

* ~~~ * Entered in EnergyManagementSystem:Actuator=EMSACTNIGHTCLG * ~~~ * Component Unique key name not found * ~~~ * Review edd file for valid component names.

* Severe * Invalid Actuated Component Control Type =SCHEDULE VALUE

* ~~~ * Entered in EnergyManagementSystem:Actuator=EMSACTNIGHTCLG * ~~~ * Control Type not found

This works:

image description

This does not:

image description

edit flag offensive delete link more


I noticed in your original post that the name of the schedule is: Sched_NightClg, with an underscore. The EMS actuator does not include the underscore.

rraustad gravatar image rraustad  ( 2017-02-09 12:39:08 -0500 )edit

Clarifying.... In the EMSApplicationGuide, it says "Underscore (“_”) is the only special character allowed in variable names."

The EMS routine that DOES work includes underscores. I took them out of the one that does NOT work as I was trying everything I could think of to make it work....

Do you think the documentation is incorrect?

Jim Dirkes gravatar image Jim Dirkes  ( 2017-02-09 14:27:48 -0500 )edit

I think the presence or absence of an underscore is not the problem; rather that the schedule name in the actuator object and the actual schedule name need to be the same. (I assumed you'd checked the edd file to make sure the name of the schedule you're trying to change is the same as what the actuator thinks it is).

Eric Ringold gravatar image Eric Ringold  ( 2017-02-09 15:06:26 -0500 )edit

Here is where the error text is coming from, which is triggered by this check. I'm not certain about what exactly those functions do, but it seems like the program is not finding an available actuator named SchedNightClg. Perhaps the schedule is named something else, or the name is not unique in your model. Maybe @rraustad has more insight.

Eric Ringold gravatar image Eric Ringold  ( 2017-02-09 15:17:17 -0500 )edit

The underscore is associated with your actual schedule name, not an EMS variable. The second field of the actuator has to correspond to the E+ object name. To me it looks like you changed the schedule name in the actuator but not the schedule object itself.

Adam Hilton gravatar image Adam Hilton  ( 2017-02-09 15:26:38 -0500 )edit

Your Answer

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

Add Answer


Question Tools



Asked: 2017-02-08 17:01:18 -0500

Seen: 241 times

Last updated: Feb 09 '17