MaxObjectsAggregatedOverTime

This function returns a single numeric value which is the largest of several objects’ aggregated slot values. The objects’ slot values may be aggregated as a SUM , AVG , MIN , or MAX over a specified time range.

Description

The largest of several object’s values, each of which is the result of aggregating a slot’s values over time.

Type

LIST

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, the largest of the objects’ aggregated slot values is determined. This value is returned as the first value in a list. If there is a date/time associated with this value, it is returned as the second value in the list. This will be the case if the "MIN" or "MAX" aggregation function is specified for the fifth argument.

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, 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.

 
MaxObjectsAggregatedOverTime("upper basin", "Inflow", "MAX","ALL", TRUE
@"October, Previous Year",
@"September, Current Year")
 
324.3 "cms"