coin-or / python-mip

Python-MIP: collection of Python tools for the modeling and solution of Mixed-Integer Linear programs
Eclipse Public License 2.0
518 stars 92 forks source link

Solvable models is declared as infeasible #161

Closed sebheger closed 2 years ago

sebheger commented 3 years ago

Describe the bug CBC says, that a model which is feasible and could be solved by another solver is infeasible.

Welcome to the CBC MILP Solver 
Version: Trunk
Build Date: Sep  8 2020 

Starting solution of the Linear programming relaxation problem using Dual Simplex

Clp0024I Matrix will be packed to eliminate 116 small elements
Coin0506I Presolve 182 (-810) rows, 218 (-642) columns and 650 (-2739) elements
Clp0014I Perturbing problem by 0.001% of 14445.032 - largest nonzero change 0.014362788 ( 7.8610431%) - largest zero change 0.013870201
Clp0000I Optimal - objective value 6.0121255e+10
Coin0511I After Postsolve, objective 6.0121255e+10, infeasibilities - dual 0 (0), primal 0 (0)
Clp0032I Optimal objective 6.0121255e+10 - 68 iterations time 0.002, Presolve 0.00

Starting MIP optimization
Cgl0003I 0 fixed, 4 tightened bounds, 19 strengthened rows, 0 substitutions
Cgl0004I processed model has 193 rows, 229 columns (24 integer (20 of which binary)) and 687 elements
Coin3009W Conflict graph built in 0.000 seconds, density: 0.019%
Cgl0015I Clique Strengthening extended 0 cliques, 0 were dominated
Cbc0038I Initial state - 0 integers unsatisfied sum - 1.04632e-07
Cbc0038I Solution found of 6.01213e+10
Cbc0038I Branch and bound needed to clear up 1 general integers
Cbc0038I Full problem 193 rows 229 columns, reduced to 142 rows 148 columns - too large
Cbc0038I Mini branch and bound could not fix general integers
Cbc0038I No solution found this major pass
Cbc0038I Before mini branch and bound, 23 integers at bound fixed and 133 continuous
Cbc0038I Full problem 193 rows 229 columns, reduced to 6 rows 9 columns
Cbc0038I Mini branch and bound did not improve solution (0.03 seconds)
Cbc0038I After 0.03 seconds - Feasibility pump exiting - took 0.01 seconds
Cbc0001I Search completed - best objective 1e+50, took 0 iterations and 0 nodes (0.04 seconds)
Cbc0035I Maximum depth 0, 0 variables fixed on reduced cost
Total time (CPU seconds):       0.04   (Wallclock seconds):       0.04

INFO:planning_optimizer.optimization:Infeasible

To Reproduce See infeasible_feasible.lp.zip

Expected behavior Model should be solved

Desktop (please complete the following information):

Additional context From the logs I could interpret, that also CBC found a solution, but when trying to access this, it fails.

gt6989b commented 3 years ago

@sebheger which other solver were you using to get a solution? I am in a similar situation (see my mention of your issue above) but need to be able to produce reliable solutions. Thanks for your help

sebheger commented 3 years ago

Sorry for the late response @gt6989b. We used gurobi.

sebheger commented 2 years ago

Could not reproduce anything with my submitted .lp file :-( Some variables are not showing up either in target or a constraint ...