[Couenne] How to extract best solution so far ?

Pete Janes ppjanes at gmail.com
Wed Mar 3 23:45:20 EST 2010


Hi Bruno,

I think you need to consult the Cbc manual.

I have been trying to store a list of the best solution myself, and I
believe it involves modifying the CBC source code, not the Couenne
source code. Right now, I just trap the solution in

void
CbcModel::setBestSolution (CBC_Message how,
			   double & objectiveValue, const double *solutionIn,
			   int fixVariables)

In Cbc/CbcModel.cpp

this routine is called whenever a solution is found. It then verifies
whether the solution is feasible. The solution is "const double
*solutionIn" and the associated objective value is "double &
objectiveValue."

Unfortunately this involves recompiling the source, I am not sure if
there is a parameter you can pass to Cbc to do this automatically.

Kind regards,

Pete



On Thu, Mar 4, 2010 at 10:37 AM, Bruno Conti Marini <bcmarini at gmail.com> wrote:
> Hello,
>
> I am running Couenne with "time_limit 7200". After that time limit expires I
> print the value of the variables. Are these values the ones from the best
> solution found ? Is there a way to store the variables' values once a
> integer solution is found (or even stop the execution once a integer
> solution is found) ?
>
> I didn't find any mention of this on the "Couenne User's Manual" neither on
> the generated documentation (doxydoc).
>
> Thanks for your time.
>
> --
> Bruno Conti Marini
> M. Sc. Computer Science Student
> Institute of Computing, UNICAMP
> http://www.students.ic.unicamp.br/~ra042272/
>
> _______________________________________________
> Couenne mailing list
> Couenne at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/couenne
>



More information about the Couenne mailing list