Skip to content

Commit

Permalink
diagram draft
Browse files Browse the repository at this point in the history
  • Loading branch information
SouthEndMusic committed Nov 10, 2023
1 parent 8e67335 commit 4914930
Showing 1 changed file with 28 additions and 0 deletions.
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}
sequenceDiagram
participant Sim as Process: Ribasim simulation
participant Param as Data: Parameters
participant State as Data: State
participant Optim as process: Allocation optimization
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
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

0 comments on commit 4914930

Please sign in to comment.