pchtsp / orloge

log parser for MIP and LP solvers
MIT License
14 stars 0 forks source link

[CBC & GUROBI] parser failed #8

Open vepain opened 3 years ago

vepain commented 3 years ago

Orloge cannot correctly parse the following logs. In fact, status and time cannot be retrieved (and some other fields)

CBC

Welcome to the CBC MILP Solver 
Version: 2.10.3 
Build Date: Dec 15 2019 

command line - /home/vepain/Documents/Enseignements/ro_recherche_operationnelle/TP/.venv_39/lib/python3.9/site-packages/pulp/apis/../solverdir/cbc/linux/64/cbc /tmp/07c96077d3cf41a984ea75769ec57f9d-pulp.mps branch printingOptions all solution /tmp/07c96077d3cf41a984ea75769ec57f9d-pulp.sol (default strategy 1)
At line 2 NAME          MODEL
At line 3 ROWS
At line 9 COLUMNS
At line 28 RHS
At line 33 BOUNDS
At line 34 ENDATA
Problem MODEL has 4 rows, 4 columns and 14 elements
Coin0008I MODEL read with 0 errors
Presolve 4 (0) rows, 4 (0) columns and 14 (0) elements
0  Obj 0 Primal inf 7.0999996 (4)
2  Obj 90
Optimal - objective value 90
Optimal objective 90 - 2 iterations time 0.002
Option for printingOptions changed from normal to all
Total time (CPU seconds):       0.00   (Wallclock seconds):       0.00

GUROBI


Gurobi 9.1.2 (linux64, gurobi_cl) logging started Wed Sep  8 18:28:59 2021

Academic license - for non-commercial use only - expires 2021-11-05
Using license file /home/vepain/gurobi.lic
Set parameter LogFile to value ./CBC_simple_ex.log

Gurobi Optimizer version 9.1.2 build v9.1.2rc0 (linux64)
Copyright (c) 2021, Gurobi Optimization, LLC

Read LP format model from file /tmp/ab4c77a23d094b84b3ea1d9e7032db87-pulp.lp
Reading time = 0.00 seconds
Totat_cost: 4 rows, 4 columns, 14 nonzeros
Thread count: 4 physical cores, 8 logical processors, using up to 8 threads
Optimize a model with 4 rows, 4 columns and 14 nonzeros
Model fingerprint: 0xf5d9a7ca
Coefficient statistics:
  Matrix range     [1e+00, 5e+02]
  Objective range  [2e+01, 8e+01]
  Bounds range     [0e+00, 0e+00]
  RHS range        [6e+00, 5e+02]
Presolve time: 0.00s
Presolved: 4 rows, 4 columns, 14 nonzeros

Iteration    Objective       Primal Inf.    Dual Inf.      Time
       0    0.0000000e+00   1.512500e+02   0.000000e+00      0s
       2    9.0000000e+01   0.000000e+00   0.000000e+00      0s

Solved in 2 iterations and 0.00 seconds
Optimal objective  9.000000000e+01

Wrote result file '/tmp/ab4c77a23d094b84b3ea1d9e7032db87-pulp.sol'
vepain commented 3 years ago

This CBC log is not correctly parsed too. Here, best solution is equal to 32 but the parsing value is equal to -32

Welcome to the CBC MILP Solver 
Version: 2.10.3 
Build Date: Dec 15 2019 

command line - /home/vepain/Documents/Enseignements/ro_recherche_operationnelle/TP/.venv_39/lib/python3.9/site-packages/pulp/apis/../solverdir/cbc/linux/64/cbc /tmp/6a7df26d2eb949f39afc9b651ba3a2fe-pulp.mps max branch printingOptions all solution /tmp/6a7df26d2eb949f39afc9b651ba3a2fe-pulp.sol (default strategy 1)
At line 2 NAME          MODEL
At line 3 ROWS
At line 14 COLUMNS
At line 60 RHS
At line 70 BOUNDS
At line 80 ENDATA
Problem MODEL has 9 rows, 9 columns and 18 elements
Coin0008I MODEL read with 0 errors
Continuous objective value is 32 - 0.00 seconds
Cgl0004I processed model has 7 rows, 9 columns (9 integer (0 of which binary)) and 15 elements
Cutoff increment increased from 1e-05 to 0.9999
Cbc0012I Integer solution of -32 found by DiveCoefficient after 0 iterations and 0 nodes (0.00 seconds)
Cbc0001I Search completed - best objective -32, took 0 iterations and 0 nodes (0.00 seconds)
Cbc0035I Maximum depth 0, 0 variables fixed on reduced cost
Cuts at root node changed objective from -32 to -32
Probing was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
Gomory was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
Knapsack was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
Clique was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
MixedIntegerRounding2 was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
FlowCover was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
TwoMirCuts was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)
ZeroHalf was tried 0 times and created 0 cuts of which 0 were active after adding rounds of cuts (0.000 seconds)

Result - Optimal solution found

Objective value:                32.00000000
Enumerated nodes:               0
Total iterations:               0
Time (CPU seconds):             0.00
Time (Wallclock seconds):       0.00

Option for printingOptions changed from normal to all
Total time (CPU seconds):       0.00   (Wallclock seconds):       0.00

Note that it is not the same output as the previous CBC log file

pchtsp commented 3 years ago

The first two logs are weird because of the small size and the presolving involved. I'm not sure if it's worth supporting inside orloge. I will take a look on the last one.

pchtsp commented 3 years ago

In fact, in the third one CBC reports -32 inside the progress, as you can see in your log. You could send the mps to the cbc repo https://github.com/coin-or/Cbc/ and see if that makes sense.

vepain commented 3 years ago

The first two logs are weird because of the small size and the presolving involved. I'm not sure if it's worth supporting inside orloge.

I understand that supporting it takes time, and I thank you for your work, but it will be very interesting to support such weird logs for teaching purpose (because I prefer to generalise the solvers outputs analyse for students, and I begin with very simple examples)

Furthermore, orloge seems to be the only one solver's outputs parser in python.

In fact, in the third one CBC reports -32 inside the progress, as you can see in your log. You could send the mps to the cbc repo https://github.com/coin-or/Cbc/ and see if that makes sense.

I am currently writing an issue