From GridLAB-D Wiki
Jump to: navigation, search

Expansion variables are used in GLM code to embed context-dependent values into property values and code. Expansion variables are always enclosed in single curly braces, e.g., {variable}.

To enable expansion variable syntax, property values must be embedded in back-quotes as shown in this example from the Getting Started Using GridLAB-D page:

// Examples:1g.glm
clock {
  timezone EST+5EDT;
  starttime '2000-01-01 00:00:00';
  stoptime '2001-01-01 00:00:00';
}
module residential;
module tape;
object house:..5 {
  object recorder {
    property air_temperature;
    file `temperature{id}.csv`;
    in '2000-04-01 00:00:00';
    out '2000-04-02 00:00:00';
  };
}

The recognized expansion variables are

See also