-
-
Notifications
You must be signed in to change notification settings - Fork 399
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
Add assert_is_solved_and_feasible #3925
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #3925 +/- ##
=======================================
Coverage 99.58% 99.58%
=======================================
Files 43 43
Lines 6059 6063 +4
=======================================
+ Hits 6034 6038 +4
Misses 25 25 ☔ View full report in Codecov by Sentry. |
I like it. |
Co-authored-by: Miles Lubin <mlubin@google.com>
d3671ae
to
98f0a40
Compare
It's too late now, but for JuMP 2.0, a better solution might be for this to be the default behavior of Right now we have the behavior that almost everyone should use optimize!(model)
assert_is_solved_and_feasible(model) and some people should do optimize!(model)
if termination_status(model) == OPTIMAL
# ...
else if termination_status(model) == TIME_LIMIT
# ...
else
# ...
end |
Thoughts on new function instead of a keyword? |
This is something to be used in quick scripts so keystrokes matter. |
Okay. This is good to go by me then. |
Closes #3923
Bikeshedding: the alternative is
is_solved_and_feasible(model; assert = true)