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

Optimize for all sources in a subnetwork with the same source priority at the same time (ensuring optimal solution uniqueness) #2051

Open
SouthEndMusic opened this issue Feb 11, 2025 · 0 comments
Labels
allocation Allocation layer core Issues related to the computational core in Julia performance Relates to runtime performance or convergence

Comments

@SouthEndMusic
Copy link
Collaborator

In #2022 source priorities were introduced for allocation. In that PR it was first attempted to solve for all sources in a subnetwork that have the same source priority at the same time. The problem that this situation has is that it becomes more likely that the optimization problems do not have an unique optimal solution, which can lead to non-deterministic behavior. Therefore it was reverted to solving for each source individually.

Solving per source means solving a lot more optimization problems, which affects performance (and potentially also optimization results of lower quality). In the default case where source priorities are not unique, the optimization per source priority is done in the order of the Node IDs, which is somewhat arbitrary. So if we want to bring solving for all sources that have the same priority at once, we need to introduce a way to make the solution of the optimization unique.

One way to do this is by adding a secondary objective. Then solving an optimization problem has the following steps:

  • Solve the optimization problem with the 'fair distribution' objective that we have now
  • Fix the allocated amounts
  • Optimize for a second objective, for instance minimizing flow cost by giving each edge a cost. To ensure uniqueness of this problem, each edge could have a different cost by introducing some deterministic noise.
@SouthEndMusic SouthEndMusic added allocation Allocation layer core Issues related to the computational core in Julia performance Relates to runtime performance or convergence labels Feb 11, 2025
@github-project-automation github-project-automation bot moved this to To do in Ribasim Feb 11, 2025
@SouthEndMusic SouthEndMusic changed the title Optimize for all sources in a subnetwork with the same source priority at the same time Optimize for all sources in a subnetwork with the same source priority at the same time (ensuring optimal solution uniqueness) Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
allocation Allocation layer core Issues related to the computational core in Julia performance Relates to runtime performance or convergence
Projects
Status: To do
Development

No branches or pull requests

1 participant