[Cbc] Multiple Optimal Solutions
Gabrielle A. Grun
grun at cs.sfu.ca
Thu Mar 1 01:25:27 EST 2012
Hi John,
Are you really talking about multiple OPTIMAL answers or multiple intermediate solutions and possibly one optimal solution?
Thanks.
----- Original Message -----
From: John Forrest
To: cbc at list.coin-or.org
Sent: Wednesday, February 29, 2012 12:55 AM
Subject: Re: [Cbc] Multiple Optimal Solutions
Seeing the discussion of multiple solutions, I have made a few changes
to Cbc/trunk.
I have modified Cbc/examples/driver4.cpp to show how you can print
solutions to preprocessed problem. This example can be used in
Cbc/stable, but then user has to know if they are doing preprocessing as
the test may not be correct. The values of the variables which are
still in the problem are printed correctly with the correct sequence
number (or name). The values of variables which were preprocessed out
are not printed. If the change below to Cbc is satisfactory then, at
greater computational expense, the complete solution could be printed.
Cbc trunk has been altered so that postprocessing can be done several
times on different solutions. As Cbc trunk normally uses Cgl/stable and
as stable code should not be modified too much, I have had to
temporarily make it a conditional compile. So add -DKEEP_POSTPROCESS to
CXXDEFS in configure. When Cgl/trunk migrates to stable, this will not
be necessary.
Multiple solutions can now be printed or printed to file from the
executable. There is a new integer parameter maxSolutions and a new
command nextB(estsolution) which acts like "solution", but works on the
second best solution and then moves all others up. The best solution is
never touched. So -
cbc ...... -solve -solution best.sol -nextbest 2.sol -nextbest 3.sol
-solution best2.sol
would put the best solution to best.sol and best2.sol while the second
best goes to 2.sol and the third best to 3.sol. There is no action if
no solution.
This was all a quick fix - I hope it helps.
John Forrest
_______________________________________________
Cbc mailing list
Cbc at list.coin-or.org
http://list.coin-or.org/mailman/listinfo/cbc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/cbc/attachments/20120229/8f008692/attachment.html>
More information about the Cbc
mailing list