Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allocation diagram #771

Merged
merged 5 commits into from
Nov 16, 2023
Merged
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions docs/core/allocation.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,34 @@ Allocation is the process of assigning an allocated abstraction flow rate to use

The allocation problem is solved per subnetwork of the Ribasim model, from which a new graph is created called the allocation graph. The allocation graph is used to formulate an optimization problem with the [JuMP](https://jump.dev/JuMP.jl/stable/) package, which is solved using the [HiGHS solver](https://highs.dev/). For more information see also the example of solving the maximum flow problem with `JuMP.jl` [here](https://jump.dev/JuMP.jl/stable/tutorials/linear/network_flows/#The-max-flow-problem).

```{mermaid}
SouthEndMusic marked this conversation as resolved.
Show resolved Hide resolved
sequenceDiagram
participant Sim as Process: Ribasim simulation
participant Param as Data: Parameters
participant State as Data: State
participant Optim as process: Allocation optimization
SouthEndMusic marked this conversation as resolved.
Show resolved Hide resolved
loop Simulation timestep, several times
State-->>Sim: Input
Param-->>Sim: Input
Sim-->>Param: Parameter updates by control
activate Sim
Sim->>Sim: Compute flows over edges per node type
Sim-->>Param: Set flows
Sim->>Sim: Time integration step
Sim-->>State: Update state
deactivate Sim
end
loop Allocation optimization, per allocation network
Param-->>Optim: Input
activate Optim
State-->>Optim: Input
Optim->>Optim: Optimize basin allocations if below target level
Optim->>Optim: Optimize user allocation, per priority
SouthEndMusic marked this conversation as resolved.
Show resolved Hide resolved
Optim-->>Param: Set allocated flow rates
deactivate Optim
end
```

# The allocation problem

The following data of the parameters and state of a Ribasim model are relevant for the allocation problem.
Expand Down