...
The Environmental Flow Manager will then determine whether there is sufficient water available to meet each group's needs in priority order, decreasing the amount available to each subsequent priority as the group above reserves water. To do this, the EFM steps through the ranked action list and compares the cost of the action (ie. the volume of water required to deliver the action) to the available water in the portfolios of accounts that can be accessed by the action. If enough water is available, the EFM will commit the water required to meet the estimated cost (i.e. subtracts the volume from the water available), so that the committed water is not available for actions with lower importance. The environmental flow manager flags the action as active to the EFN. The environmental flow manager does not execute actions, it gives permission to the environmental flow node to evaluate the criteria of the flagged (committed) rule and initiate a target response (eg. place an orderorders) when appropriate. Accounts are not only debited until after a managed target response is executedafter orders are made (either order debit or use debit depending on your accounting system).
Figure 3. Expanded Environmental Flow Manager Conceptual Model: Detailed flowchart for the 'Prioritise and activate/flag actions' box in Figure 2.
Environmental Flow Manager
...
Prioritisation Phase:
After the resource assessment phase is complete, the flow manager phase begins. Details of all the phases can be found here under Model Simulation Phases. At a high level the process is as follows:
...
There is also the concept of Availabe Water, this will be used in the main prioritisation loop to keep track of any additionwater still available.
4. Run the main prioritisation loop
...
Next, Addition groups are removed from Groups to Prioritise:
Code Block | ||||
---|---|---|---|---|
| ||||
foreach (group in Groups To Prioritise): { if (group.IsActivelyDelivering:) { group.EnabledByEFM = true CommitEstimatedCostToPortfolios(group) Groups To Prioritise.Remove(group) |
...
}
} |
CommitEstimatedCostToPortfolios will distribute the estimated cost of a group across portfolios so that the Portfolio.AvailableWater is reduced. This distribution works in a similar way to distribution of water user orders to supply points. That is, the cost will be split across the highest priority portfolios first in the share percentages specified in the portfolio configuration. Lower priority portfolios will only be used once higher priority portfolios have no available water.
Once the prioritise are calculated, the main loop begins:
Code Block | ||||
---|---|---|---|---|
| ||||
// sort groups by whether they were enabled by the EFM first, then by priority SortGroups(Groups to Prioritise) while foreach (group in Groups toTo Prioritise.Count) !={ 0): UpdateFunctions() group = Groups To Prioritise[0] // TotalPortfolioAvailableWater is the sum of all of the group's portfolios AvailableWater. if (group.IsInSeason && group.TotalPortfoliosAvailableWater >= group.EstimatedCost): { group.EnableByEFM = true CommitEstimatedCostToPortfolios(group) else } group.EnableByEFMelse = false Groups To Prioritise.Remove(group) |
group.EnableByEFM = false
} |
It is important to note a few things in the above psuedo code. First, groups that were enabled the last time the EFM was run will be prioritised before other groups that were not, regardless of priority. Secondly, if a group has no actions that are in season today, they will always be disabled. The ReducePortfoliosByCost function is the same as described above.
The UpdateFunctions() method will update any functions with time of evaluation Environmental Flow Prioritisation. Note: Any modelled variables that need to be used during the iterations must have the Date Range set to Current Iteration otherwise they will not update each iteration.
Prioritisation of actions/groups within the flow manager
...