Download PDF
Download page Function of: Model Variable.
Function of: Model Variable
Model Variables are the variables that ResSim calculates for each element property that it needs or uses in its standard computations. A value for each model variable is computed for each timestep of the simulation and stored in a time-series object. For example, pool elevation is a property of a reservoir that ResSim uses to determine release capacity, but it must be computed each timestep to account for changes that result from the release decisions ResSim makes.
Use Model Variable if the lookup table or relationship you need to define varies as a function of a variable that is computed by ResSim.
When Model Variable is selected, the edit panel of the Independent Variable Definition dialog ("Figure: Independent Variable Definition Dialog - Model Variable") will display the Model Variable pane; this pane contains the user interface widgets needed to define the model variable to be used as the independent variable for your function.
Figure: Independent Variable Definition Dialog - Model Variable
The Model Variable pane includes:
- A Model Variables table—a scrollable list of all the model variables computed by ResSim for the current network.
A set of three Filters—use one or more of these selectors, located above the Model Variables table, to thin out the list of model variables so that you can quickly find the variable you need. Each filter selector contains a list of all the possible values for its associated column in the variable table.
When you select a value in one of the Filter selectors, the model variables table will show only those variables that have the selected value for that column of the table. For example, if you select reservoir in the second filter, then the table will show only those model variables that are computed for the reservoirs in your network. Also, when one (or more) Filters has a selected value, the list of values in the other Filters will change to reflect the new, shorted list of variables shown in the table.Although it is natural to use the first filter first, try using the second filter first. You'll probably find what you are looking for a lot faster.
A Select button—when you find the model variable you need, highlight it (click on it) in the table then click the Select button.
Note: double-clicking on the variable you want will NOT perform the selection; you must use the Select button.
A Selected Model (Variable) Time-Series textbox—The name of the model variable you selected from the table will appear here when you press the Select button. Be sure your selected model variable is shown in this field before you click the OK button to apply your selection.
A set of Time Series Options ("Figure: Time Series Options")—Model variables are time-series data; during the compute, a value reflective of the state of that model variable is used to look up the dependent variables in the relationship you are defining. The Time Series options allow you to specify how the value of the model variable is to be selected or computed from the model variable time series. The time series options are specified as a combination of the Function and, if needed, the offset and or period used by the function. The Function are all used to identify or compute a value from the time series relative to the current timestep, so think of the time of the current timestep as the base time or origin. For example, if you selected Previous Value for the Function, the value returned from the model variable and used in the current timestep to lookup the value of the dependent variable from your function will be from the end of the previous timestep. The Time Series Options include:
Figure: Time Series Options
- Function—this is how the value for the selected model variable is to be selected or computed from the model variable time series. Options include:
- Current Value—returns the value stored in the model variable for the current timestep. Be careful, some model variables (like elevation) haven't been computed yet for the current timestep when the value is needed by the feature that uses the lookup table.
- Previous Value—returns the value stored in the model variable at the end of the previous timestep.
- Offset Value—returns the value stored in the model variable at a time offset from the current timestep's time. This function activates the Offset field; you may enter a positive or negative value, in HOURS, for the offset.
For example, if you enter an offset of 6 hours, the value obtained from the time series will be at time = current time + 6 hours. - Period Average, Period Maximum, Period Minimum—these functions will compute a value (average, maximum, or minimum) for the period of time specified in the time series relative to the current timestep's time. Both the Period and Offset fields are active for these functions.
For example, if you want a 6 hour average computed from the time series data offset 3 hours back from the current timestep, you should select Period Average for the Function and enter -3 for the Offset and 6 for the period. These entries will return the average value of the model variable from the period -9 hours to 3 hours relative to the current timestep.
- Offset—The offset adjusts the origin time and may be entered as a positive or negative value. A positive offset will obtain a value from the time series at a time forward from the time of the current timestep. A negative offset will look backward from the current timestep. Note—the offset is entered in units of hours, not timesteps; take this and the compute interval (timestep) into account when specifying the offset.
- Period—The period is used to specify a range of time back from the origin over which a value is to be computed. Only positive values can be used to specify the period. Note—the period is entered in units of hours, not timesteps; take this and the compute interval (timestep) into account when specifying the period.
- Function—this is how the value for the selected model variable is to be selected or computed from the model variable time series. Options include: