Schedules

From EMK Wiki
Jump to navigation Jump to search
Example Schedule Window

Schedules are designed to give advanced control over various aspects of a Run during its execution. This is achieved by changing how values for EMarket's internal variables are derived. In other words the Schedule extends and modifies EMarket's underlying scripting language which describes the input parameters at each Tick of a Run. In this regard a Schedule can be considered analogous to programming language for EMarket.

The Schedule can be used to define:

  • variables
  • the traits of entities

When a variable is defined, a new value is added to the run data, based on the definition. When a trait is defined through the Schedule, the entity and trait concerned will already exist in the model, but the existing definition of the trait's value will be modified.


Schedule Window Fields

Name The name of the Schedule resource.
Description A free text field for supplementary information about the Schedule.
Variable Variable names are used in the Schedule to place values into the model (or return values from the model) as it runs.
Definition The definition determines the value that the associated variable will take.

The information in a Schedule Resource can be presented in one of two modes

  • Data grid
  • Script editor (as shown in above right figure)

Variables defined in the Schedule are either constants or formulae. Some formulae introduce time-dependency, as seen in the example above where a Line capacity is varied seasonally.

Note that after a Schedule is attached to a Run Definition (using the Run Window), variables defined in the Schedule are available for use in other fields in other Resource Instances in the Run Definition.

Warning: More than one Schedule Instance can be associated with a Run Definition. Where a definition of for the same item appears in more than one Schedule attached to a Run Definition, the last definition to be read for a constant, variable or function will be the one that applies at run time.

Variable names starting with “!” are ignored by the Run and cause the appearance of the row in the Schedule Window to be dimmed. This allows the user to disable definitions without removing them or to insert comments in the Schedule code.

User-defined variables (such as TestOutage in the example below) appear in the Globals Result set. This is useful for examining the effect of Schedule entries on an output and for ensuring that your Schedule entries are achieving the desired effect. For example, if the entries in the table below were placed into a Schedule Resource attached to a Run Definition, TestOutage would appear in the Globals results and could be used to observe the changes in the maximum generation of the Tekapo station.

Variable Definition
Hydrostation:Tekapo.MaxGen TimeSeries(1, '01/04/2003', 25, '30/07/2003', 1)
TestOutage HydroStation:Tekapo.MaxGen

Warning: Internal variables used in a Schedule Resource override the value of these variables entered through a Resource Window. For example, if a Schedule defines a Lines's maximum capacity as 350 MW while the Grid resource defines maximum capacity for the same line as 500MW, EMarket will use the Schedule value of 350MW for the Run.

Note: Only letters, numbers and underscores should be used for variable names. EMarket replaces all space characters entered into a Schedule variable name with underscore characters. Also, Schedule entries are case sensitive, i.e. "Generation" is not the same as "generation".

Schedule Script View

The Schedule can be viewed in the form of a script allowing you to easily cut and paste text between Schedule Instances, or to and from a word processor or spreadsheet. The parts of the formulae are colour coded, with comments, variable names, entity.trait specifications and definitions being differentiated. The script view is an alternative to the grid editing pane and all changes made to one are shown in the other.

 A list of Formulae and Functions that can be used within the Schedule

Back to Resources

Back to User Manual Main Page