Repository navigation
Report cause of infeasibility - #2398
Conversation
Co-authored-by: Bart de Koning <74617371+SouthEndMusic@users.noreply.github.com>
to avoid naming collisions.
Instead of a commit on master. https://github.com/SciML/DataInterpolations.jl/releases/tag/v8.1.0
SouthEndMusic
left a comment
There was a problem hiding this comment.
Overal this looks good! I left some final comments. There's also a failing test
| nonzero_slack_count += 1 | ||
|
|
||
| @info "infeasible constraint: $constraint" | ||
| @info " ______________________________________________________________________________________________" |
There was a problem hiding this comment.
Not really. The logging system has its own formatting to avoid the need for this. Also you don't know how wide the console is, so this may overflow to multiple lines.
julia> @info "Something happened." pi sin(pi) cos(pi) x=sqrt(9)
┌ Info: Something happened.
│ pi = π = 3.1415926535897...
│ sin(pi) = 0.0
│ cos(pi) = -1.0
└ x = 3.0
There was a problem hiding this comment.
The infeasibility detection/reporting feature is currently documented in inline code comments and log outputs. It is clear, well-structured, and suitable for developers.
To improve usability, consider adding a section to the Quarto-based documentation detailing:
- How the model reports infeasibility
- Where users can find these logs
- How to interpret them
- Practical troubleshooting steps for model infeasibility.
Moreover, mentioning this improvement briefly in the main README or in a troubleshooting guide would also help more users benefit from it.
Fixes #2328 The cause of the infeasibility is determined by solving the same optimization problem, with relaxed constraints. The violation of the constraints is minimized, and so we find the least violating constraint to make the problem feasible. Next we check which variables contribute in this constraint, and report all other constraints that also contain these variables. This way we get a set of possible conflicting constraints, and log the value of each variable. We only relax the volume- and flow conservation constraints. This makes sure that we immediately know at which node/edge the constraints are violated. --------- Co-authored-by: Bart de Koning <74617371+SouthEndMusic@users.noreply.github.com> Co-authored-by: Jesús A. Rodríguez <jesusandres.rodriguez@deltares.nl> Co-authored-by: Martijn Visser <mgvisser@gmail.com>
Fixes #2328
The cause of the infeasibility is determined by solving the same optimization problem, with relaxed constraints.
The violation of the constraints is minimized, and so we find the least violating constraint to make the problem feasible.
Next we check which variables contribute in this constraint, and report all other constraints that also contain these variables. This way we get a set of possible conflicting constraints, and log the value of each variable.
We only relax the volume- and flow conservation constraints. This makes sure that we immediately know at which node/edge the constraints are violated.