[Cbc] Re: Problem with Cbc after FPump Heuristic

John J Forrest jjforre at us.ibm.com
Fri Sep 21 11:02:39 EDT 2007


Stefano,

There does seem to be a problem with FPump in Cbc/stable.  It is not there 
in Cbc/trunk so I will try and move some code to stable.  There are 
significant improvements to FPump in trunk, but not all will get moved.  I 
will fix it in stable/1.2 as I have that checked out.  Do you need it 
fixed in stable/1.1?

John



Stefano Gliozzi/Italy/IBM at IBMIT 
09/21/2007 08:35 AM

To
cbc at list.coin-or.org
cc
John J Forrest/Watson/IBM at IBMUS, Fabio Bresciani/Italy/IBM, Mauro Scarioni
Subject
Problem with Cbc after  FPump Heuristic





Hi, 

I'm having some problems, possibly connected with the FPump. I'm using Cbc 
1.1.1 under Windows XP. The attached mps file solves in few seconds using 
the attached cpp program (which optimizes the mpsfile and generates the 
case); however, the Cbc claims that the (Optimal) solution found has a 
value of 5, but checking with the variables (i.e.performing a loop summing 
up the product of the activities times their Objective function entry, as 
they are i n the Cbc arrays) the actual result is 27. 

To perform the check I use this code fragment: at the very end of the 
driver:

 // Plain : Check the solution value multiplying each column by its entry 
in OBJ
//         and sum  up them

        long ncol=thisModel.getNumCols();
        const double *colAct=thisModel.bestSolution();  // pick up best 
solution activities
        const double *colObj=thisModel.getObjCoefficients();
        double computedValue=0.0;
 


        for (int i=0; i<ncol; i++) {
                if (fabs(colAct[i])>1.0e-5) {
                        if ((colObj[i]) != 0.0) {
                                computedValue+=colObj[i]*colAct[i];
                                std::cout << " Column" << i << " 
Activity=" << colAct[i] << " Obj Coeff.=" << colObj[i] << "\n";
                        }
                }
        }
        std::cout << " Objective Value computed by Cbc = " << 
thisModel.getObjValue() << "\n";
        std::cout << " Objective Value computed by this program = " << 
computedValue << "\n";
        if (fabs(computedValue-thisModel.getObjValue())>1.0e-6) {
                std::cout << "\n SOMETHING WRONG HERE ? : THE TWO DON'T 
MATCH \n";
        } else {
                std::cout << "1n It is all ok: the two values match \n";
        }
        std::cout << " \n \n --------ENDING SOLUTION 
CHECK--------------------\n";


 
If I just flag the FPump heuristic in the driver, I obtain a correct 
result (i.e. the value is 5 and it passes the test above).
Could you please help me ?  Is it something I misunderstood in the usage 
of FPump ? 

[attachment "pippo.mps" deleted by John J Forrest/Watson/IBM] [attachment 
"CbcBugCase.hpp" deleted by John J Forrest/Watson/IBM] [attachment 
"CbcBugCase.cpp" deleted by John J Forrest/Watson/IBM] 

Best regards / ciao

Stefano
 
Senior Managing Consultant 
CMC-Certified Management Consultant
IBM Global Business Services
Ph.   +39-06-596-65477,   Mobile +39-335-7389709
Fax. +39-06-596-65477
e-mail: stefano_gliozzi @ it.ibm.com
mail: Via Sciangai, 53 - 00144 Roma - ITALY
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.coin-or.org/pipermail/cbc/attachments/20070921/675d686a/attachment.html


More information about the Cbc mailing list