Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
Expand all | Collapse all

non-integral bounds for integer variables rounded

  • 1.  non-integral bounds for integer variables rounded

    Posted 01/16/18 07:04 AM

    Originally posted by: savant_ning


    Hi  I have this problem, I don't know what's the warning meaning, the warning see attachment

    thanks


    #DecisionOptimization
    #MathematicalProgramming-General


  • 2.  Re: non-integral bounds for integer variables rounded

    Posted 01/16/18 07:49 AM

    Do you mean

    Warning -- Non-integral bounds for integer variables rounded.

    ? Isn't that self-explanaining? It says that you have integer variables that have non-integer bounds. Since integer variables can only take integer values, their bounds should also be integers and CPLEX has rounded the bounds appropriately. Having non-integer bounds on integer variables is likely to be a modeling or data error, hence CPLEX emits a warning.


    #DecisionOptimization
    #MathematicalProgramming-General


  • 3.  Re: non-integral bounds for integer variables rounded

    Posted 01/16/18 08:44 PM

    Originally posted by: savant_ning


    but my variables is all defined type :"B" or "C"

    so  this error means my variables defined by type "B"  data error or relative constraints have error?


    #DecisionOptimization
    #MathematicalProgramming-General


  • 4.  Re: non-integral bounds for integer variables rounded

    Posted 01/17/18 01:25 AM

    'B' is a special kind of integer variable (one that can take only values 0 and 1).


    #DecisionOptimization
    #MathematicalProgramming-General


  • 5.  Re: non-integral bounds for integer variables rounded

    Posted 01/17/18 02:14 AM

    Originally posted by: savant_ning


    yeah, "B" is a binary variables, the lb = 0.0; ub = 1.0.   my variables is correct,

     

    and below the warning, it give me ROW "cxxx" infeasible, all entries at implied bounds.

     

    I use problem.conflict.get()  and problem.conflict.all_constraints()

    it print :   no conflict  available

     

    and I check my constraints,  I think its no problem,  and the software has run some time,  about 20.82sec.

    and then it give me no solution exists.....

     

    How do I solve this problem?

     

    best regards


    #DecisionOptimization
    #MathematicalProgramming-General


  • 6.  Re: non-integral bounds for integer variables rounded

    Posted 01/17/18 02:50 AM

    You have to call Cplex.conflict.refine() before you can query any conflict. By default CPLEX does not compute a conflict because that may be time consuming.

    Please take a look at reference documentation of the refine function here, in particular at the code example given there.


    #DecisionOptimization
    #MathematicalProgramming-General


  • 7.  Re: non-integral bounds for integer variables rounded

    Posted 01/17/18 02:50 AM

    You may also call Cplex.write('model.sav.gz') and then post the model.sav.gz here. Then other people can take a look as well.


    #DecisionOptimization
    #MathematicalProgramming-General


  • 8.  Re: non-integral bounds for integer variables rounded

    Posted 01/17/18 08:05 AM

    Originally posted by: savant_ning


    okay, the model.sav.gz  in the first attachment, I don't know how to open it, I use SPSS and R to try open it, but it doesn't work

     

    and the second is the conflict print, is it means my variables value is outside range of my [lb,ub]?


    #DecisionOptimization
    #MathematicalProgramming-General


  • 9.  Re: non-integral bounds for integer variables rounded

    Posted 01/17/18 12:27 PM

    Only CPLEX can read SAV files.

    The error message looks odd, assuming you called Cplex.conflict.refine(). Could it be that you called Cplex.conflict.refine_MIP_start() instead?

    In any case, the conflict in your model is this (you did not assign names to variables/constraints, so the SAV file only has default names):

    Subject To
     c518:  - x2 + x16 <= -700
     c5033: - 5182 x1 - x2 + x7201 >= 0
    Bounds
     0 <= x1 <= 1
          x2 Free
          x16 >= 0
     0 <= x7201 <= 1
    Binaries
     x1  x7201
    Generals
     x2  x16

    The first constraints requires x2>=700 but with the bounds on the variables there is no way to satisfy the second constraint in case x2>=700 (the second constraint requires x2>=-1).


    #DecisionOptimization
    #MathematicalProgramming-General


  • 10.  Re: non-integral bounds for integer variables rounded

    Posted 01/17/18 10:08 PM

    Originally posted by: savant_ning


    yup, I called cplex.conflict.refine_MIP_start(), and I call cplex.conflict.refine() again, it give me this output. see attachment

     

    and I checked my code, the variables initial bounds are no problem...

    maybe the bounds in my constraints have problem?

    I'm checking my constraints now

     

    very thanks

    best regards

     


    #DecisionOptimization
    #MathematicalProgramming-General


  • 11.  Re: non-integral bounds for integer variables rounded

    Posted 01/18/18 12:34 AM

    Didn't you follow the code example in the reference documentation of the refine() function like I suggested? Your output looks good but it seems you are still trying to access a solution. This does not exist since your model is infeasible! The code example also shows how to display the constraints that participate in the conflict.

    I would not know whether your problem is with variable bounds or with the constraints since I don't know what you are trying to model. I suggest to assign names to all variables and constraints and then check whether the offending bounds and constraints look as expected.


    #DecisionOptimization
    #MathematicalProgramming-General


  • 12.  Re: non-integral bounds for integer variables rounded

    Posted 01/19/18 03:24 AM

    Originally posted by: savant_ning


    okay,very thank u.

    I have get optimal solution~

    My data have conflict with my constraint, I regenerate mt data, and the model has solution.

     

    best regrads


    #DecisionOptimization
    #MathematicalProgramming-General