-
-
Notifications
You must be signed in to change notification settings - Fork 402
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
First pass at a feasibility checker. #2466
Conversation
Codecov Report
@@ Coverage Diff @@
## master #2466 +/- ##
==========================================
+ Coverage 93.69% 93.76% +0.07%
==========================================
Files 43 44 +1
Lines 5360 5424 +64
==========================================
+ Hits 5022 5086 +64
Misses 338 338
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work!
Does it work for non-linear?
+1 to move _distance_to_set
to MOI. SOC is very simple. SDP can be done with julia base, even full eig decomposition is usually faster than any solver (some even do full eig decompositions in each iteration).
|
The only risk I see is getting the API sorted for linear and then struggling to fit non-linear in there. Also as said in the call this shouldn't be a blocker IMO, anything can be added in 1.+ while things cannot be changed in a breaking manner, which means we would be pushing features then blocked before 2.x. If it's fully there great, but I wouldn't push an interface just for having an interface defined. I think this could be implemented (partially) at the MOI level? |
I meant that we should lock in primal_feasibility_report(
model::Model,
[point::AbstractDict{VariableRef,Float64}];
atol::Float64 = 0.0,
)::Dict{Any,Float64} but not necessarily define a distance for every single set. |
976f6d9
to
8b9b136
Compare
This is a significant item for JuMP 1.0, but there is debate on how to define and implement distances for different sets. See https://github.com/matbesancon/MathOptSetDistances.jl for a WIP package exploring the options. This PR also only addresses primal feasibility. See joaquimg/FeasibilityOptInterface.jl#1 for a WIP attempt at dual feasibility as well. In future, the _distance_to_set definitions will be merged into MOI. This PR is more about defining the JuMP-level interface so we can change internal details without breaking compatibility of JuMP 1.0.
39790aa
to
b9b995d
Compare
Any other reviews? |
This is a significant item for JuMP 1.0, but there is debate on how
to define and implement distances for different sets.
See jump-dev/MathOptInterface.jl#1023 for the
last time this was attempted.
See https://github.com/matbesancon/MathOptSetDistances.jl for a WIP
package exploring the options.
This PR also only addresses primal feasibility. See
joaquimg/FeasibilityOptInterface.jl#1
for a WIP attempt at dual feasibility as well.
In future, the _distance_to_set definitions will be merged into MOI.
This PR is more about defining the JuMP-level interface so we can
change internal details without breaking compatibility of JuMP 1.0.
Edit: for example, if MOI introduces a
AbstractDistance
argument,we can add a
; distance = DefaultDistance()
kwarg toprimal_feasibility_report
without violating compatibility.
For now I've implemented sets for MILP, since this should cover 90% of
users wishing to implement this. Perhaps for the trickier sets, we can tell
users to load MathOptSetDistances, and that package can contain heavier
dependencies for computing the minimum eigen-value, etc.
Closes #693
Doc preview: https://jump.dev/JuMP.jl/previews/PR2466/manual/solutions/#Checking-feasibility-of-solutions