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

Setting one schedule relative to another

asked 2014-11-20 10:34:49 -0600

updated 2015-01-09 12:02:33 -0600

Is it possible to set a temperature (or other) schedule to be relative to another schedule? For example if I want to set Zone 1 heating temperature to 18 C and Zone 2 to 21 C, can I define just Zone 1 and then set Zone 2 to Zone 1 + 3 C?

Edit: The answers below are great for compact schedules with only a couple of values, but don't really improve things in the case of more complex temperature schedules.

edit retag flag offensive close merge delete

5 Answers

Sort by » oldest newest most voted
5

answered 2014-11-20 14:36:06 -0600

updated 2014-11-20 14:51:19 -0600

You can create a EMS program to set an "actuator" schedule value based on a "sensor" schedule value. This will happen dynamically during simulation runtime.

Take a look at the EMS Application guide documentation:

Schedule Sensors:

The EnergyManagementSystem:Sensor object can also provide scheduled data for use in Erl programs. Because schedule values are available as outputs that use the “Schedule Value” output, they can also be mapped as sensors. You can use any of the various types of schedule input objects to define a schedule. The schedule does not need to be used elsewhere in the model. The value of the schedule is then mapped to an EMS variable with the Schedule Value report variable. When used with the Schedule:File input object, the sensor object can import time series data into the EMS from an external file. One application might be to test a proposed EMS algorithm with real experimental data.

Schedule Actuators:

A series of actuators is available for overriding schedule values. The following actuators are available with the control type called “Schedule Value”: Schedule:Year, Schedule:Compact, Schedule:File, and Schedule:Constant. The units are not known by the schedule and are determined by the model that references the schedule. The unique identifier is the name of schedule.

If you try to use a particular schedule as input to calculations that modify that schedule, you will be in a circular situation with unexpected results. The modified schedule will lose the original information (unless the actuator is set to Null) and the modifications will be reapplied on top of previous modifications. When this situation arises, use a copy of the original schedule as input to the Erl program so you have the original schedule values.

edit flag offensive delete link more
4

answered 2014-11-20 11:27:18 -0600

I think you could do this three different ways within EnergyPlus: EPMacro, Parametric:SetValueForRun, and using the Energy Management System. None are as simple as you might want but Parametric:SetValueForRun might be the easiest and can be used for a single simulation, not just a group. First set the value using:

Parametric:SetValueForRun,
  $Zone1HeatStPt,
  18;

Then where the two schedules occur use:

=$Zone1HeatStPt

and

=$Zone1HeatStPt + 3

In the place where the values should be in the two schedules for the heat set points.

edit flag offensive delete link more

Comments

This is great for simple schedules and I'll certainly remember it for the future. The problem is if we have schedules set which vary throughout the day/year/etc. It would be great to be able to set one schedule to follow another.

Jamie Bull's avatar Jamie Bull  ( 2014-11-20 11:54:15 -0600 )edit

If it is a complex schedule, try using the Energy Management System. You can redefine any scheduled based on any other schedule using EMS but it is more difficult to use.

JasonGlazer's avatar JasonGlazer  ( 2014-11-20 12:22:40 -0600 )edit

That's what I was hoping to avoid... But thanks for confirming it's what I need to do.

Jamie Bull's avatar Jamie Bull  ( 2014-11-20 13:27:59 -0600 )edit
2

answered 2014-11-20 11:21:27 -0600

I believe this can be done using the EP-Macro program within E+. This allows basic code to be included in the .idf file. You can look up how to use it in the Auxiliary Programs document.

edit flag offensive delete link more

Comments

I'm fairly familiar with EPMacro, and I can see how it would be easy to implement what @JasonGlazer suggested. Set a first variable using ##SET1 Zone1SetPoint 18, and then use Zone1SetPoint[] and #[Zone1SetPoint[] + 3] in the schedules. The same problem occurs for more complex schedules though, which is why I hoped there'd be a way of setting an entire schedule to be relative to another.

Jamie Bull's avatar Jamie Bull  ( 2014-11-20 11:54:20 -0600 )edit
2

answered 2014-11-21 11:31:24 -0600

updated 2014-11-21 12:57:14 -0600

For complex schedules, if the base schedule is known, you could use a spreadsheet or other tool to set up the schedules in a csv file, and use Schedule:File to bring all the schedules into the simulation. If the base schedule is already defined in EnergyPlus syntax, you can run that with output:variable "Schedule Value" hourly (or timestep, schedule:file can have subhourly steps) and use that output to make the base schedule for Schedule:File.

edit flag offensive delete link more

Comments

1

Or just python csv library! Sorry, could not resist. :)

__AmirRoth__'s avatar __AmirRoth__  ( 2014-11-21 11:52:54 -0600 )edit

I'd forgotten that Schedule:File existed. That would also be a great approach (especially given the existence of csv, or even pandas which would allow for some really easy time-series data manipulation).

Jamie Bull's avatar Jamie Bull  ( 2014-11-21 12:19:35 -0600 )edit
1

answered 2014-11-20 15:09:04 -0600

Speaking in gross generalities, it sounds like you need a level of programmability which is not readily available in Parametric, EMS, or EP-Macro. To me, this says you need a "real" programming language and so you want to use something like eppy (which allows you to script IDF files using python rather than macros) or an OpenStudio measure.

edit flag offensive delete link more

Comments

1

I've written a Python script to create the schedules now, having had it confirmed that there's nothing built into EnergyPlus.

Jamie Bull's avatar Jamie Bull  ( 2014-11-20 18:45:01 -0600 )edit

Your Answer

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

Add Answer

Training Workshops

Careers

Question Tools

2 followers

Stats

Asked: 2014-11-20 10:34:49 -0600

Seen: 693 times

Last updated: Nov 21 '14