-
Notifications
You must be signed in to change notification settings - Fork 8
Allow subproblem failures in DominguezRios #121
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
Conversation
src/algorithms/DominguezRios.jl
Outdated
@@ -208,19 +207,18 @@ function minimize_multiobjective!(algorithm::DominguezRios, model::Optimizer) | |||
new_f = t_max + ϵ * sum(w[i] * (scalars[i] - yI[i]) for i in 1:n) | |||
MOI.set(model.inner, MOI.ObjectiveFunction{typeof(new_f)}(), new_f) | |||
MOI.optimize!(model.inner) | |||
if _is_scalar_status_optimal(model) |
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.
Q: in what situations can this model not be OPTIMAL? And if it isn't, what should we do with the box?
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.
the other option is
@@ -207,7 +208,11 @@ function minimize_multiobjective!(algorithm::DominguezRios, model::Optimizer)
new_f = t_max + ϵ * sum(w[i] * (scalars[i] - yI[i]) for i in 1:n)
MOI.set(model.inner, MOI.ObjectiveFunction{typeof(new_f)}(), new_f)
MOI.optimize!(model.inner)
- @assert _is_scalar_status_optimal(model)
+ if !_is_scalar_status_optimal(model)
+ deleteat!(L[k], i)
+ MOI.delete.(model.inner, constraints)
+ continue
+ end
X, Y = _compute_point(model, variables, model.f)
obj = MOI.get(model.inner, MOI.ObjectiveValue())
# We need to undo the scaling of the scalar objective. There's no
The tolerance issue with HiGHS means that we discard some points, so we find 36 solutions instead of 43:
Test Failed at /Users/oscar/.julia/dev/MultiObjectiveAlgorithms/test/vOptLib.jl:41
Expression: MOI.get(model, MOI.ResultCount()) >= length(solutions)
Evaluated: 36 >= 43
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.
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.
I think the model should always be feasible (in theory) as long as the feasible set of the original problem is nonempty. The result is used to figure out the location of the nondominated point (whether it is in the box that we are currently looking into to find nondominated points). So it can be infeasible at the very beginning and can return an empty nondominated set.
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.
If the whole problem is infeasible, then we'll catch that in the ideal point computation.
Problem still remains: what if the problem is feasible but our solver fails for some boxes. Perhaps the right behavior is to just skip some? If we error completely, we ignore the fact that this is a nice anytime algorithm with a bunch of good solutions already.
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.
If the whole problem is infeasible, then we'll catch that in the ideal point computation.
Yes, that is true.
Problem still remains: what if the problem is feasible but our solver fails for some boxes. Perhaps the right behavior is to just skip some? If we error completely, we ignore the fact that this is a nice anytime algorithm with a bunch of good solutions already.
Maybe the fact that we are not applying the reduction rule of the algorithm and deleting the only problematic box is fine. Should we mention somewhere that this is an anytime algorithm and best suited for use with SolutionLimit
or TimeLimit
? If someone wants to get all the nondominated solutions, they should use something else. That is actually one of the things I want to explain in the talk.
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #121 +/- ##
=======================================
Coverage 98.85% 98.85%
=======================================
Files 9 9
Lines 959 960 +1
=======================================
+ Hits 948 949 +1
Misses 11 11 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
x-ref #120