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

return MOI.TIME_LIMIT when the solver times out #46

Merged
merged 5 commits into from
Sep 27, 2023

Conversation

zengjian-hu-rai
Copy link
Contributor

Should we return MOI.TIME_LIMIT instead of OTHER_ERROR when the solver hits the preset time_limit?

Understand it's tricky to know whether the solver truly times out. Looks like the solver (chuffed) returns UNKNOWN when it hits the time limit.

@chriscoey chriscoey requested a review from odow September 27, 2023 17:55
@codecov
Copy link

codecov bot commented Sep 27, 2023

Codecov Report

All modified lines are covered by tests ✅

Comparison is base (085d2ad) 97.37% compared to head (54934c9) 97.16%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master      #46      +/-   ##
==========================================
- Coverage   97.37%   97.16%   -0.21%     
==========================================
  Files           3        3              
  Lines         457      459       +2     
==========================================
+ Hits          445      446       +1     
- Misses         12       13       +1     
Files Coverage Δ
src/optimize.jl 92.30% <100.00%> (-0.61%) ⬇️

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@odow odow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a hack, this is okay. Does mini zinc not have better status reporting options?

@odow
Copy link
Member

odow commented Sep 27, 2023

Looks like there isn't

--unsat-msg (--unsatisfiable-msg), --unbounded-msg, --unsatorunbnd-msg,
        --unknown-msg, --error-msg, --search-complete-msg <msg>
    Specify solution status messages. The defaults:
    "=====UNSATISFIABLE=====", "=====UNSATorUNBOUNDED=====", "=====UNBOUNDED=====",
    "=====UNKNOWN=====", "=====ERROR=====", "==========", respectively.

@chriscoey
Copy link
Contributor

AFAICT these are the minizinc statuses https://minizinc-python.readthedocs.io/en/latest/api.html#minizinc.result.Status and it does not really have the level of granularity on termination statuses that MOI does

src/optimize.jl Outdated Show resolved Hide resolved
@odow
Copy link
Member

odow commented Sep 27, 2023

Happy with this? Any changes?

@zengjian-hu-rai
Copy link
Contributor Author

Happy with this? Any changes?

yes!

@odow odow merged commit ce9f57a into jump-dev:master Sep 27, 2023
6 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants