[FlopCpp] using presolve

Michal Kaut mail at michalkaut.net
Mon Jun 11 03:26:28 EDT 2007


Hello,

is it possible to use presolve for FlopC++ MP_model objects?
I managed to create and solve a presolve object, but have not succeeded 
in making FlopC++ aware of the new values: even after postsolve, 
model.getStatus() remains UNKNOWN and the values of variables are 
undefined. Is there any way around this?

I am doing the following:
1. MP_model model(new OsiGlpkSolverInterface);
2. [.. model definition ..]
3. model.attach();
4. OsiPresolve pinfo;
5. OsiSolverInterface *presolvedModel ;
6. presolvedModel = pinfo.presolvedModel(*model.Solver) ;
7. presolvedModel->initialSolve() ;
8. presolvedModel->branchAndBound() ; // it is an MIP model
9. pinfo.postsolve(true) ;
10. delete presolvedModel ;
11. model.minimize();

The reason I want to use pre-solve is that it solves much faster: steps 
7. and 8. take 0.4 seconds, while step 11. takes 3.9 seconds.
-The reason I am using glpk is that Cbc is much slower, taking 6 seconds 
(15x more!) in for steps 7. and 8. and 7.1 seconds in step 11.
-By the way, if write MPS files and run GlpSol on them, the original 
model is solved in 1.2 second and the pre-solved one in 0.9.


Any help would be greatly appreciated.


Regards,
Michal Kaut


More information about the FlopCpp mailing list