ObjAcctSupplyByWaterTypeRelTypeDestType

Description

This function finds a list of objects, accounts and supplies that match the given arguments. It returns a list of triplets{ OBJECT object, STRING account, STRING supply }, where the object^account is served by the supply, and the object is in the given subbasin (argument 1), the supply has the given release type and destination type (arguments 3 and 4), and the supplying account (upstream end of the supply in the returned triplet) has the given water type (argument 2).

Type

LIST ( LIST { OBJECT, STRING, STRING } )

Arguments

Type

Meaning

1

STRING

The name of the subbasin in which to search.

2
 

STRING

The water type of the upstream end of the supplies returned. The string "ALL" means that any water type will satisfy this filter. The string "NONE" means that only supplying accounts lacking a water type will satisfy this filter.

3
 

STRING

The release type of the supply returned. The string "ALL" means that any release type will satisfy this filter. The string "NONE" means that only supplies lacking a release type will satisfy this filter.

4
 

STRING

The destination type of the supplies returned. The string "ALL" means that any destination type will satisfy this filter. The string "NONE" means that only supplies lacking a destination type will satisfy this filter.

Comments

This function is meant to be used in conjunction with the water rights solvers (SolveWaterRights()). It looks for supplies that are "appropriation points" for legal water accounts as defined for the water rights solver. In the solver, these supplies are identified by the water type of the account at the point of appropriation. Usually these supplies directly supply the object^account in the returned triplets. The one exception to this is when the supply serves an offstream reservoir. In this case, the offstream reservoir is supplied through a diversion object, and so a passthrough account on the diversion object sits between the point of diversion and the receiving object^account. This is the only case in which any indirection is detected, and the function looks two hops upstream to check the supplying account’s water type. In all other cases, the function looks only one hop upstream.

 
ObjAcctSupplyByWaterTypeRelTypeDestType("WRA", "MyWT", "MyRel", "MyDest")
 
{ {"Res1", "Farmer1", "Res1 Farmer1 Diversion to Farmer1 Diversion"},
{"Res1", "Farmer2", "Res1 Farmer2 Diversion to Farmer2 Diversion"} }