Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  get solution

    Posted 07/23/12 08:49 AM

    Originally posted by: IsaMD


    Hi!

    I am working with a MIP problem and I have problems with the number of infeasible integer variables. For example, the output of CPLEX says:

    Node Left Objective IInf Best Integer Best Node ItCnt Gap
    3 3 3199.6842 780 3206.6842 22112

    But when I get the solution in mybranchcallback it does not have 780 fractional variables! I am interested on get the solution with 780 fractional variables.
    Could you please tell me which function i must call to get exactly the solution CPLEX report?
    Thanks in advance!
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: get solution

    Posted 07/23/12 10:34 AM

    Originally posted by: SystemAdmin


    How many fractional variables do you observe in your branch callback? More or less than 780? How do you decide whether a variable is fractional? Do you use appropriate tolerances? Could you show us the code snippet that obtains the solution in the callback and counts the number of fractional variables?
    And finally, what API are you using? C, C++, Java, C#, Python?
    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: get solution

    Posted 07/24/12 08:30 AM

    Originally posted by: IsaMD


    I observe more than 780 fractional variables. I decide that a variable "x" is fractionial if 0.0001 < x < 0.999
    I use the deafult tolerances.



    int status = CPXgetcallbacknodex (env, cbdata, wherefrom, x,0,numcols-1);
    int cant=0;
    for(i=0;i<numcols;i++){
    if(x[i]>0.0001 && x[i]<0.999) cant++;
    }
    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: get solution

    Posted 07/24/12 09:19 AM

    Originally posted by: SystemAdmin


    One more question: What value of CPX_PARAM_MIPCBREDLP do you use? In case you leave that parameter at its default value, did you consider that the callback will work with the presolved model (which may have a different number of columns than the original model)?
    Also, in your code snippet I see that you don't check the status return value of CPXgetcallbacknodex(). Did you just leave that out or do you really ignore that return value? If you ignore that the first thing to do is to check whether it is 0.
    #CPLEXOptimizers
    #DecisionOptimization