[Clp] Solver seems to work forever after deciding the problem is infeasible

Robin Whittle rw at firstpr.com.au
Sat Apr 30 08:32:54 EDT 2016


My program calls the CLP solver repeatedly with different LPs, each an
elaboration of the last.  In some instances the call to the CLP solver
seems to run indefinitely, such as for days, instead of taking seconds
or perhaps minutes.

In these cases I am loading a basis, using dual simplex and use
setDualTolerance(1e-6), although the same problem happens with smaller
tolerances, including down to the default 1e-7.  Since I am loading the
basis, I am not using presolve, which I understand is the correct
approach.  If not using a basis, I do use presolve.

As far as I know, perturbation is on by default, with its value
defaulting to 100.   I have not been able to clearly understand what the
default is, but adding setPerturbation(100) caused no change in program
behaviour.  This and the setDualTolerance() call are with an object of
class ClpSimplex.

Turning on log level 4, I see this text for a complete successful LP
solution:

/// 1

Clp0008I Bounds were tightened 438514 times
Clp1001I Initial range of elements is 7.8e-005 to 3.1090929e+010
Clp1002I Range of elements is 1.0618171e-006 to 941781.75
Clp1002I Range of elements is 0.0010304451 to 970.45441
Clp1003I Final range of elements is 0.0033077852 to 100
Clp0022I Absolute values of scaled rhs range from 0.031369493 to
65000000, minimum gap 1e+100
Clp0020I Absolute values of scaled objective range from 10.834312 to
5.4569884e+012
Clp0021I Absolute values of scaled bounds range from 4.042535e-009 to
942.08618, minimum gap 1e-005
Clp0060I Primal error 1.0913936e-011, dual error 0.0085075928
Clp0060I Primal error 1.0913936e-011, dual error 0.0085075928
Clp0000I Optimal - objective value 1.3974462e+010
Clp0033I Dual took 0.80 seconds (total 0.80)
Clp0032I Optimal objective 1.397446215e+010 - 0 iterations time 0.802

/// 1


After calling the CLP solver with the next LP, the one which causes the
solver to run for days, the initial lines are strikingly different:


/// 2

Clp0009I 1 infeasibilities
Clp3003W Analysis indicates model infeasible or unbounded
Clp1001I Initial range of elements is 7.8e-005 to 3.1090929e+010
Clp1002I Range of elements is 1.0618171e-006 to 941781.75
Clp1002I Range of elements is 0.0010304451 to 970.45441
Clp1003I Final range of elements is 0.0033077852 to 100
Clp0022I Absolute values of scaled rhs range from 0.031369493 to
65000000, minimum gap 1e+100
Clp0020I Absolute values of scaled objective range from 10.834312 to
5.4569884e+012
Clp0021I Absolute values of scaled bounds range from 4.042535e-009 to
9417.8175, minimum gap 1e-005
Clp0060I Primal error 1.0913936e-011, dual error 0.0085075928
Clp0060I Primal error 1.0913936e-011, dual error 0.0085075928
Clp0006I 0  Obj 1.3975019e+010 Primal inf 0.084764649 (14)
Clp0060I Primal error 1.0913936e-011, dual error 0.0085075928
Clp0006I 89  Obj 1.3973379e+010 Primal inf 9.6015586 (141)
Clp0010I Flagging variable R733
Clp0010I Flagging variable C460076
Clp0010I Flagging variable C471565
... ... ...

/// 2


These first two lines:

Clp0009I 1 infeasibilities
Clp3003W Analysis indicates model infeasible or unbounded

are hard to find on the Web, with or without the first Clpxxxxx word.
The only page in which I found them both was:

  http://list.coin-or.org/pipermail/osi/2009-September/000292.html

That was with primal simplex.  This listing does not seem to be
associated with my problem - interminable run times when the solver has
already figured out that the problem is infeasible.

I am sure I am missing something, but I have not been able to figure out
what to do to get the solver to return immediately, or perhaps to return
after some reasonable time.  I assume that the first two lines are the
final word, and that no amount of work will cause the solver to find the
LP feasible.

As far as I know, there's no way of saving the LP to an MPS file, since
the call for that: writeMpsNative() is for objects of class
OsiClpSolverInterface, and my model is in a ClpSimplex object.

  Robin




More information about the Clp mailing list