Description | Absolute value operator | |
Type | NUMERIC | |
Arguments | Type | Meaning |
1 | NUMERIC | value to evaluate |
Evaluation | Determines the absolute value of the numeric argument | |
Comments |
Description | Given a string representing an account’s full name (object^account), returns a list containing the account’s attributes, i.e., the account’s water type, water owner, and account type. | |
Type | LIST {STRING, STRING, STRING} | |
Arguments | Type | Meaning |
1 | STRING | The name of the account. |
Evaluation | ||
Comments |
Description | This function returns the name of a single account having the specified priority date. | |
Type | STRING | |
Arguments | Type | Meaning |
1 | DATETIME | The priority date. |
Evaluation | The accounts in the system are examined and the one account having the indicated priority date is returned. | |
Comments | Priority dates are a property of accounts. It is an error if no account has the specified priority date. It is an error if multiple accounts are found. See AccountNamesFromPriorityDate for a function that can be used when multiple accounts share a priority date. |
Description | This function returns a list of names of Accounts on a specified Object having the indicated Account type, sorted in ascending Account priority date order. Accounts which don’t have a priority date are at the end of the list, sorted in ascending name order. | |
Type | LIST {STRING} | |
Arguments | Type | Meaning |
1 | OBJECT | The Object. |
2 | STRING | Account type name (currently, one of Diversion, Storage, or PassThrough) or ALL. |
Evaluation | The set of Accounts on the Object are examined. The names of the Accounts having the specified account type are added to the returned list. If the Account type argument is ALL, then that attribute is ignored. The returned list will contain the names of ALL Accounts on the Object. The list is sorted as described above. | |
Comments | Priority dates are properties of Accounts. |
Description | This function returns a list of names of Accounts on a specified Object having the indicated WaterOwner, sorted in ascending Account priority date order. Accounts which don’t have a priority date are at the end of the list, sorted in ascending name order. | |
Type | LIST {STRING} | |
Arguments | Type | Meaning |
1 | OBJECT | The Object. |
2 | STRING | WaterOwner name or NONE or ALL |
Evaluation | The set of Accounts on the Object are examined. The names of the Accounts having the specified WaterOwner are added to the returned list. If the WaterOwner argument is NONE, then only Accounts having the default (unassigned) WaterOwner are included in the returned list. If the WaterOwner argument is ALL, then that attribute is ignored. The returned list will contain the names of ALL Accounts on the Object. The list is sorted as described above. | |
Comments | WaterOwners and priority dates are properties of Accounts. |
Description | This function returns a list of names of Accounts on a specified Object having the indicated WaterType, sorted in ascending Account priority date order. Accounts which don’t have a priority date are at the end of the list, sorted in ascending name order. | |
Type | LIST {STRING} | |
Arguments | Type | Meaning |
1 | OBJECT | The Object. |
2 | STRING | WaterType name or NONE or ALL |
Evaluation | The set of Accounts on the Object are examined. The names of the Accounts having the specified WaterType are added to the returned list. If the WaterType argument is NONE, then only Accounts having the default (unassigned) WaterType are included in the returned list. If the WaterType argument is ALL, then that attribute is ignored. The returned list will contain the names of ALL Accounts on the Object. The list is sorted as described above. | |
Comments | WaterTypes and priority dates are properties of Accounts. |
Description | This function returns a list of names of Accounts on a specified Object where the attributes of the outflow Supplies of the Accounts match the given ReleaseType and Destination. The list is sorted in ascending Account priority date order; Accounts which don’t have a priority date are at the end of the list, sorted in ascending name order. | |
Type | LIST {STRING} | |
Arguments | Type | Meaning |
1 | OBJECT | The Object. |
2 | STRING | ReleaseType name or NONE or ALL |
3 | STRING | Destination name or NONE or ALL |
Evaluation | The set of Accounts on the Object are examined. The outflow Supplies on those Accounts are then examined. The names of the Accounts with Supplies that meet the following requirements are added to the returned list: • Link a different downstream Object, and • Have the indicated ReleaseType, and • Have the indicated Destination If the ReleaseType argument or the Destination argument is NONE, then only Supplies having the default (unassigned) attribute of that type are considered. If the ReleaseType argument or the Destination argument is ALL, then that Supply attribute is ignored. The list is sorted as described above. The Intra version of the function will only look at transfer supplies that are within the object. | |
Comments | ReleaseTypes and Destinations are properties of Supplies; priority dates are properties of Accounts. |
Description | This function returns a list of the accounts having the specified priority date. This is useful when the model allows accounts to share priority dates. | |
Type | LIST of STRING | |
Arguments | Type | Meaning |
1 | DATETIME | The priority date. |
Evaluation | The accounts in the system are examined and the accounts having the indicated priority date are returned as a list of STRINGS. | |
Comments | Priority dates are a property of accounts. If there are no accounts with the specified priority date, an empty list is returned. See also AccountNameFromPriorityDate for a similar function that returns a STRING instead of a list. |
Description | This function returns the priority date of the Account, on the specified object, having the specified name. | |
Type | DATETIME | |
Arguments | Type | Meaning |
1 | OBJECT | The Object |
2 | STRING | The Account name |
Evaluation | The Object’s accounts are examined. If an Account exists with the specified name its priority date is returned. | |
Comments | Priority dates are a property of Accounts. It’s an error if either the Object doesn’t have an Account with the specified name or the Account doesn’t have a priority date. |
Description | For the specified slot, compute the aggregated values using the specified function at the specified timestep size. | |
Type | LIST of {DATETIME, NUMERIC} | |
Arguments | Type | Meaning |
1 | SLOT | The slot to aggregate. This slot has the smaller timestep size. |
2 | DATETIME | Begin timestep of the returned (larger timestep) values |
3 | DATETIME | End timestep of the returned (larger timestep) values |
4 | STRING | Timestep to which to aggregate, "6 hours", "1 days", etc. This is the size of the larger timestep. |
5 | STRING | Aggregation function or filter to use. It must be one of the following: "SUM", "AVG", "MIN", "MAX", "FIRST", "LAST". |
6 | STRING | How to treat NaN values in the slot that is being aggregated. It must be one of the following: • “ERROR”: The function aborts the run and posts an explanation to diagnostics. • “TERMINATE”: If any value in the smaller timestep aggregation interval is NaN, the calling expression (for example, the rule) will terminate early. • “IGNORE”: If at least one value in the smaller timestep interval is valid, the interval is aggregated and the NaN value is ignored. If all values in the aggregation interval are NaN, the calling expression will terminate early as above. |
Evaluation | For the specified slot, compute the aggregated values using the specified function at the specified timestep size. | |
Comments | This function can be used to aggregate a series slot to return a list of larger timestep values. A use example from an initialization rule is shown: |
Description | Return the number of events which occurred on a slot in a given period. | |
Type | NUMERIC | |
Arguments | Type | Meaning |
1 | SLOT | a slot |
2 | DATETIME | analysis period start date |
3 | DATETIME | analysis period end date |
4 | DATETIME | event period start date |
5 | DATETIME | event period end date |
6 | NUMERIC | value threshold |
7 | BOOLEAN | value threshold is upper bound |
8 | NUMERIC | event threshold |
9 | BOOLEAN | event threshold is upper bound |
Evaluation | See the on-line documentation for AnnualEventStats, which performs identical computation, but returns more information. This function returns only the number of events which occurred in the analysis period. | |
Comments |
Description | Return the number of event periods which occurred after the last event on a slot. | |
Type | NUMERIC | |
Arguments | Type | Meaning |
1 | SLOT | a slot |
2 | DATETIME | analysis period start date |
3 | DATETIME | analysis period end date |
4 | DATETIME | event period start date |
5 | DATETIME | event period end date |
6 | NUMERIC | value threshold |
7 | BOOLEAN | value threshold is upper bound |
8 | NUMERIC | event threshold |
9 | BOOLEAN | event threshold is upper bound |
Evaluation | See the on-line documentation for AnnualEventStats, which performs identical computation, but returns more information. This function returns only the number of event periods which occurred after the last event. If no events occurred, then this is the number of event periods. | |
Comments |
Description | Collects and returns statistics on annual events occurring on a slot. | |
Type | LIST | |
Arguments | Type | Meaning |
1 | SLOT | a slot |
2 | DATETIME | analysis period start date |
3 | DATETIME | analysis period end date |
4 | DATETIME | event period start date |
5 | DATETIME | event period end date |
6 | NUMERIC | value threshold |
7 | BOOLEAN | value threshold is upper bound |
8 | NUMERIC | event threshold |
9 | BOOLEAN | event threshold is upper bound |
Evaluation | The analysis period start and end dates define the period during which the analysis will be performed. Within the analysis period, only the timesteps which occur on or between the day and month of the event period start and end dates are considered. Each of these periods within the analysis period is called an event period. At each event period, an event can either occur or not. An event is defined by the value threshold and comparison type and the subevent count threshold and comparison type. At each timestep within an event analysis period, the slot’s value is compared to the threshold value. If the value threshold is an upper bound and the slot’s value is greater than the value threshold, then a subevent is said to have occurred at that timestep; similarly, if the value comparison is a lower bound and the slot’s value is less than the value threshold, then a subevent is said to have occurred. After the subevents within an event analysis period have been noted, then they are counted up and compared to the subevent count threshold. If the subevent count threshold is an upper bound and the number of subevents which occurred in an event analysis period is greater than the subevent count threshold, then an event is said to have occurred, and similarly, if the subevent count comparison is a lower bound and the number of subevents which occurred in an event analysis period is less than the subevent count threshold, then an event is said to have occurred. The return list contains the following items (listed in order): • The total number of event periods. • The number of events which occurred. The number of event periods which occurred after the last event. If no events occurred, then this is the number of event periods. | |
Comments | As defined above, the first and last event periods might be of shorter duration than the other event periods. For example, if the analysis period is July 1, 1980 through June 30, 1989 and the event period is May 1 through September 30, then the first event period will be July 1, 1980 through September 30, 1980; subsequent event periods will be from May 1 through September 30, until the last event period, which will be from May 1, 1989, through June 30, 1989. If the event period contains the end of February, then event periods during leap years will also have a different duration. It is an error for the start or end date of the event period to be February 29, which does not exist in each year. Event periods can span year boundaries. For example, if the event period begin is December and the event period end is January, then each event period will be from December of one year to January of the next. One can leave the year field of the event period start or end date unspecified, if one is using a format which contains that component, such as the month/day/year format. E.g., one could specify the event start as @"6:00 May 1". The year component of the event period start and end date is ignored whether or not it is specified. Any missing value in the slot’s series is treated as a non-subevent. The comparison with the value threshold is done to within 0.01% of the threshold’s value. That is, values which are within 0.01% of the threshold’s value are considered to have exceeded the threshold. |
Description | Aggregates several objects’ values, each of which is the result of aggregating a slot’s values over time. | |
Type | NUMERIC | |
Arguments | Type | Meaning |
1 | STRING | Subbasin name |
2 | STRING | slot name |
3 | STRING | aggregation function (SUM, AVG, MIN, or MAX) |
4 | STRING | aggregation filter (INPUT, OUTPUT, or ALL) |
5 | BOOLEAN | time conversion option (TRUE or FALSE) |
6 | DATETIME | start date |
7 | DATETIME | end date |
Evaluation | A list of slots is generated by searching all of the objects in the Subbasin argument for slots which match the slot name argument. If the time conversion option argument is TRUE, and the values to be aggregated are of the FLOW unit type, the values are multiplied by their corresponding timestep length to convert them to values of the unit type VOLUME. Next, each slot’s values are aggregated according to the aggregation function argument over the time range of the datetime arguments. During each of these slot aggregations, any values which do not satisfy the aggregation filter argument are ignored. Finally, all of the object’s aggregated slot values are averaged. | |
Mathematical Expression | ||
Comments | If the time conversion option argument is TRUE, but the unit of the slot values is not FLOW, RiverWare aborts the run with an error. If none of the values for a slot satisfy the aggregation filter argument, the SUM aggregation function yields an aggregated value of 0.0 for that slot, while the AVG, MIN, and MAX aggregation functions abort RiverWare with an error. |
Description | Average several object’s slot values, for each timestep in a range. | |
Type | LIST{LIST{DATETIME, NUMERIC}} | |
Arguments | Type | Meaning |
1 | STRING | Subbasin name |
2 | STRING | slot name |
3 | STRING | aggregation filter (INPUT, OUTPUT, or ALL) |
4 | BOOLEAN | time conversion option (TRUE or FALSE) |
5 | DATETIME | start date |
6 | DATETIME | end date |
Evaluation | A list of slots is generated by searching all of the objects in the Subbasin argument for slots which match the slot name argument. If the time conversion option argument is TRUE, and the values to be averaged are of the FLOW unit type, the values are multiplied by their corresponding timestep length to convert them to values of the unit type VOLUME. Next, all of the object’s slot values are averaged, yielding one value for each timestep in the time range of the datetime arguments. The function returns a list of two items, where the first and second items of the inner lists are the datetime and the average value, respectively. | |
Mathematical Expression | ||
Comments | If the time conversion option argument is TRUE, but the unit of the slot values is not FLOW, RiverWare aborts the run with an error. If none of the values for a slot satisfy the aggregation filter argument, the SUM aggregation function yields an aggregated value of 0.0 for that slot, while the AVG, MIN, and MAX aggregation functions abort RiverWare with an error. |
Description | Aggregate over a timeseries of values, each of which is the result of aggregating several objects’ slot values. | |
Type | NUMERIC | |
Arguments | Type | Meaning |
1 | STRING | Subbasin name |
2 | STRING | slot name |
3 | STRING | aggregation function (SUM, AVG, MIN, or MAX) |
4 | STRING | aggregation filter (INPUT, OUTPUT, or ALL) |
5 | BOOLEAN | time conversion option (TRUE or FALSE) |
6 | DATETIME | start datetime |
7 | DATETIME | end datetime |
Evaluation | A list of slots is generated by searching all of the objects in the Subbasin argument for slots which match the slot name argument. If the time conversion option argument is TRUE, and the values to be aggregated are of the FLOW unit type, the values are multiplied by their corresponding timestep length to convert them to values of the unit type VOLUME. Next, all of the objects’ slot values are aggregated according to the aggregation function argument for each timestep in the time range of the datetime arguments. During each of these slot aggregations, any values which do not satisfy the aggregation filter argument are ignored. Finally, the timeseries of object aggregated slot values are averaged. | |
Mathematical Expression | ||
Comments | If the time conversion option argument is TRUE, but the unit of the slot values is not FLOW, RiverWare aborts the run with an error. If none of the values for a slot satisfy the aggregation filter argument, the SUM aggregation function yields an aggregated value of 0.0 for that slot, while the AVG, MIN, and MAX aggregation functions abort RiverWare with an error. |
Description | Average a slot’s values over a time range, for each object in a subbasin. | |
Type | LIST {LIST {OBJECT, NUMERIC}} | |
Arguments | Type | Meaning |
1 | STRING | Subbasin name |
2 | STRING | slot name |
3 | STRING | aggregation filter (INPUT, OUTPUT, or ALL) |
4 | BOOLEAN | time conversion option (TRUE or FALSE) |
5 | DATETIME | start datetime |
6 | DATETIME | end datetime |
Evaluation | A list of slots is generated by searching all of the objects in the Subbasin argument for slots which match the slot name argument. For each object, the slot’s values are averaged over every timestep in the range of the datetime arguments. Any values which do not satisfy the aggregation filter argument are ignored during the calculation. If the time conversion option argument is TRUE, and the values to be aggregated are of the FLOW unit type, the values are first multiplied by their corresponding timestep length to convert them to values of the unit type VOLUME. | |
Mathematical Expression | ||
Comments | If the time conversion option argument is TRUE, but the unit of the slot values is not FLOW, this function aborts the run with an error. If none of the values for a slot satisfy the aggregation filter argument, this function also aborts RiverWare with an error. |
Description | The ceiling numeric operation, to a multiple of a factor. | |
Type | NUMERIC | |
Arguments | Type | Meaning |
1 | NUMERIC | the value |
2 | NUMERIC | the factor |
Evaluation | Converts the value into the units of the factor, then returns the smallest integral multiple of the factor which is not less than the converted value. The returned value has the units of the factor. | |
Comments | If the scalar portion of the factor is 1.0, then this function simply returns the ceiling of the value expressed in the units of the factor. If the two arguments are of a different unit type, this function aborts the run with an error. See also RoundToFactor and Floor. |
Description | Returns the labels associated with column of a table slot or aggregate series slot. | |
Type | STRING | |
Arguments | Type | Meaning |
1 | SLOT | A table slot or agg series slot. |
2 | NUMERIC | The column index (0-based). |
Evaluation | Returns the label of the column of the slot which has the given index. | |
Comments | It is an error to provide an illegal index (e.g., an index of 4 with a table which has only 4 columns). If the column index is legal but there is no label for that column, then the empty string is returned: " ". |
Description | Returns a list containing the column labels of a given table slot or agg. series slot, in order. | |
Type | LIST of STRING values | |
Arguments | Type | Meaning |
1 | SLOT | A table slot or agg. series slot |
Evaluation | Returns the column labels of the given slot. | |
Comments | It is an error if the input slot has a type other than table slot or agg. series slot. For each column, if no label exists the empty string is returned. |
Description | Fill in the missing components of a partially specified date/time. | |
Type | DATETIME | |
Arguments | Type | Meaning |
1 | DATETIME | a partially specified date/time. |
2 | DATETIME | a source date/time, used to complete the other date. |
Evaluation | Fills in the missing components of a partially specified date value. The missing component values are taken from the second parameter, a date value which, if not fully specified, should have at least the components which are missing from the date which is being completed. See the following syntax examples. See PreviousDate and NextDate for details on related functions. | |
Comments | The behavior is not defined if the resulting date is not valid; for example, if the day of month is not valid for the month and year. |
Description | Used to meet multiple water user demands using multiple reservoir diversions | |
Type | LIST{LIST {SLOT, NUMERIC, OBJECT}} | |
Arguments | Type | Meaning |
1 | STRING | The computational subbasin used for the calculations |
Evaluation | Returns a LIST of slot, value triplets. Each triplet is a LIST that contains a slot (at index zero) and the value to set on that slot (at index one). The slot, value triplets computed by this function are for the subslots on the Supply From Reservoirs slot on each Water User object and the Incoming Available Water slot on each Water User object. For each Water User in the specified subbasin: • A list of supply reservoirs is generated by following the links to the Supply From Reservoirs slot • The list of reservoirs is ranked by Operating Level in descending order. • Each reservoir makes a diversion to meet the Water User’s Diversion Requested value. This value is limited by: the Maximum Delivery Rate specified on the Water User object that applies to the current reservoir, the Max Diversion specified on the Diversion object that applies to the current reservoir, and the amount of water remaining in the conservation pool. • If the Limit by Reservoir Level method is selected (on the Water User object) a diversion cannot be made if the Demand Reservoir is in the flood pool or has a higher operating level than the supply reservoir. • Each reservoir is visited until the Diversion Requested is met or there are no reservoirs left to consider. • The function returns each subslot on each Supply From Reservoirs slot and the associated value. Also the Incoming Available Water slot on each Water User is returned with the value to be set on that slot. The Incoming Available Water is the sum of all the Supply From Reservoirs subslot values | |
Comments | The computational subbasin specified as the argument to this function must contain all the objects relevant to these calculations (Water Users, Diversion Objects, Reservoirs, etc.) The computational subbasin must have a method selected in the Diversions from Reservoirs category. Please consult the help file for the Computational Subbasin object (under Simulation Objects) for more details on this method category. The use of this function requires a specific configuration of objects and method selections. The schematic diagram below displays the required object and link configurations. See Reservoir Diversions in USACE‑SWD Modeling Techniques for details on using this function for USACE-SWD. |
Description | Compare two dates and return that which is chronologically greater. | |
Type | DATETIME | |
Arguments | Type | Meaning |
1 | DATETIME | a date |
2 | DATETIME | another date |
Evaluation | The two dates are resolved and compared, the one which is chronologically greater is returned. | |
Comments |
Description | Compare two dates and return that which is chronologically lesser. | |
Type | DATETIME | |
Arguments | Type | Meaning |
1 | DATETIME | a date |
2 | DATETIME | another date |
Evaluation | The two dates are resolved and compared, the one which is chronologically lesser is returned. | |
Comments |
Description | Given a periodic slot and a date, this function returns an ordered list of dates representing the beginning time of each interval which begins in the specific period containing the input (reference) date. | |
Type | LIST {DATETIME} | |
Arguments | Type | Meaning |
1 | SLOT | a periodic slot |
2 | DATETIME | a reference date |
Evaluation | Every periodic slot has a period associated with it and this period is divided into intervals. Intervals are either regular (e.g., Days) or irregular (e.g., the beginning of one interval might be 8:00 July 3 of each period). One can map a period (divided into intervals) onto a time line, leading to several specific periods (divided into specific intervals). For example, the period "Year" maps onto specific periods corresponding to each year, such as the specific period which is the year 2003. Providing a reference date serves to indicate a specific period, and this function returns the dates corresponding to the beginning of each time interval which begins in that specific period. | |
Comments | When the beginning of an interval occurs exactly at a period boundary (e.g., an interval beginning at "0:00 January 1" with an 1 Year period), then we consider that interval to begin in the period occurring after midnight, not the one before. Not all time intervals (rows) defined in a Periodic Slot will correspond to intervals in a specific period. For example, for a period of Month, an interval might be defined which begins at "12:00 Day 30". This interval does not exist in all months and so for example if the reference date is 12:00 February 1, 2003, then the list returned by this function would not include the date 12:00 February 30, 2003. |
Description | Given a Date/Time value, returns that date encoded as a numeric value of the type used by slots to containing date/time values. | |
Type | NUMERIC | |
Arguments | Type | Meaning |
1 | DATETIME | The date/time value to encode as a numeric value. |
Comments | Slots representing date/time values have unit type DateTime. The date/time value need not be fully specified, but the return value should only be assigned to a slot with appropriate units. For example, if the value @"January 1" should only be assigned to a slot with units "MonthAndDay". |
Description | This function returns a list of the names of all Destinations defined in the Water Accounting System Configuration. | |
Type | LIST {STRING} | |
Arguments | none | |
Evaluation | ||
Comments | Destinations are properties of Supplies. The returned list does not include the default (NONE) Destination. |
Description | This function returns a list of unique names of Destination Type of Supplies which represent outflows from a specified Object, and which have the indicated Release Type. | |
Type | LIST {STRING} | |
Arguments | Type | Meaning |
1 | OBJECT | The Object. |
2 | STRING | Release Type name or NONE or ALL |
Evaluation | The set of Accounts on the Object are examined. The outflow Supplies on those Accounts which link a different downstream Object and which have the indicated Release Type are considered. The names of the Destination Types of those Supplies are added to the returned list -- but any given Destination Type name will appear on the list only once. If the Release Type argument is NONE, then only Supplies having the default (unassigned) Release Type are considered. If the Release Type argument is ALL, then that attribute is ignored when considering Supplies. | |
Comments | Destination Type and Release Types are properties of Supplies. The returned list can include the default (NONE) Destination Type. Supplies which represent internal flows between two Accounts on the Object are not considered. |
Description | Returns the number of dispatch method executions that have occurred since the beginning of the current run. | |
Type | NUMERIC | |
Arguments | none | |
Comments | Returns the number of dispatch method executions that have occurred since the beginning of the current run, if called during a dispatching run (Simulation or Rulebased Simulation). Otherwise, returns the total number of dispatch executions in the previous dispatching run. |
Description | The last dispatch timestep. | |
Type | DATETIME | |
Arguments | none | |
Evaluation | Returns the DATETIME that is the last timestep at which the current controller allows dispatching. If this function is called from a context in which the current controller does not have a last dispatch timestep (i.e. optimization), then the end date of the run is returned. | |
Comments | The Number of Post-Run Dispatch Timesteps is set on the Run Control Parameters dialog for Simulation or Rulebased Simulation. See Number of Post-Run Dispatch Timesteps (Simulation) and Number of Post-Run Dispatch Timesteps (RBS) in User Interface for details on changing the Number of Post-Run Dispatch Timesteps. |
Description | Returns the accumulated time spent executing dispatch methods since the beginning of the current run. | |
Type | NUMERIC | |
Arguments | none | |
Comments | Returns the accumulated time spent executing dispatch methods since the beginning of the current run, if called during a dispatching run (Simulation or Rulebased Simulation). Otherwise, returns the total time spent executing dispatch methods in the previous dispatching run |
Description | Integer division of two numbers. | |
Type | NUMERIC | |
Arguments | Type | Meaning |
1 | NUMERIC | the numerator |
2 | NUMERIC | the units to which to convert the numerator |
3 | NUMERIC | the denominator |
4 | NUMERIC | the units to which to convert the denominator |
Evaluation | Converts numerator and denominator into the specified units, then returns the integral division of the converted values, where integral division of x and y is defined as: | |
Comments | If the denominator is equal to zero, this function aborts the run with an error. Each of the units arguments must have units which are compatible with the value with which they are associated, otherwise the run is aborted with an error. This function does not use the scalar portion of either of the units arguments. |
Description | Find the surface area corresponding to a reservoir’s elevation. | |
Type | NUMERIC | |
Arguments | Type | Meaning |
1 | OBJECT | reservoir object |
2 | NUMERIC | pool elevation |
Evaluation | The pool elevation argument is looked up in the Pool Elevation column, of the Elevation Area Table, of the reservoir object argument, to determine the Surface Area. If the exact elevation is not in the table, the lookup performs a linear interpolation between the two nearest bounding elevations and their corresponding surface areas. | |
Mathematical Expression | ||
Comments | If the object is not a reservoir, or the reservoir does not have an Elevation Area Table, the function aborts the run with an error (CRSSEvaporationCalc, DailyEvaporationCalc, PanAndIceEvaporation, or InputEvaporation must be selected as the Evaporation and Precipitation Category selected Method. This function will issue an error if the Time Varying Elevation Area method is selected (see Time Varying Elevation Area in Objects and Methods). Instead, use the ElevationToAreaAtDate function (see ElevationToAreaAtDate). |
Description | Find the surface area corresponding to a reservoir’s elevation. | |
Type | NUMERIC | |
Arguments | Type | Meaning |
1 | OBJECT | reservoir object |
2 | NUMERIC | pool elevation |
3 | DATETIME | the datetime at which to do the conversion |
Evaluation | On the specified reservoir object argument, if the Time Varying Elevation Area method is selected (see Time Varying Elevation Area in Objects and Methods), the function will reference the Elevation Area Table Time Varying table (see Elevation Area Table Time Varying in Objects and Methods). The function will select the appropriate column to use based on the datetime argument. On timesteps that exactly match a modification date, the previous column is used. The relationship changes only at the end of that timestep and is taken into account when the reservoir dispatches. For this algorithm the previous column relationship is used. Otherwise, the Elevation Area Table is used and the datetime is ignored. Then, the pool elevation argument is looked up in the Pool Elevation column to determine the Surface Area from the appropriate Surface Area column. If the exact elevation is not in the table, the lookup performs a linear interpolation between the two nearest bounding elevations and their corresponding surface areas. | |
Mathematical Expression | ||
Comments | If the object is not a reservoir, or the reservoir does not have an Elevation Area Table or Elevation Area Table Time Varying, the function aborts the run with an error (i.e. a method must be selected in the Evaporation and Precipitation Category). |
Description | Find the maximum regulated spill at a given reservoir elevation. | |
Type | NUMERIC | |
Arguments | Type | Meaning |
1 | OBJECT | reservoir object |
2 | NUMERIC | pool elevation |
3 | DATETIME | datetime context for unit conversions |
Evaluation | The pool elevation argument is looked up in the Pool Elevation column, of the Regulated Spill Table, of the reservoir object argument, to determine the Max Regulated Spill. If the exact elevation is not in the table, the lookup performs a linear interpolation between the two nearest bounding elevations and their corresponding maximum regulated spills. | |
Mathematical Expression | ||
Comments | If the object is not a reservoir, or the reservoir does not have a Regulated Spill Table, the function aborts the run with an error (Regulated; Regulated and Unregulated; Regulated and Bypass; Regulated, Bypass and Unregulated; or Bypass, Regulated and Unregulated must be the Spill category selected method). |
Description | Find the reservoir storage at a given elevation. | |
Type | NUMERIC | |
Arguments | Type | Meaning |
1 | OBJECT | reservoir object |
2 | NUMERIC | pool elevation |
Evaluation | The pool elevation argument is looked up in the Pool Elevation column, of the Elevation Volume Table, of the reservoir object argument to determine the Storage. If the exact elevation is not in the table, the lookup performs a linear interpolation between the two nearest bounding elevations and their corresponding storage values. | |
Mathematical Expression | ||
Comments | If the object is not a reservoir, the function aborts the run with an error. If the reservoir is a Slope Power Reservoir, the calculation is based only on level storage and does not include any wedge storage effects. This function will issue an error if the Time Varying Elevation Volume method is selected (see Time Varying Elevation Volume in Objects and Methods). Instead, use the ElevationToStorageAtDate function described next. |
Description | Find the volume corresponding to a reservoir’s elevation. | |
Type | NUMERIC | |
Arguments | Type | Meaning |
1 | OBJECT | reservoir object |
2 | NUMERIC | pool elevation |
3 | DATETIME | the datetime at which to do the conversion |
Evaluation | On the specified reservoir object argument, if the Time Varying Elevation Volume method is selected, the function will reference the Elevation Volume Table Time Varying table. The function will select the appropriate column to use based on the datetime argument. On timesteps that exactly match a modification date, the previous column is used. The relationship changes at the end of that timestep and is taken into account when the reservoir dispatches. For this algorithm, the previous column relationship is used. Otherwise, the Elevation Volume Table is used and the datetime is ignored. Then, the pool elevation argument is looked up in the Pool Elevation column to determine the Volume from the appropriate column. If the exact elevation is not in the table, the lookup performs a linear interpolation between the two nearest bounding elevations and their corresponding surface areas. | |
Mathematical Expression | ||
Comments | If the object is not a reservoir, or the reservoir does not have an Elevation Volume Table or Elevation Volume Table Time Varying, the function aborts the run with an error. |
Description | Find the unregulated spill at a given reservoir elevation. | |
Type | NUMERIC | |
Arguments | Type | Meaning |
1 | OBJECT | reservoir object |
2 | NUMERIC | pool elevation |
3 | DATETIME | datetime context for unit conversions |
Evaluation | The pool elevation argument is looked up in the Pool Elevation column, of the Unregulated Spill Table, of the reservoir object argument, to determine the Unregulated Spill. If the exact elevation is not in the table, the lookup performs a linear interpolation between the two nearest bounding elevations and their corresponding unregulated spills. | |
Mathematical Expression | ||
Comments | If the object is not a reservoir, or the reservoir does not have an Unregulated Spill Table, the function aborts the run with an error (Unregulated; Regulated and Unregulated; Regulated, Bypass and Unregulated; or Bypass, Regulated and Unregulated must be the Spill selected method). |
Description | Exponentiation of a dimensionless quantity. | |
Type | NUMERIC | |
Arguments | Type | Meaning |
1 | NUMERIC | the operand |
2 | NUMERIC | the exponent |
Evaluation | Returns the result of exponentiating the operand to the power given by the exponent. The return value is dimensionless (has no units). | |
Comments | The exponent is not restricted to being an integer (as with the "^" operator), but it is an error for the operand to have units. |
Description | Filter a list of objects to include only objects of the specified types. | |
Type | LIST {OBJECT} | |
Arguments | Type | Meaning |
1 | LIST | list of objects |
2 | LIST | list of object types to include, where each object type is expressed as a STRING. |
Evaluation | The list of object types to include is parsed and mapped to RiverWare object types. Then, the list of objects is evaluated in order, and each object which is one of the requested object types is added to the returned list.The spellings and capitalization of objects can be found in the Subbasin Manager under the Automatic tab. | |
Mathematical Expression | ||
Comments | The order of objects is preserved from the argument object list to the returned object list. The list arguments may contain any number of items. If either of the arguments is an empty list, the function evaluates to an empty list. |
Description | This function takes a list and replaces any lists contained within that list with the individual items from those lists. | |
Type | NUMERIC | |
Arguments | Type | Meaning |
1 | LIST | the list to be flattened |
Evaluation | For each item in the input list, if the item is not a list, it is appended to the answer list, if it is a list, then it is flattened and then all of its items are appended to the answer list in turn. | |
Comments |
Description | Invokes computational subbasin’s selected Flood Control method. | |
Type | LIST { LIST { SLOT, NUMERIC, OBJECT } } | |
Arguments | Type | Meaning |
1 | STRING | the name of the computational subbasin |
Evaluation | Runs the selected Flood Control method on the subbasin. Returns a list of { slot, value, object } sets. For each reservoir in the subbasin, three sets may be returned: one for the Outflow slot, one for the Flood Control Release slot on the reservoir, and one for the Target Balance Level on the reservoir. | |
Comments | The calling rule is expected to make the assignments of the values to the slots. Typically, this function should be called only once per timestep. To constrain this, use the following as an execution constraint: NOT(HasRuleFiredSucessfully("This Rule") ) See Low-flow Releases in USACE‑SWD Modeling Techniques for details on using this function for USACE-SWD. |
Description | The floor numeric operation, to a multiple of a factor. | |
Type | NUMERIC | |
Arguments | Type | Meaning |
1 | NUMERIC | the value |
2 | NUMERIC | the factor |
Evaluation | Converts the value into the units of the factor, then returns the largest integral multiple of the factor which is not greater than the converted value. The returned value has the units of the factor. | |
Comments | If the scalar portion of the factor is 1.0, then this function simply returns the floor of the value expressed in the units of the factor. If the two arguments are of a different unit type, this function aborts the run with an error. See also Ceiling and RoundToFactor. |
Description | The volume of water resulting from a steady flow over a timestep. | |
Type | NUMERIC | |
Arguments | Type | Meaning |
1 | NUMERIC | constant flow to be converted |
2 | DATETIME | timestep over which to convert |
Evaluation | The number of seconds in the timestep of the datetime argument is determined. Then, the flow argument is multiplied by this number of seconds. Returns value in units of volume. | |
Mathematical Expression | ||
Comments | If the flow argument is entered in units containing a "/month" component, it is scaled to reflect the length of the month indicated by the timestep argument before being multiplied by this timestep length. When called from a series slot with expression, the flow to volume conversion uses the run timestep size, which may differ from the expression slot timestep size. (This is different from the VolumeToFlow function, which uses the expression slot timestep size for the conversion.) |
Description | The fractional remainder after division. | |
Type | NUMERIC | |
Arguments | Type | Meaning |
1 | NUMERIC | the numerator |
2 | NUMERIC | the denominator |
Evaluation | Converts the numerator into the units of the denominator, divides the result by the denominator, then returns the fractional portion of the division. In other words: The returned value has the units of factor. | |
Comments | If the scalar portion of the denominator is 1.0, then this function simply returns the fractional portion of the first argument when it is expressed in the units of the denominator. If the values are of a different unit type, this function aborts the run with an error. |
Description | Return the contents of a Table Slot that is structured for 3D table interpolation. | |
Type | LIST{LIST {NUMERIC LIST{NUMERIC} LIST{NUMERIC}}} | |
Arguments | Type | Meaning |
1 | SLOT | the table slot whose values are to be returned. |
2 | NUMERIC | z column index (zero-based) |
3 | NUMERIC | x column index (zero-based) |
4 | NUMERIC | y column index (zero-based) |
Evaluation | Returns the contents of a 3D table as a list of the table values associated with successive z value. For each distinct z value in the table slot, the returned list contains a sublist with the following values: 1. Current z value 2. List of x values associated with the current z value 3. List of y values associated with the current z value | |
Comments | Units are not required for row and column indices and, if provided, will be ignored. In the context of rulebased simulation, if one of the slot’s values is NaN, the function exits the rule with an early termination. |
Operating Head (m) | Turbine Release (cms) | Power (HP) |
---|---|---|
320 | 0.00 | 0 |
320 | 120.32 | 470 |
340 | 5.00 | 10 |
340 | 127.32 | 500 |
Description | Return the contents of a Table Slot that is structured for 3D table interpolation. | |
Type | LIST{LIST {NUMERIC LIST{NUMERIC} LIST{NUMERIC}}} | |
Arguments | Type | Meaning |
1 | SLOT | the table slot whose values are to be returned. |
2 | NUMERIC | z column index (zero-based) |
3 | NUMERIC | x column index (zero-based) |
4 | NUMERIC | y column index (zero-based) |
Evaluation | Returns the contents of a 3D table as a list of the table values associated with successive z value. For each distinct z value in the table slot, the returned list contains a sublist with the following values: 1. The current z value 2. The list of x values associated with the current z value 3. The list of y values associated with the current z value | |
Comments | Units are not required for row and column indices and, if provided, will be ignored. In the context of rulebased simulation, if one of the slot’s values is NaN, all values in that row and rows below it are ignored. |
Operating Head (m) | Turbine Release (cms) | Power (HP) |
---|---|---|
320 | 0.00 | 0 |
320 | 120.32 | 470 |
340 | 5.00 | 10 |
340 | 127.32 | 500 |
NaN | NaN | NaN |
Description | Return the name of a slot’s account. | |
Type | STRING | |
Arguments | Type | Meaning |
1 | SLOT | The slot whose account is returned. |
Comments | It is an error if the slot is not on an account. |
Description | The names of all user defined subbasins in the current model, expressed as strings. | |
Type | LIST {STRING} | |
Arguments | none | |
Evaluation | The function first retrieves a list of all defined subbasins in the model, then filters out any automatic subbasins (object type basins generated by RiverWare). | |
Comments | If there are no user defined subbasins in the model, this function evaluates to an empty list. |
Description | Get a column map value from a periodic slot given a date and a value. This is the inverse of the way values are usually accessed in periodic slots with column maps (i.e., given a date and column map value, find the corresponding slot value). | |
Type | NUMERIC | |
Arguments | Type | Meaning |
1 | SLOT | The periodic slot to be accessed. |
2 | DATETIME | The date to be used to index into the time dimension of the Periodic Slot (its row map). |
3 | NUMERIC | The value to use for the lookup, having the same type of units as the values in the periodic slot itself. |
Evaluation | If the default access method for the table is lookup, then we first find the row whose associated time interval contains the input date. We then find the two consecutive values in that row whose values bracket the input value. We then find the column map values associated with these two values, and return a value interpolated between them according to where the input value falls between its two bracketing values. If the default access method is interpolation then the procedure described above is followed for the row whose time interval follows the given date, and the return value is interpolated between the values found for the two rows. | |
Comments | The input slot must be a periodic slot with a column map, the numeric value must have units compatible with the units of the periodic slot, for the relevant time intervals, the slot values must be either a monotonically non-decreasing or monotonically non-increasing function of the column map values, and the input value must fall within the domain of that function. If there are multiple possible return values, i.e., if the input value appears for multiple columns, then the largest column map value is returned. |
Description | The index of the table slot or agg. series slot column whose name matches a string. | |
Type | NUMERIC | |
Arguments | Type | Meaning |
1 | SLOT | the table slot or agg. series slot in which to find a column |
2 | STRING | the name of the column to match |
Evaluation | The labels of the slot columns are compared to the string argument until a match is found. | |
Comments | Slot column and row indices are zero based and have units of type [NONE]. If the specified slot is not a table slot or agg. series slot, or the specified string is not the label of a column on the slot, this function aborts the run with an error. If several columns of the slot match the string argument, this function evaluates to the index of the left-most matching column. The matching process treats sequences of white space characters as a blank; for example, the input string “ ab c “ will match a column with the label “ab c.” This allows the method to match labels that are displayed on multiple lines because they contain a carriage return character. |
Description | Interpret a string as a date. | |
Type | DATETIME | |
Arguments | Type | Meaning |
1 | STRING | Textual representation of a date/time. |
Evaluation | Returns the date which corresponds to the input text. Legal text is the same as is legal for symbolic date/times. For example, the expression: GetDate("January 1, Current Year") is exactly equivalent to the expression: @"January 1, Current Year". |
Description | Generate a list of datetimes between two datetimes at a given interval. | |
Type | LIST {DATETIME} | |
Arguments | Type | Meaning |
1 | DATETIME | starting datetime |
2 | DATETIME | ending datetime |
3 | STRING | string representation of a datetime interval expressed as an integer, a space, and a time unit. |
Evaluation | The starting datetime and ending datetime; which may be specified symbolically, are converted into actual datetimes. The string representation of the interval is resolved into a time length. Then, a list is created beginning with the starting datetime. The time length is added to each previous datetime in the list until the resulting datetime is later than the ending datetime. | |
Mathematical Expression | ||
Comments | If the ending date is before the starting date, the function evaluates to an empty list. If the ending date is equal to the starting date, or if the time interval is larger than the interval between the starting and ending dates, the function evaluates to a list which only contains the start date. The accepted datetime interval units are: • hours or Hours • days or Days • weeks or Weeks • months or Months • years or Years |
Description | Generate a list of datetimes separated by a given interval, and centered at a given date. If desired, dates not within the run duration are filtered out of the list. | |
Type | LIST {DATETIME} | |
Arguments | Type | Meaning |
1 | DATETIME | center datetime |
2 | NUMERIC | number of dates to return in the list |
3 | STRING | string representation of a datetime interval expressed as an integer, a space, and a time unit |
3 | BOOLEAN | whether to limit return dates to those within the run |
Evaluation | The center datetime, which may be specified symbolically, is converted into an actual datetime. The string representation of the interval is resolved into a time length. Then a list is created with the given number of dates, each separated by the given time interval. The center date is always included in this list, with an equal number of dates appearing before and after it (in the case of an odd number of dates). If their are an even number of dates, then there is one more date appearing before the center date than appear after. After the list has been created, if the user has specified that they only want dates within the run duration, then all other dates are filtered out of the return list. | |
Mathematical Expression | ||
Comments | The accepted datetime interval units are: • hours or Hours • days or Days • weeks or Weeks • months or Months • years or Years |
Description | The day of the month as a unit of time. | |
Type | NUMERIC | |
Arguments | Type | Meaning |
1 | DATETIME | the datetime whose day of month to determine |
Evaluation | The datetime argument; which may be specified symbolically, is converted into an actual datetime. Then, the day of the month in which the datetime is, is determined. This function requires that the datetime be at least partially specified with a valid month and day, E.g. @"January 1" or @"Current Month 23" will work. | |
Comments | When displayed, the return value will be displayed according to the active unit scheme’s time unit type rule. For example, if the active unit scheme displays Time values as Hours, then the return value for @”January 2” will be displayed as 48 “hours”. To convert the return value into a dimensionless value representing the number of days, divide it by 1 “day”. As elsewhere in RiverWare 24:00 hours is considered to be the day which is ending, and 00:00 hours is considered to be the day which is just beginning. |
Description | The day of the year as a one-based integer in units of time. | |
Type | NUMERIC | |
Arguments | Type | Meaning |
1 | DATETIME | the datetime whose day of the year to determine |
Evaluation | The datetime argument; which may be specified symbolically, is converted into an actual datetime. Then, the day of the year in which the datetime is contained, is determined. This function requires that the specified datetime resolve to a fully specified datetime or an error will occur. | |
Comments | When displayed, the return value will be displayed according to the active unit scheme’s time unit type rule. For example, if the active unit scheme displays Time values as Hours, then the return value for @”January 2” will be displayed as 48 “hours”. To convert the return value into a dimensionless value representing the number of days, divide it by 1 “day”. As elsewhere in RiverWare, 24:00 hours is considered to be the day which is ending, and 00:00 hours is considered to be the day which is just beginning. |
Description | The number of days in the month in units of time. | |
Type | NUMERIC | |
Arguments | Type | Meaning |
1 | DATETIME | the datetime of any time within the month |
Evaluation | The datetime argument; which may be specified symbolically, is converted into an actual datetime. Then, the number of days in the month in which the datetime is contained, is determined. This function requires that the specified datetime resolve to a fully specified datetime or an error will occur. | |
Comments | When displayed, the return value will be displayed according to the active unit scheme’s time unit type rule. For example, if the active unit scheme displays Time values as Hours, then the return value for @”January 2” will be displayed as 744 “hours”. To convert the return value into a dimensionless value representing the number of days, divide it by 1 “day”. As elsewhere in RiverWare, 24:00 hours is considered to be the day which is ending, and 00:00 hours is considered to be the day which is just beginning. |
Description | This function takes a series or periodic slot and a date and returns the value of the slot at the given date, in units based on the display scale and units for that slot. | |
Type | NUMERIC | |
Arguments | Type | Meaning |
1 | SLOT | the series or periodic slot whose value is to be returned |
2 | DATETIME | the datetime of the value to be returned |
Evaluation | ||
Comments | The function returns an error and aborts the run if the input slot is not a series or periodic slot, if the date is not fully specified, or if the date is not contained in the series. |
Description | This function takes an agg series slot or periodic slot, a date, and a column, and returns the value of the slot in the given column and at the given date, in units based on the display scale and units for that slot. | |
Type | NUMERIC | |
Arguments | Type | Meaning |
1 | SLOT | the series or periodic slot whose value is to be returned |
2 | DATETIME | the datetime of the value to be returned |
3 | NUMERIC | the column, interpreted as a 0-based integral index |
Evaluation | The function returns and error and aborts the run if the input slot is not of an appropriate type, if the date is not fully specified, or if the date is not contained in the series. |
Description | Return the name of an element in an aggregate object, without the name of the object’s name prepended. | |
Type | STRING | |
Arguments | Type | Meaning |
1 | OBJECT | the element of an aggregate object (e.g., a WaterUser within an AggDiversionSite) whose name is to be returned. |
Evaluation | The function returns the name of the element object. | |
Comments | This function returns only the name of the element itself, without the name of the parent aggregate object. If the full name is desired, then one may use the built-in RPL operation STRINGIFY. If the object argument is not an element of an aggregate object, then the run is aborted with an error. |
Description | Return the value for a trace keyword for the current trace executing in a run. | |
Type | STRING | |
Arguments | Type | Meaning |
1 | STRING | the name of a trace metadata keyword. |
Evaluation | The function returns the value for the trace keyword for the currently executing run. | |
Comments | If the function is called outside of a run or if the trace metadata keyword cannot be found, then the function fails. This function would typically be called during a multiple run when input ensembles are used in the MRM configuration. If a single trace is configured for an ensemble dataset to use outside of a multiple run and a DMI with this dataset is invoked during a single run, the metadata for that trace would also be available to query. |
Description | Return the value for an ensemble keyword for the current run. | |
Type | STRING | |
Arguments | Type | Meaning |
1 | STRING | the name of an ensemble metadata keyword. |
Evaluation | The function returns the value for the ensemble keyword for the currently executing run. | |
Comments | If the function is called outside of a run or if the ensemble metadata keyword cannot be found, then the function fails. This function would typically be called during a multiple run when input ensembles are used in the MRM configuration. If a single trace is configured for an ensemble dataset to use outside of a multiple run and a DMI with this dataset is invoked during a single run, the metadata for that ensemble would also be available to query. |
Description | Get the value for the slot at the specified timestep for the given trace from the ensemble data set. | |
Type | NUMERIC | |
Arguments | Type | Meaning |
1 | OBJECT | The ensemble data set. This must be an ensemble data set of type “RDF File”. |
2 | SLOT | The simulation slot for which to get the trace value. Note, this is the workspace slot not the ensemble data set slot. |
3 | DATETIME | The datetime at which to get the value. |
4 | NUMERIC | The trace number. |
Evaluation | On the given ensemble data set, the function locates the appropriate trace for the given slot. Then it returns the slot’s value at the given datetime. | |
Comments | For more information on Ensemble Data Sets and the Ensemble Data Tool, see Ensemble Data Tool in Solution Approaches. |
Description | The Julian date of the timestep in units of NONE. | |
Type | NUMERIC | |
Arguments | Type | Meaning |
1 | DATETIME | the datetime whose Julian date to evaluate to |
Evaluation | The datetime argument; which may be specified symbolically, is converted into an actual datetime. Then, the Julian date of this timestep is determined. This function requires that the specified datetime resolve to a fully specified datetime or an error will occur. | |
Comments | Julian Dates are represented as the number of days from noon GMT on January 1, 4713 B.C. (47120101 12:00 P.M. GMT). Julian Dates in RiverWare also include the decimal fraction of the day down to 0.00001, the equivalent of 1 second. |
Description | Given a slot, returns a list of the Objects which contain the slots to which the input slot is linked. | |
Type | LIST {OBJECT} | |
Arguments | Type | Meaning |
1 | SLOT | the slots whose links are to be explored |
Evaluation | For each slot to which the input slot is linked, we determine if that slot is managed by a Objects; if so, it is added to the return list. Thus, an empty list is returned if the slot is not linked to any slots on a Objects. | |
Comments | It is considered an error if the input slot is not a Series Slot. |
Description | Returns the lower bound for the specified series slot | |
Type | NUMERIC | |
Arguments | Type | Meaning |
1 | SLOT | the slot whose bound is to be returned. |
Evaluation | ||
Comments | It is considered an error if the specified slot is not a Series Slot with a valid lower bound. The lower bound is specified in the slot configuration. |
Description | Returns the lower bound for the column of the specified agg series slot. | |
Type | NUMERIC | |
Arguments | Type | Meaning |
1 | SLOT | the agg series slot whose bound is to be returned. |
2 | NUMERIC | the column index (0-based). |
Evaluation | ||
Comments | It is considered an error if the input slot is not an Agg Series Slot with a valid lower bound for the given column. The lower bound is specified in the slot configuration. |
Description | The maximum combined outflow of a reservoir, including outlet works or turbine release, and any possible regulated, unregulated, and/or bypass spills. | |
Type | NUMERIC | |
Arguments | Type | Meaning |
1 | OBJECT | the reservoir object for which to calculate |
2 | NUMERIC | the given pool elevation; at the end of the specified timestep |
3 | DATETIME | the timestep at which to calculate |
Evaluation | • Unit Generator Power: The turbine release is the sum of the maximum releases for each available turbine, as specified in the Generators Available and Limit table. Each turbine’s maximum release is determined from a table interpolation in the Full Generator Flow table using the operating head as the lookup in the appropriate unit type’s Head for Type n column. If the average pool elevation is less than the Minimum Power Elevation, the turbine release is zero. • Peak Power Equation with Off Peak Spill: The turbine release is the peak release over the entire timestep. This is calculated by iterating the selected Tailwater method and operating head calculation with a table interpolation in the Operating Head vs. Generator Capacity table. • Peak Power and Peak and Base: The turbine release is the peak flow over the entire timestep. This is calculated by iterating the selected Tailwater method and operating head calculation with a table interpolation in the Best Generator Flow table using the operating head as the lookup in the Head for Type 1 column. • LCRPowerCalc: Because this power method has no turbine release limit, a maximum outflow cannot be calculated. RiverWare issues an error message and aborts the execution of this rule. • Unregulated Spill (if an Unregulated Spill method is selected on the object): The maximum unregulated spill is determined from a table interpolation in the Unregulated Spill Table using the average pool elevation as the Pool Elevation. • Regulated Spill (if a Regulated Spill method is selected on the object): If the Regulated Spill slot is specified by the user (I, Z or R flag), the specified value is used as the maximum regulated spill. Otherwise the maximum regulated spill is determined from a table interpolation in the Regulated Spill Table using the average pool elevation in the Pool Elevation column. Note: If the MonthlySpill method is selected, the result of GetMaxOutflowGivenInflow is the value in the Maximum Controlled Release table slot. • Bypass (if a Bypass Spill method is selected on the object): If the Bypass slot is specified by the user (I, Z or R flag), the specified value is used as the maximum bypass. Otherwise the maximum bypass is determined from a table interpolation in the Bypass Table using the average pool elevation. All of the individual outflows are then summed to calculate the maximum outflow. • Spill: If the Spill slot is specified by the user (I, Z or R flag), the specified value is used as the maximum spill. The individual outflows are then summed to calculate the maximum outflow. | |
Mathematical Expression | ||
Comments | The Tailwater Base Value is automatically added as a dependency to the calling rule. |
Description | The maximum combined outflow of a reservoir, including outlet works or turbine release, and any possible regulated, unregulated, and/or bypass spills. | |
Type | NUMERIC | |
Arguments | Type | Meaning |
1 | OBJECT | the reservoir object for which to calculate |
2 | NUMERIC | the average inflow over the timestep, often the reservoir’s inflow slot value |
3 | DATETIME | the timestep at which to calculate |
Evaluation | A convergence algorithm is used in this function; see Reservoir Convergence in Objects and Methods for details. The function iterates to convergence by computing the end of timestep storage and pool elevation, the average pool elevation over the timestep, and the following outflows: • Release (if the object is a StorageReservoir): The maximum release is determined from a table interpolation in the Max Release table using the average pool elevation as the lookup in the Pool Elevation column. • Turbine Release (if the object is a LevelPowerReservoir or SlopePowerReservoir): The maximum turbine release is determined based on the selected Power method. This calculation is iterative, since the maximum outflow impacts the reservoir tailwater elevation and operating head, which affect the maximum turbine release. The selected Tailwater method is used to determine the tailwater elevation. • No Power Turbine Flow: The turbine release is determined from a table interpolation in the Max Flow Through Turbines table using the average pool elevation as the lookup in the Reservoir Elevation column. • Plant Power Coefficient: The turbine release is determined from a table interpolation in the Max Turbine Q table using the operating head as the lookup in the Operating Head column. If the average pool elevation is less than the Minimum Power Elevation, the turbine release is zero. • Plant Efficiency Curve: The turbine release is determined from a table interpolation in the Auto Max Turbine Q table using the operating head as the lookup in the Operating Head column. If the average pool elevation is less than the Minimum Power Elevation, the turbine release is zero. • Unit Generator Power: The turbine release is the sum of the maximum releases for each available turbine, as specified in the Generators Available and Limit table. Each turbine’s maximum release is determined from a table interpolation in the Full Generator Flow table using the operating head as the lookup in the appropriate unit type’s Head for Type n column. If the average pool elevation is less than the Minimum Power Elevation, the turbine release is zero. • Peak Power Equation with Off Peak Spill: The turbine release is the peak release over the entire timestep. This is calculated by iterating the selected Tailwater method and operating head calculation with a table interpolation in the Operating Head vs. Generator Capacity table. • Peak Power and Peak and Base: The turbine release is the peak flow over the entire timestep. This is calculated by iterating the selected Tailwater method and operating head calculation with a table interpolation in the Best Generator Flow table using the operating head as the lookup in the Head for Type 1 column. • LCRPowerCalc: Because this power method has no turbine release limit, a maximum outflow cannot be calculated. RiverWare issues an error message and aborts the execution of this rule. | |
• Unregulated Spill (if an Unregulated Spill method is selected on the object): The maximum unregulated spill is determined from a table interpolation in the Unregulated Spill Table using the average pool elevation as the Pool Elevation. • Regulated Spill (if a Regulated Spill method is selected on the object): If the Regulated Spill slot is specified by the user (I, Z or R flag), the specified value is used as the maximum regulated spill. Otherwise the maximum regulated spill is determined from a table interpolation in the Regulated Spill Table using the average pool elevation in the Pool Elevation column. Note: If the MonthlySpill method is selected, the result of GetMaxOutflowGivenInflow is the value in the Maximum Controlled Release table slot. • Bypass (if a Bypass Spill method is selected on the object): If the Bypass slot is specified by the user (I, Z or R flag), the specified value is used as the maximum bypass. Otherwise the maximum bypass is determined from a table interpolation in the Bypass Table using the average pool elevation. in the Pool Elevation column. • Spill: If the Spill slot is specified by the user (I, Z or R flag), the specified value is used as the maximum spill. Once the iteration has converged on an ending storage and pool elevation, all of the individual outflows are summed to calculate the maximum outflow | ||
Mathematical Expression | ||
Comments | This function takes into account the following sources and sinks automatically, and thus they should not be included in the inflow value for Argument 2. • The Evaporation and Precipitation category selected Method. • The Bank Storage category selected Method. • The Seepage category selected Method. • Side inflows including: Inflow 2 (Slope Power Reservoir only), Hydrologic Inflow Net, Diversion, Return Flow, Canal Flow, Flow FROM Pumped Storage, and Flow TO Pumped Storage. These slots in addition to Tailwater Base Value are automatically added as dependencies to the calling rule. |
Description | The maximum combined outflow of a reservoir, including outlet works or turbine release, and any possible regulated, unregulated, and/or bypass spills. | |
Type | NUMERIC | |
Arguments | Type | Meaning |
1 | OBJECT | the reservoir object for which to calculate |
2 | NUMERIC | the given storage, at the end of the specified timestep |
3 | DATETIME | the timestep at which to calculate |
Evaluation | The ending pool elevation is determined from the ending storage in argument 2 and is averaged with the previous timestep’s ending Pool Elevation to yield an average pool elevation over the timestep. The average pool elevation is then used to compute the following outflows: • Release (if the object is a StorageReservoir): The maximum release is determined from a table interpolation in the Max Release table using the average pool elevation as the lookup in the Pool Elevation column. • Turbine Release (if the object is a LevelPowerReservoir or SlopePowerReservoir): The maximum turbine release is determined based on the selected Power method. This calculation is iterative, since the maximum outflow impacts the reservoir tailwater elevation and operating head, which affect the maximum turbine release. The selected Tailwater method is used to determine the tailwater elevation. • No Power Turbine Flow: The turbine release is determined from a table interpolation in the Max Flow Through Turbines table using the average pool elevation as the lookup in the Reservoir Elevation column. • Plant Power Coefficient: The turbine release is determined from a table interpolation in the Max Turbine Q table using the operating head as the lookup in the Operating Head column. If the average pool elevation is less than the Minimum Power Elevation, the turbine release is zero. • Plant Efficiency Curve: The turbine release is determined from a table interpolation in the Auto Max Turbine Q table using the operating head as the lookup in the Operating Head column. If the average pool elevation is less than the Minimum Power Elevation, the turbine release is zero. • Unit Generator Power: The turbine release is the sum of the maximum releases for each available turbine, as specified in the Generators Available and Limit table. Each turbine’s maximum release is determined from a table interpolation in the Full Generator Flow table using the operating head as the lookup in the appropriate unit type’s Head for Type n column. If the average pool elevation is less than the Minimum Power Elevation, the turbine release is zero. • Peak Power Equation with Off Peak Spill: The turbine release is the peak release over the entire timestep. This is calculated by iterating the selected Tailwater method and operating head calculation with a table interpolation in the Operating Head vs. Generator Capacity table. • Peak Power and Peak and Base: The turbine release is the peak flow over the entire timestep. This is calculated by iterating the selected Tailwater method and operating head calculation with a table interpolation in the Best Generator Flow table using the operating head as the lookup in the Head for Type 1 column. • LCRPowerCalc: Because this power method has no turbine release limit, a maximum outflow cannot be calculated. RiverWare issues an error message and aborts the execution of this rule. • Unregulated Spill (if an Unregulated Spill method is selected on the object): The maximum unregulated spill is determined from a table interpolation in the Unregulated Spill Table using the average pool elevation as the Pool Elevation. • Regulated Spill (if a Regulated Spill method is selected on the object): If the Regulated Spill slot is specified by the user (I, Z or R flag), the specified value is used as the maximum regulated spill. Otherwise the maximum regulated spill is determined from a table interpolation in the Regulated Spill Table using the average pool elevation in the Pool Elevation column. Note: If the MonthlySpill method is selected, the result of GetMaxOutflowGivenInflow is the value in the Maximum Controlled Release table slot. | |
Evaluation (continued) | • Bypass (if a Bypass Spill method is selected on the object): If the Bypass slot is specified by the user (I, Z or R flag), the specified value is used as the maximum bypass. Otherwise the maximum bypass is determined from a table interpolation in the Bypass Table using the average pool elevation. All of the individual outflows are then summed to calculate the maximum outflow. • Spill: If the Spill slot is specified by the user (I, Z or R flag), the specified value is used as the maximum spill. The individual outflows are summed to calculate the maximum outflow. | |
Mathematical Expression | ||
Comments | The Tailwater Base Value is automatically added as a dependency to the calling rule. This function will issue an error if the Time Varying Elevation Volume method is selected (see Time Varying Elevation Volume in Objects and Methods) and the specified timestep is a modification date on the table. |
Description | The maximum release of a reservoir, through outlet works or turbine release. | |
Type | NUMERIC | |
Arguments | Type | Meaning |
1 | OBJECT | the reservoir object for which to calculate |
2 | NUMERIC | the average inflow over the timestep |
3 | DATETIME | the timestep at which to calculate |
Evaluation | A convergence algorithm is used in this function; see Reservoir Convergence in Objects and Methods for details. The function iterates to convergence by computing the end of timestep storage and pool elevation, the average pool elevation over the timestep, and the release: • Release (if the object is a StorageReservoir): The maximum release is determined from a table interpolation in the Max Release table using the average pool elevation as the lookup in the Pool Elevation column. • Turbine Release (if the object is a LevelPowerReservoir or SlopePowerReservoir): The maximum turbine release is determined based on the selected Power method. This calculation is iterative, since the maximum outflow impacts the reservoir tailwater elevation and operating head, which affect the maximum turbine release. The selected Tailwater method is used to determine the tailwater elevation. • No Power Turbine Flow: The turbine release is determined from a table interpolation in the Max Flow Through Turbines table using the average pool elevation as the lookup in the Reservoir Elevation column. • Plant Power Coefficient: The turbine release is determined from a table interpolation in the Max Turbine Q table using the operating head as the lookup in the Operating Head column. If the average pool elevation is less than the Minimum Power Elevation, the turbine release is zero. • Plant Efficiency Curve: The turbine release is determined from a table interpolation in the Auto Max Turbine Q table using the operating head as the lookup in the Operating Head column. If the average pool elevation is less than the Minimum Power Elevation, the turbine release is zero. • Unit Generator Power: The turbine release is the sum of the maximum releases for each available turbine, as specified in the Generators Available and Limit table. Each turbine’s maximum release is determined from a table interpolation in the Full Generator Flow table using the operating head as the lookup in the appropriate unit type’s Head for Type n column. If the average pool elevation is less than the Minimum Power Elevation, the turbine release is zero. • Peak Power and Peak and Base: The turbine release is the peak flow over the entire timestep. This is calculated by iterating the selected Tailwater method and operating head calculation with a table interpolation in the Best Generator Flow table using the operating head as the lookup in the Head for Type 1 column. • Peak Power Equation with Off Peak Spill: The turbine release is the peak release over the entire timestep. This is calculated by iterating the selected Tailwater method and operating head calculation with a table interpolation in the Operating Head vs. Generator Capacity table. • LCRPowerCalc: Because this power Method has no turbine release limit, a maximum Outflow cannot be calculated. RiverWare issues an error message and aborts the execution of this rule. | |
Mathematical Expression | ||
Comments | This function takes into account the following sources and sinks automatically, and thus they should not be included in the inflow value for Argument 2. • The Evaporation and Precipitation category selected Method. • The Bank Storage category selected Method. • The Seepage category selected Method. • Side inflows including: Inflow 2 (Slope Power Reservoir only), Hydrologic Inflow Net, Diversion, Return Flow, Canal Flow, Flow FROM Pumped Storage, and Flow TO Pumped Storage. These slots in addition to Tailwater Base Value are automatically added as dependencies to the calling rule. |
Description | The minimum required spill through unregulated and regulated spillways. | |
Type | NUMERIC | |
Arguments | Type | Meaning |
1 | OBJECT | the reservoir object for which to calculate |
2 | NUMERIC | the average inflow over the timestep |
3 | NUMERIC | the average release over the timestep |
4 | DATETIME | the timestep at which to calculate |
Evaluation | This function calls the getMinSpillGivenInflowRelease() function on the given reservoir object at the given timestep, and provides it with the average inflow and release over the timestep. A convergence algorithm is used in this function; see Reservoir Convergence in Objects and Methods for details. The function iterates to convergence by computing the end of timestep storage and pool elevation, the average pool elevation over the timestep, and the spill: • unregulated spill: calculated from the Unregulated Spill Table based on the average Pool Elevation. See the spill method for more details on how this is computed • regulated and bypass spills: assumed to be zero unless input by the user, set by a rule, or if if Regulated Spill includes Closed Gate Overflow; if input or set by a rule, that specified value is used; if Closed Gate Overflow is included, it is calculated based on the updated average pool elevation at each iteration (see Closed Gate Overflow in Objects and Methods for details on how Closed Gate Overflow is calculated). • outflow: sum of the calculated spill and the release specified in the function. • pool elevation: solved for by mass balance using the specified inflow and calculated outflow. | |
Mathematical Expressions | ||
Comments | This function takes into account the following sources and sinks automatically, and thus they should not be included in the inflow value for Argument 2. • The Evaporation and Precipitation category selected Method. • The Bank Storage category selected Method. • The Seepage category selected Method. • Side inflows including: Inflow 2 (Slope Power Reservoir only), Hydrologic Inflow Net, Diversion, Return Flow, Canal Flow, Flow FROM Pumped Storage, and Flow TO Pumped Storage. These slots in addition to the previous timestep’s Pool Elevation and Storage are automatically added as dependencies to the calling rule. Since the function evaluation depends on these slots, any change to their values at the indicated timestep, may impact the function result. Caution should be used when calling this function if Regulated Spill or Bypass is an input or has been set by a rule. If the inflow and/or release given to the function, combined with the specified Regulated Spill and/or specified Bypass results in a max Regulated Spill or Bypass capacity that is less than the specified value, the function will issue an error. |
Description | The month number, base 1, in units of NONE. | |
Type | NUMERIC | |
Arguments | Type | Meaning |
1 | DATETIME | the datetime of any time within the month |
Evaluation | The datetime argument; which may be specified symbolically, is converted into an actual datetime. Then, the number of the month in which the datetime is contained, is determined. This function requires that the specified datetime resolve to at least a partially specified datetime in the “Month day, year” format with the month specified. | |
Comments | As elsewhere in RiverWare, 24:00 hours is considered to be the day which is ending, and 00:00 hours is considered to be the day which is just beginning. |
Description | The month name. | |
Type | STRING | |
Arguments | Type | Meaning |
1 | DATETIME | the datetime of any time within the month |
Evaluation | The datetime argument; which may be specified symbolically, is converted into an actual datetime. Then, the name of the month in which the datetime is in, is determined. This function requires that the specified datetime resolve to at least a partially specified datetime in the “Month day, year” format with the month specified. | |
Comments | As elsewhere in RiverWare, 24:00 hours is considered to be the day which is ending, and 00:00 hours is considered to be the day which is just beginning. |
Description | Returns a sequence of values in a given range with a given offset. | |
Type | LIST | |
Arguments | Type | Meaning |
1 | NUMERIC | the start value |
1 | NUMERIC | the end value |
1 | NUMERIC | the offset |
Evaluation | The end value and offset are converted into the units of the start value. A list is created whose first item is the start value, the second item is the start value plus the offset, and so on, until the next value to be added to the list would not be in the range defined by the start and end value. | |
Comments | The units of all values must be compatible. If the offset is positive and the start value is greater than the end value, the return list is empty; similarly, if the offset is negative and the start value is less than the end value, the return list is empty. |
Description | Return the object with a given name. | |
Type | OBJECT | |
Arguments | Type | Meaning |
1 | STRING | the name of the object for which to search. |
Evaluation | The function returns the object with the given name, if it exists. | |
Comments | If no object with the given name exists on the global workspace, then the run is aborted with an error. |
Description | The total debt which can be paid by this object. | |
Type | NUMERIC | |
Arguments | Type | Meaning |
1 | OBJECT | the object who’s debt to calculate |
2 | DATETIME | the timestep at which to calculate the debt |
Evaluation | The function loops over all supplies, on all accounts, on the given object. If a supply is an exchange payback source, the value of its debt slot at the given timestep (if known) is added to the cumulative debt of the object. | |
Mathematical Expression | ||
Comments | If the debt slot of a payback supply at the given timestep is not known, its debt is assumed to be zero. If there are no payback supplies on the given object, the total debt is zero. |
Description | Return a slot’s parent object. | |
Type | OBJECT | |
Arguments | Type | Meaning |
1 | SLOT | The slot whose object is returned. |
Comments | It is an error if the slot is not on a Simulation Object or an account (which is on an Object). |
Description | The debt at a payback source. | |
Type | NUMERIC | |
Arguments | Type | Meaning |
1 | STRING | the payback source supply whose debt to calculate |
2 | DATETIME | the timestep at which to calculate the debt |
Evaluation | The function begins by verifying that the string argument is an accounting supply, and that this supply is a payback source. If so, the function evaluates to the value of the payback’s debt slot at the given timestep. | |
Mathematical Expression | ||
Comments | If the string argument is not a valid supply, or the supply is not a payback source, this function aborts the run with an error. If the debt slot of the payback for which this supply is a source does not contain a value at the given timestep, the function evaluates to zero. |
Description | The index of the table slot row whose name matches a string. | |
Type | NUMERIC | |
Arguments | Type | Meaning |
1 | SLOT | the table slot in which to find a row |
2 | STRING | the name of the row to match |
Evaluation | The labels of the slot rows are compared to the string argument until a match is found. | |
Comments | Table row and column indices are zero based and have units of type [NONE]. If the specified slot is not a table slot or the specified string is not the label of a row on the slot, this function aborts the run with an error. If several rows of the table slot match the string argument, this function evaluates to the index of the topmost matching row. |
Description | Given a slot with rows indexed by date, this function returns the 0-based index corresponding to a given date. | |
Type | NUMERIC | |
Arguments | Type | Meaning |
1 | SLOT | the slot in which to find a row |
2 | DATETIME | date of the row to match |
Comments | The value -1 is returned if the given date is not within the date range of the slot. This function is applicable to the following types of slot: • Series Slots • Table Series Slots • Periodic Slot It is considered an error if the slot is not indexed by date (i.e, not one of these types). |
Description | Returns the 1-based index of the current cycle through the timesteps in the run time range, in units of NONE. | |
Type | NUMERIC | |
Arguments | none | |
Comments | Rulebased simulations can cycle through the run timesteps more than once each run (see Run Cycles in Solution Approaches). This function provides access to the current run cycle, which can be used, for example, within execution constraints to control the cycle on which a rule should execute. If called from outside of a run or when the controller is not Rulebased Simulation or Inline Rulebased Simulation and Accounting, the behavior of this function is undefined. |
Description | The number of the currently executing model run, base 1, in units of NONE. | |
Type | NUMERIC | |
Arguments | none | |
Comments | If the current run is not a Multiple Run Management run, this function evaluates to 1. If called from within a pre-MRM run rule of an iterative MRM run, this function evaluates to 1. If called from within a post-run rule of an iterative MRM, this function evaluates to the index of the run which just completed. |
Description | Given an object and a user method category name, return the name of the selected method. | |
Type | STRING | |
Arguments | Type | Meaning |
1 | OBJECT | the simulation object |
2 | STRING | name of the user method category |
Comments | An error is issued if the object or the category name is not found. |
Description | Returns a list of all of the visible Series Slots on an object. | |
Type | LIST{SLOT} | |
Arguments | Type | Meaning |
1 | OBJECT | The object whose Series Slots are to be returned. |
Comments | If no object with the given name exists on the global workspace, then the run is aborted with an error. |
Description | Return the slot with a given name. | |
Type | SLOT | |
Arguments | Type | Meaning |
1 | STRING | the name of the slot for which to search. |
Evaluation | The function returns the slot with the given name, if it exists. | |
Comments | If no slot with the given name exists on the global workspace, then the run is aborted with an error. |
Description | Return the slot name portion of a slot’s full name. | |
Type | STRING | |
Arguments | Type | Meaning |
1 | SLOT | The slot whose name is returned. |
Comments | If the slot is a column of an aggregate series slot and if it is the first column, then the agg series slot name is returned. If the input slot is a column of an aggregate series slot other than the first column, the column label is returned. For example, assume that data.Agg is a two column aggregate series slot series slot with columns labeled • GetSlotName(data.Agg) = “Agg” • GetSlotName(data.Agg.0) = “Agg” • GetSlotName(data.Agg.zero) = “Agg” • GetSlotName(data.Agg.1) = “one” • GetSlotName(data.Agg.one) = “one” See also GetSlotNameAndCol, which behaves differently when the input slot is an aggregate series slot. |
Description | Given a slot, return the slot name portion of the full name, combined with the column label when the input slot is an aggregate series slot or a column of an aggregate series slot. | |
Type | STRING | |
Arguments | Type | Meaning |
1 | SLOT | The desired aggregate series slot. |
Comments | For example, assume that data.Agg is a two column aggregate series slot with columns labeled and • GetSlotNameAndCol(data.Agg) = “Agg.zero” • GetSlotNameAndCol(data.Agg.0) = “Agg.zero” • GetSlotNameAndCol(data.Agg.zero) = “Agg.zero” • GetSlotNameAndCol(data.Agg.1) = “Agg.one” • GetSlotNameAndCol(data.Agg.one) =”Agg.one” See also GetSlotName, which behaves differently when the input slot is an agg. series slot. |
Description | This function evaluates to a list composed of the values of a given series slot within a time range. GetSlotVals can also be used on a periodic slot, while GetSlotValsNaNToZero, cannot. | |
Type | LIST{NUMERIC} | |
Arguments | Type | Meaning |
1 | SLOT | the series (or periodic slot) whose values to get |
2 | DATETIME | start datetime |
3 | DATETIME | end datetime |
Evaluation | A list is generated by looking up each value in the given slot, beginning with the start datetime, and ending with the end datetime. All slot values in the range are returned, regardless of the slot data’s timestep resolution vis-a-vis that of the run control. | |
Mathematical Expression | ||
Comments | If the start datetime or end datetime does not match one of the slot’s values’, or if the start datetime is after the end datetime, this function aborts the run with an error. For GetSlotVals, if one of the slot values within the desired time range is a NaN, the function exits the rule with an early termination. For GetSlotValsNaNToZero, it converts any NaNs into zero. For periodic slots and GetSlotVals, the dates used are those within the range and falling on a run timestep; the column used is the first (column 0). |
Description | This function evaluates to a list composed of the values in a column of a given Agg Series Slots (or for GetSlotValsByCol, it could be a periodic slot) within a time range. | |
Type | LIST{NUMERIC} | |
Arguments | Type | Meaning |
1 | SLOT | the agg series slot (or for GetSlotValsByCol, it could be a periodic slot) whose values to get |
2 | DATETIME | start datetime |
3 | DATETIME | end datetime |
4 | NUMERIC | the column (interpreted as a 0-based integral index) |
Evaluation | A list is generated by looking up each value in the given column of the slot, beginning with the start datetime, and ending with the end datetime. All slot values in the range are returned, regardless of the slot data’s timestep resolution vis-a-vis that of the run control. | |
Mathematical Expression | ||
Comments | If the slot is an Agg Series Slot and the start datetime or end datetime does not match one of the slot’s values’, or if the start datetime is after the end datetime, this function aborts the run with an error. For GetSlotValsByCol, if one of the slot values within the desired time range is a NaN, the function exits the rule with an early termination. For GetSlotValsByColNaNToZero, it converts any NaNs into zero. For periodic slots and GetSlotValsByCol, the dates used are those within the range and falling on a run timestep. |
Description | All of the values of a table slot column between two rows. | |
Type | LIST{NUMERIC} | |
Arguments | Type | Meaning |
1 | SLOT | the table slot whose values to get |
2 | NUMERIC | column |
3 | NUMERIC | start row |
4 | NUMERIC | end row |
Evaluation | A list is generated by looking up each value in the given column of the given table slot beginning with the start row, and ending with the end row (inclusive). Rows and columns are numbered beginning with zero. | |
Mathematical Expression | ||