Decision Optimization

Decision Optimization

Delivers prescriptive analytics capabilities and decision intelligence to improve decision-making.


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  an eeror solution to mip

    Posted 08/12/16 09:22 AM

    Originally posted by: RainLee


    I need your help!

    I ues the cplex to solve a mip problem, its export file named uc.lp is in the attachments, the cplex solver gives a optimal solution that x26 =26.5   x27 =0,however the solution is  conflict with  constraints c166 and c167, then , ,how can i solve it.,why the solver givers a error solution.


    #DecisionOptimization
    #MathematicalProgramming-General


  • 2.  Re: an eeror solution to mip

    Posted 08/12/16 11:50 AM

    What version of CPLEX do you use? With 12.6.3 I get x26=26.5 and x27=1 here. I also tried several other versions of CPLEX and I always get x27=1.

    How do you read out the solution values? Are you doing this in a programming API? If so, are just casting the double values to integers (which may truncate something like 0.999999 to 0) or do you properly round them?


    #DecisionOptimization
    #MathematicalProgramming-General


  • 3.  Re: an eeror solution to mip

    Posted 08/12/16 11:50 PM

    Originally posted by: RainLee


    I use the 12.5 accademic version of CPLEX,  I fist make the program in visual stuido 2010 c++, in program , I define x27 ILOINT and 0 <=x27<=1, and use the expresssion "int ((double(cplex.getValue(x27))+0.5));" and "cplex.getValue(x27)" to get the value, if i add the expression "cplex.setParam(IloCplex::EpGap, 0.05;"before cplex.solve(),  then it is 1, however if I add the expression "cplex.setParam(IloCplex::EpGap, 0.001);" or do not add any expression before the solve(), it will get the wrong solution x27= 0, then I exprot the model to uc.lp file

    In API, after the command "read uc.lp" and "optimize", do "display solution variables x27", it is still 0, the iteration of the soution is in the UCAPI in the attachments. how can i solve it .:

     


    #DecisionOptimization
    #MathematicalProgramming-General


  • 4.  Re: an eeror solution to mip

    Posted 08/16/16 10:10 AM

    I reproduced the problem here. You have run into a bug that has been fixed by now. Can you upgrade your CPLEX version (12.5 is rather old)? The bug should be fixed in 12.5.1 and newer.


    #DecisionOptimization
    #MathematicalProgramming-General