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

Incorrect status reported for incomplete logs #24

Open
simonbowly opened this issue Apr 1, 2022 · 2 comments
Open

Incorrect status reported for incomplete logs #24

simonbowly opened this issue Apr 1, 2022 · 2 comments

Comments

@simonbowly
Copy link
Member

In latest master branch, if a MIP log is incomplete (i.e. cut off with no termination message for whatever reason), we might report optimal status incorrectly. For example:

Variable types: 23522 continuous, 2343 integer (0 binary)

Root barrier log...

Barrier solved model in 50 iterations and 72.71 seconds (53.24 work units)
Optimal objective -1.76339641e+08

Solved with barrier

Root relaxation: objective -1.763396e+08, 104343 iterations, 108.23 seconds (79.42 work units)

    Nodes    |    Current Node    |     Objective Bounds      |     Work
 Expl Unexpl |  Obj  Depth IntInf | Incumbent    BestBd   Gap | It/Node Time

here we get 'OPTIMAL' status from ContinuousParser, but no termination message from NodeLogParser.

grblogtoolsv1 would give an 'incomplete log' warning in this situation (and report unknown status? I'm not sure).

We should check for this with some custom logic for Status and Runtime, something like:

  • If the model is continuous, we can get Runtime and Status from ContinuousParser
  • If the model is (a) a MIP or (b) a continuous model solved as a MIP, we should ignore Runtime and Status from ContinuousParser
    • (a) We can check using model type in SingleLogParser
    • (b) Look for the message Solving as a MIP in header or presolve
  • If TerminationParser reports runtime or status, it should take precedence (this already happens)
@maliheha
Copy link
Member

maliheha commented Apr 2, 2022

I like the option (a) better. Specifically, we need to change the method SingleLogParser().get_summary() such that:

  • The model type needs to be determined before adding the continuous parser summary result
  • If the model type is not continuous, we can set the fields Status and Runtime to None
  • If there is legit Status and Runtime for non-continuous models, the correct values will be overwritten when adding the termination and nodelog parser summary results

Is it possible for a model to be solved as a MIP while the model type is determined to be continuous?

@mattmilten
Copy link
Member

Yes, Gurobi may solve nonlinear nonconvex but still continuous models as MIPs. But also in this case, we should detect the actual model type either by checking it explicitly (option a) or by scanning for Solving as MIP (option b). I'd prefer option a as well, though.

Another thought: we also don't store the Continuous status for MIPs, right? The Status that was collected is just overwritten later when parsing the final MIP status. So maybe we could keep the ContinuousStatus and only copy it to the Status if the model type is indeed continuous?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants