[Clp] Save and restore an LP solution/basis?
John Forrest
john.forrest at fastercoin.com
Fri Oct 15 03:14:04 EDT 2010
Francis,
The problem is bad documentation.
In test_basis.cpp at lines 34 and 39 there is
restore->primal(1);
This tells primal to believe in the incumbent primal solution more than
the basis flags. The solution is all zero at this point so the code
will flip some slacks to their other bound - not a good idea.
If you change those lines to
restore->primal();
it is all fine as then it ignores the primal solution.
However a more robust solution is to save the values. So I would
suggest leaving the lines as primal(1) and modifying line 23 to
original->writeBasis("sav.bas",true);
John Forrest
More information about the Clp
mailing list