SolveShortage

Given some total available water, this method solves for the Diversion Shortage and Depletion Shortage on a Water User, or the Total Diversion Shortage and Total Depletion Shortage on an AggDiversionSite. It evaluates to a list which contains the two values.

Description

List containing the (Total) Diversion Shortage and (Total) Depletion Shortage

Type

LIST {NUMERIC, NUMERIC}

Arguments

Type

Meaning

1

OBJECT

the object on which to perform the calculations (either an AggDiversionSite or a Water User)

2

NUMERIC

the total water available for diversion

3

DATETIME

the timestep at which to calculate

Evaluation

This function behaves identically to the solution of the object in simulation. It mimics the dispatch method of the given object. However, instead of setting slots, the method just returns the values for (Total) Diversion Shortage and (Total) Depletion Shortage.

Comments

This function exits its calling rule with an early termination if any of the required data used to solve the diversions are unknown. Note: Depletion Requested is not required, if not specified it will be set equal to Diversion Requested.

This function aborts the run with an error if an object other than a Water User or an AggDiversionSite is given as the first argument.

 
SolveShortage(%"San Juan Diversion", 100 "cfs", @"t"}
 
{1.25 "cms", 1.02 "cms"}