[Cbc] provide initial column solution from command line?
James Howey
james.howey at gmail.com
Mon Sep 17 20:26:31 EDT 2018
Is it possible?
I have a model that quickly comes up with a weak integer solution. I want to
take that result and use it as the starting point for another solve, same
columns, tighter objective.
My expectation is that, if I have a problem that arrives at optimum after
say 300 nodes, then I should be able to take the optimum solution, and feed
it back into cbc with the same problem and see an immediate optimum reached.
In efforts to achieve this demonstration, I have been working with the
"prio" command.
I have a file formatted like this:
name,solution
E_draw(0),-100000
E_draw(1),-111112.61
E_draw(10),-109772.28
Which I feed to cbc:
cbc.exe c:\temp\store\lpmodel\1_292_279_2.lp -directory
c:\temp\store\lpmodel\ -preprocess on -prio 1_292_279_2.values -solve -solu
1_292_279_2.val.out.solution -quit
with no apparent effect. Is "solution" the right column header? It seems to
go straight to the linear solution ignoring the proffered solution.
I figured I would try the "force" command argument. With "-force 0" I get
the immediate result I seek, but unfortunately:
2 fields and 3855 records
forceSolution was changed from -1 to 0
Continuous objective value is 0 - 0.35 seconds
Cbc0045I Solution with objective value 0 saved
Cbc0006I The LP relaxation is infeasible or too expensive
Cbc0045I Solution of 0 already found by heuristic
Cbc0039I On closer inspection - solution discarded
Cbc0039I On closer inspection - solution discarded
Cbc0039I On closer inspection - solution discarded
Cbc0021I On closer inspection node is infeasible
Result - Linear relaxation infeasible
Objective value:
100000000000000007629769841091887003294964970946560.00000000
Enumerated nodes: 0
Total iterations: 0
Time (CPU seconds): 1.06
Time (Wallclock seconds): 1.06
Other values for force don't seem to do anything. I note the solutionIn is
initialized like so:
if (got[6] >= 0) {
solutionIn =
reinterpret_cast<double *> (malloc(numberColumns * sizeof(double)));
for (iColumn = 0; iColumn <
numberColumns; iColumn++)
solutionIn[iColumn] =
-COIN_DBL_MAX;
}
I expect that is by design, but if sparsely specified values are left at
-COIN_DBL_MAX that would be bad?
I have a bunch of SOS in the model. Do we have to turn the crank to get SOS
state to match the provided column values?
Any tips or hints will be appreciated.
Thanks,
jkh
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/cbc/attachments/20180917/6e084588/attachment.html>
More information about the Cbc
mailing list