[FlopCpp] Flopc++ and Cgl
Marco Caserta
marcocaserta at gmail.com
Sat Jul 19 16:57:02 EDT 2008
I am trying to add one cut from the Cgl collection, e.g., CglProbing. The
model is correctly defined but it seems that no cuts are ever added to it.
Could anyone please help. Thanks,
Marco Caserta
This is the code I have:
MP_model m1(new OsiCbcSolverInterface);
<here the model is properly defined>
// add cut
OsiCuts cuts;
CglProbing probGen;
probGen.setMaxProbe(10);
probGen.generateCuts(*m1.Solver, cuts);
m1.Solver->applyCuts(cuts);
cout <<cuts.sizeCuts() <<" cuts were generated" <<endl;
<here I get that 0 cuts have been added>
m1.minimize();
> OsiCuts cuts;
> CglProbing probGen;
> probGen.setUsingObjective(true);
> probGen.setMaxPass(1);
> probGen.setMaxPassRoot(5);
> // Number of unsatisfied variables to look at
> probGen.setMaxProbe(10);
> probGen.setMaxProbeRoot(1000);
> // How far to follow the consequences
> probGen.setMaxLook(50);
> probGen.setMaxLookRoot(500);
> // Only look at rows with fewer than this number of elements
> probGen.setMaxElements(200);
> probGen.setRowCuts(30);
>
> probGen.generateCuts(*m1.Solver, cuts);
>
> m1.Solver->applyCuts(cuts);
> cout <<cuts.sizeCuts() <<" cuts were generated" <<endl;
>
> m1.attach();
> //m1.minimize(sum(F, fixed(F)*y(F)) + sum(F, sum(C, cost(F,C)*x(F,C))));
> m1.minimize();
>
I am trying to add one cut from the Cgl collection, e.g., CglProbing. This
is the code I have:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.coin-or.org/pipermail/flopcpp/attachments/20080719/4f57e932/attachment.html
More information about the FlopCpp
mailing list