[Clp-tickets] [COIN-OR Linear Programming Solver] #24: Clp QP simple simplex failure
COIN-OR Linear Programming Solver
coin-trac at coin-or.org
Tue Sep 16 04:03:36 EDT 2008
#24: Clp QP simple simplex failure
------------------------+---------------------------------------------------
Reporter: nowozin | Owner: somebody
Type: defect | Status: new
Priority: major | Milestone:
Component: component1 | Version:
Keywords: |
------------------------+---------------------------------------------------
Using Clp trunk from 2008/09/15, I setup a QP problem as follows:
{{{
ClpSimplex* simplex = new ClpSimplex();
CoinPackedMatrix* matrix = new CoinPackedMatrix(false, 0, 0);
// ...
matrix->setDimensions(0, number_columns);
// ...
simplex->loadProblem(*matrix, varLB, varUB, objective, rowLB, rowUB);
// Setup the quadratic part of a simple "x'Ix + f'x" objective
// ...
simplex->loadQuadraticObjective(number_columns, start, column, w_q);
// Add some rows (~2000) of the form
for (...) {
// ...
simplex->addRow(dim + 1, col_index, col_el, lb, COIN_DBL_MAX);
}
// Solve
simplex->primal();
}}}
Clp produces the following output which seems to give the correct
objective
2310:
{{{
Clp0024I Matrix will be packed to eliminate 307230 small elements
Clp0006I 0 Obj 0 Primal inf 2310 (2310) Dual inf 2310 (2310)
Clp0029I End of values pass after 0 iterations
Clp0006I 0 Obj 0 Primal inf 2310 (2310) Dual inf 2310 (2310)
Clp0006I 200 Obj 0 Primal inf 2110 (2110) Dual inf 2110 (2110)
Clp0006I 400 Obj 0 Primal inf 1910 (1910) Dual inf 1910 (1910)
Clp0006I 600 Obj 0 Primal inf 1710 (1710) Dual inf 1710 (1710)
Clp0006I 800 Obj 0 Primal inf 1510 (1510) Dual inf 1510 (1510)
Clp0006I 1000 Obj 0 Primal inf 1310 (1310) Dual inf 1310 (1310)
Clp0006I 1200 Obj 0 Primal inf 1110 (1110) Dual inf 1110 (1110)
Clp0006I 1400 Obj 0 Primal inf 910 (910) Dual inf 910 (910)
Clp0006I 1600 Obj 0 Primal inf 710 (710) Dual inf 710 (710)
Clp0006I 1800 Obj 0 Primal inf 510 (510) Dual inf 510 (510)
Clp0006I 2000 Obj 0 Primal inf 310 (310) Dual inf 310 (310)
Clp0006I 2200 Obj 0 Primal inf 110 (110) Dual inf 110 (110)
Clp0006I 2310 Obj 0
Clp0000I Optimal - objective value 0
Clp0006I 0 Obj 2310
Clp0000I Optimal - objective value 2310
}}}
However, I check, as I do for LP's, the following
{{{
if (simplex->isProvenOptimal() == false) {
// error ...
}
}}}
which is triggered and dumps:
{{{
Quadratic Program Solver failed.
Problem: 2443 variables, 2310 rows.
Written problem to file "QP-CRASH.qps" for analysis.
problem sense: 1
STATUS: numerical difficulties: no
STATUS: primal infeasible: YES
STATUS: dual infeasible: no
STATUS: iteration limit reached: no
}}}
If I ignore the isProvenOptimal() check and try to obtain the objective
using
{{{
const double* primal = simplex->primalColumnSolution();
}}}
then it is all-zero, which is not a feasible point.
I checked the dumped QPS file and solved the problem using BPMPD which
solves
it with objective 2310 (see attached output logfile).
Am I using the interface incorrectly or is this a bug in Clp?
Also, if I want to disable any kind of presolve, is there a way to do this
using the ClpSimplex and ClpModel interfaces? (In initialSolve I can pass
a ClpSolve object, but how to do this just by calling primal()?)
Thanks.
--
Ticket URL: <https://projects.coin-or.org/Clp/ticket/24>
COIN-OR Linear Programming Solver <http://projects.coin-or.org/Clp>
A linear programming solver.
More information about the Clp-tickets
mailing list