[FlopCpp] getStatus return false OPTIMAL
Vishy Jeet
vishv.jeet at gmail.com
Wed May 9 12:32:03 EDT 2007
Hi Everyone,
I am running the following little program. My class "dir" has a set of
binary variables called "X".
After minimization getStatus() return "OPTIMAL" while Xs are displayed as
fractional. When I
solve the mipModel.mps using CPLEX: it tells me the problem is infeasible! I
don't understand
why cbc solver is returning false message OPTIMAL. Any help on this is
appreciated.
regards,
vishy
#include "mathModel.h"
typedef enum {SUCCESS = 0, FAILURE = -1};
int main() {
int retcode = FAILURE;
container c; /* container class
object that will contains all data*/
c.readData("c:/dataLocation");
dir instance(c); /* Instantiate an object
of dir class */
instance.minimize();
retcode = instance.getStatus();
if (MP_model::OPTIMAL == retcode){
instance->writeMps("mipModel", "mps", 1.0);
instance.X.display("instance (X)");
cout<<"obj val:="<<instance->getObjValue()<<endl;
}
return SUCCESS;
}// main
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://list.coin-or.org/pipermail/flopcpp/attachments/20070509/28596622/attachment.html
More information about the FlopCpp
mailing list