skip to main content
Accounting : Accounting Overview : Predefined RPL Functions for Accounting
Predefined RPL Functions for Accounting
There are predefined RPL functions that deal specifically with accounts, supplies, and exchanges in the accounting system. This section lists some accounting-specific predefined functions. See RPL Predefined Functions in RiverWare Policy Language (RPL) for additional information.
 AccountNamesByAccountType
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. See AccountNamesByAccountType in RiverWare Policy Language (RPL) for additional information.
 AccountNamesByWaterOwner
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. See AccountNamesByWaterOwner in RiverWare Policy Language (RPL) for additional information.
 AccountNamesByWaterType
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. See AccountNamesByWaterType in RiverWare Policy Language (RPL) for additional information.
 AccountNameFromPriorityDate
This function evaluates to the name of the account having the specified priority date. See AccountNameFromPriorityDate in RiverWare Policy Language (RPL) for additional information.
 AccountNamesFromObjReleaseDestination
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. See AccountNamesFromObjReleaseDestination, AccountNamesFromObjReleaseDestinationIntra in RiverWare Policy Language (RPL) for additional information.
 AccountPriorityDate
This function evaluates to the priority date of the account, on the specified Object, having the specified name. See AccountPriorityDate in RiverWare Policy Language (RPL) for additional information.
 Destinations
This function evaluates to a list of user-defined Destinations. See Destinations in RiverWare Policy Language (RPL) for additional information.
 DestinationsFromObjectReleaseType
This function returns a list of unique names of Destinations of Supplies which represent outflows from a specified Object, and which have the indicated Release Type. See DestinationsFromObjectReleaseType in RiverWare Policy Language (RPL) for additional information.
 GetAccountFromSlot
Given a Slot, the function return its parent account name as a String. It is an error if the slot is not on an account. See GetAccountFromSlot in RiverWare Policy Language (RPL) for additional information.
 GetObjectDebt
This function evaluates to the sum of the debts to all accounting exchanges which may be paid by supplies on the given object. If there are no exchange paybacks on the given object, the debt is zero. See GetObjectDebt in RiverWare Policy Language (RPL) for additional information.
 GetPaybackDebt
This function evaluates to the value of the debt slot of the given exchange payback source at the given timestep. See GetPaybackDebt in RiverWare Policy Language (RPL) for additional information.
 ObjAcctSupplyByWaterTypeRelTypeDestType
This function returns 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, the supply has the given release type and destination type, and the supplying account (upstream end of the supply in the returned triplet) has the given water type. See ObjAcctSupplyByWaterTypeRelTypeDestType in RiverWare Policy Language (RPL) for additional information.
 ObjectsFromAccountName
This function returns a list of the objects that contain an account with the given name and account type. See ObjectsFromAccountName in RiverWare Policy Language (RPL) for additional information.
 ObjectsFromWaterType
This function returns a list of the objects that have an account with given water type and account type. See ObjectsFromWaterType in RiverWare Policy Language (RPL) for additional information.
 ReleaseTypes
This function returns a list of the names of all user-defined ReleaseTypes in the Water Accounting System Configuration. See ReleaseTypes in RiverWare Policy Language (RPL) for additional information.
 ReleaseTypesFromObject
This function returns a list of unique names of ReleaseTypes of Supplies which represent outflows from a specified Object. See ReleaseTypesFromObject in RiverWare Policy Language (RPL) for additional information.
 SolveWaterRights and SolveWaterRightsWithLags
This water accounting function invokes the Water Rights Allocation method on a computational subbasin; see Water Rights Allocation and SolveWaterRights, SolveWaterRightsWithLags in RiverWare Policy Language (RPL) for details.
 SumAccountSlotsByWaterType
This function sums the values of all accounting slots of a given name on accounts of a given water type. See SumAccountSlotsByWaterType in RiverWare Policy Language (RPL) for additional information.
 SupplyNamesFrom, SupplyNamesFrom1to1
This function returns a list of names of Supplies which represent outflows from given Accounts and have the indicated ReleaseType and Destination. See SupplyNamesFrom, SupplyNamesFrom1to1 in RiverWare Policy Language (RPL) for additional information.
 SupplySlotsFrom, SupplySlotsFrom1to1
This function returns a list of Supply slots of Supplies which represent outflows from given Accounts and which have the indicated ReleaseType and Destination. See SupplySlotsFrom, SupplySlotsFrom1to1 in RiverWare Policy Language (RPL) for additional information.
 SupplyNamesFromIntra, SupplyNamesFromIntra1to1
This function returns a list of names of Supplies which represent internal flows from given Accounts and which have the indicated ReleaseType and Destination. See SupplyNamesFromIntra, SupplyNamesFromIntra1to1 in RiverWare Policy Language (RPL) for additional information.
 SupplySlotsFromIntra, SupplySlotsFromIntra1to1
This function returns a list of Supply slots of Supplies which represent internal flows from given Accounts and which have the indicated ReleaseType and Destination.
 SupplyNamesTo, SupplyNamesTo1to1
This function returns a list of names of Supplies which represent inflows to given Accounts and which have the indicated ReleaseType and Destination. See SupplyNamesTo, SupplyNamesTo1to1 in RiverWare Policy Language (RPL) for additional information.
 SupplySlotsTo, SupplySlotsTo1to1
This function returns a list of Supply slots of Supplies which represent inflows to given Accounts and which have the indicated ReleaseType and Destination. See SupplySlotsTo, SupplySlotsTo1to1 in RiverWare Policy Language (RPL) for additional information.
 SupplyNamesToIntra, SupplyNamesToIntra1to1
This function returns a list of names of Supplies which represent internal flows to given Accounts and which have the indicated ReleaseType and Destination. See SupplyNamesToIntra, SupplyNamesToIntra1to1 in RiverWare Policy Language (RPL) for additional information.
 SupplySlotsToIntra, SupplySlotsToIntra1to1
This function returns a list of Supply slots of Supplies which represent internal flows to given Accounts and which have the indicated ReleaseType and Destination. See SupplySlotsToIntra, SupplySlotsToIntra1to1 in RiverWare Policy Language (RPL) for additional information.
 WaterOwners
This function returns a list of the names of all WaterOwners defined in the Water Accounting System Configuration. See WaterOwners in RiverWare Policy Language (RPL) for additional information.
 WaterTypes
This function returns a list of the names of all WaterTypes defined in the Water Accounting System Configuration. See WaterTypes in RiverWare Policy Language (RPL) for additional information.
Revised: 08/02/2021