Deltares / Ribasim

Water resources modeling
https://deltares.github.io/Ribasim/
MIT License
36 stars 5 forks source link

Document allocation (for developers) #1540

Open SouthEndMusic opened 3 weeks ago

SouthEndMusic commented 3 weeks ago

@Jingru923 and @SouthEndMusic came to the conclusion that for other people than @SouthEndMusic to work on allocation, we need good developer documentation for allocation. Here is a rough structure, where there should be some explanation and a small code example per section, mainly for interacting with the optimization problem with JuMP.jl.

The Allocation struct

Initialization

Data processing

Deriving edge capacities

Handling the connection between the main network and subnetworks

Optimization problem

Setting up optimization variables

Setting up optimization constraints

Optimization

Preparing the optimization problem

Setting up the objective function

Setting the constraints and capacities

Looping over priorities

Updating capacities

Output data

Communicating to the physical layer

UserDemand abstraction

Controlling pumps/weirs based on allocation results (n/a)