Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Difference about getIIS and refineConflict

    Posted 12/12/12 03:36 AM

    Originally posted by: SystemAdmin


    Hi everyone,
    I'm using cplex to solve a linear programming problem. Since the time of invoking getIIS is long when the size of the problem is large, I try to use refineConflict method
    to find the minimal conflict instead. But the result of invoking getIIS and refineConflict is different. Below is the result of a unsatisfiable linear programming problem.

    The result of invoking getIIS
    :IloRange 3_4 : 0.0 <= (-1.0*water_t_4 + 1.0*water_v_1_4) <= infinity
    IloRange 3_4 : 5.0 <= (2.0*water_t_4 + 1.0*water_v_2_4) <= infinity
    IloRange 4_5 : 0.0 <= (-1.0*water_v_2_4 - 1.0*water_t_5 + 1.0*water_v_2_5) <= infinity
    IloRange 4_5 : 2.0 <= (1.0*water_v_1_4) <= 2.0
    IloRange 5_6 : 0.0 <= (1.0*water_v_2_5) <= 0.0

    The result of invoking refineConflict(the first parameter is the whole linear constraints and the second is a array in which the member is set to 1) .
    Possible : IloRange 4_5 : 2.0 <= (1.0*water_v_1_4) <= 2.0
    Possible : IloRange 5_6 : 0.0 <= (1.0*water_v_2_5) <= 0.0

    I feel confused about the results given by the two methods.
    Thanks for your help.
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Difference about getIIS and refineConflict

    Posted 12/13/12 03:48 AM

    Originally posted by: SystemAdmin


    Hi Friend
    Can you give me your input linear infeasible CSP ?
    Thanks
    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: Difference about getIIS and refineConflict

    Posted 12/13/12 08:37 AM

    Originally posted by: SystemAdmin


    > SF1U_mohammed_bekkouche wrote:
    > Hi Friend
    > Can you give me your input linear infeasible CSP ?
    > Thanks
    The version of my cplex is cplex125 and I invoke it through java api.
    Below is the infeasible linear constraints:
    IloRange 0_1 : 0.0 <= (-1.0*water_t_1 + 1.0*water_v_1_1) <= infinity
    IloRange 0_1 : -infinity <= (-1.0*water_t_1 + 1.0*water_v_1_1) <= 0.0
    IloRange 0_1 : 1.0 <= (-1.0*water_t_1 + 1.0*water_v_2_1) <= infinity
    IloRange 0_1 : -infinity <= (-1.0*water_t_1 + 1.0*water_v_2_1) <= 1.0
    IloRange 1 : -infinity <= (1.0*water_v_2_1) <= 10.0
    IloRange 1_2 : 0.0 <= (-1.0*water_t_2 + 1.0*water_v_1_2) <= infinity
    IloRange 1_2 : -infinity <= (-1.0*water_t_2 + 1.0*water_v_1_2) <= 0.0
    IloRange 1_2 : 10.0 <= (-1.0*water_t_2 + 1.0*water_v_2_2) <= infinity
    IloRange 1_2 : -infinity <= (-1.0*water_t_2 + 1.0*water_v_2_2) <= 10.0
    IloRange 2 : -infinity <= (1.0*water_v_1_2) <= 2.0
    IloRange 1_2 : 10.0 <= (1.0*water_v_2_1) <= 10.0
    IloRange 2_3 : 2.0 <= (-1.0*water_t_3 + 1.0*water_v_1_3) <= infinity
    IloRange 2_3 : -infinity <= (-1.0*water_t_3 + 1.0*water_v_1_3) <= 2.0
    IloRange 2_3 : 0.0 <= (-1.0*water_v_2_2 + 2.0*water_t_3 + 1.0*water_v_2_3) <= infinity
    IloRange 2_3 : -infinity <= (-1.0*water_v_2_2 + 2.0*water_t_3 + 1.0*water_v_2_3) <= 0.0
    IloRange 3 : 5.0 <= (1.0*water_v_2_3) <= infinity
    IloRange 2_3 : 5.0 <= (1.0*water_v_2_2) <= infinity
    IloRange 2_3 : 2.0 <= (1.0*water_v_1_2) <= 2.0
    IloRange 3_4 : 0.0 <= (-1.0*water_t_4 + 1.0*water_v_1_4) <= infinity
    IloRange 3_4 : -infinity <= (-1.0*water_t_4 + 1.0*water_v_1_4) <= 0.0
    IloRange 3_4 : 5.0 <= (2.0*water_t_4 + 1.0*water_v_2_4) <= infinity
    IloRange 3_4 : -infinity <= (2.0*water_t_4 + 1.0*water_v_2_4) <= 5.0
    IloRange 4 : -infinity <= (1.0*water_v_1_4) <= 2.0
    IloRange 3_4 : 5.0 <= (1.0*water_v_2_3) <= 5.0
    IloRange 4_5 : 2.0 <= (-1.0*water_t_5 + 1.0*water_v_1_5) <= infinity
    IloRange 4_5 : -infinity <= (-1.0*water_t_5 + 1.0*water_v_1_5) <= 2.0
    IloRange 4_5 : 0.0 <= (-1.0*water_v_2_4 - 1.0*water_t_5 + 1.0*water_v_2_5) <= infinity
    IloRange 4_5 : -infinity <= (-1.0*water_v_2_4 - 1.0*water_t_5 + 1.0*water_v_2_5) <= 0.0
    IloRange 5 : -infinity <= (1.0*water_v_2_5) <= 10.0
    IloRange 4_5 : -infinity <= (1.0*water_v_2_4) <= 10.0
    IloRange 4_5 : 2.0 <= (1.0*water_v_1_4) <= 2.0
    IloRange 5_6 : 0.0 <= (-1.0*water_v_1_5 + 1.0*water_v_1_6) <= infinity
    IloRange 5_6 : -infinity <= (-1.0*water_v_1_5 + 1.0*water_v_1_6) <= 0.0
    IloRange 5_6 : 0.0 <= (1.0*water_v_2_6) <= infinity
    IloRange 5_6 : -infinity <= (1.0*water_v_2_6) <= 0.0
    IloRange 5_6 : 0.0 <= (1.0*water_v_2_5) <= 0.0
    Here is my code:
    
    cplex=
    
    new IloCplex(); cplex.setParam(IloCplex.IntParam.Threads,1); cplex.setParam(IloCplex.IntParam.RootAlg, IloCplex.Algorithm.Concurrent); cplex.addRangel()... 
    
    if(!cplex.solve)
    { IloConstraint[] arr is the whole linear constraints 
    
    double prefs[] = 
    
    new 
    
    double[arr.length]; Arrays.fill(prefs, 1); 
    
    if(cplex.refineConflict(arr, prefs))
    { ConflictStatus[] conflicts = cplex.getConflict(arr); 
    
    for (
    
    int i1 = 0; i1 < conflicts.length;i1++ )
    { 
    
    if(conflicts[i1]== ConflictStatus.Member) System.out.println(
    " Proved : " + arr[i1]); 
    
    else 
    
    if (conflicts[i1]==ConflictStatus.PossibleMember) System.out.println(
    " Possible : " + arr[i1]); 
    } 
    } 
    }
    

    #CPLEXOptimizers
    #DecisionOptimization


  • 4.  Re: Difference about getIIS and refineConflict

    Posted 12/13/12 10:44 AM

    Originally posted by: SystemAdmin


    Did the conflict refiner run to completion or did it hit a time/node/memory limit? Could you show us the log file output of the conflict refiner?
    If the conflict refiner runs to completion then all constraints should be either 'Excluded' or 'Member'. There should be no 'PossibleMember' left.
    I think you also want to add the bounds of the variables to the constraints that are considered by the conflict refiner. See the reference documentation of IloNumVarBound and of IloCplex.upperBound(), IloCplex.lowerBound() and IloCplex.refineConflict() to learn how to do that.
    #CPLEXOptimizers
    #DecisionOptimization


  • 5.  Re: Difference about getIIS and refineConflict

    Posted 12/13/12 08:55 PM

    Originally posted by: SystemAdmin


    I invoke cplex through java API and set no limitation. I don't know how to get the log file.
    #CPLEXOptimizers
    #DecisionOptimization


  • 6.  Re: Difference about getIIS and refineConflict

    Posted 12/13/12 11:57 PM

    Originally posted by: SystemAdmin


    Below is the log cplex outputs when it solves the model.
    Bound infeasibility column 'water_t_5'.
    Presolve time = 0.00 sec. (0.01 ticks)
    

    #CPLEXOptimizers
    #DecisionOptimization


  • 7.  Re: Difference about getIIS and refineConflict

    Posted 12/14/12 08:41 AM

    Originally posted by: SystemAdmin


    Thanks for your suggestion and I add the bound of the variable. Below is the invoking code:
    
    Iterator it=cplex.getModel().iterator(); 
    
    while(it.hasNext())
    { IloAddable adds=(IloAddable)it.next(); 
    
    if(adds 
    
    instanceof IloRange)
    { full.add((IloConstraint)adds); 
    } 
    
    else
    { IloNumVar var=(IloNumVar)adds; 
    
    if(var.getLB()>Double.NEGATIVE_INFINITY) full.add(cplex.lowerBound(var)); 
    
    if(var.getUB()<Double.POSITIVE_INFINITY) full.add(cplex.upperBound(var)); 
    } 
    } IloConstraint[] arr= (IloConstraint[])full.toArray(
    
    new IloConstraint[full.size()]); 
    
    double prefs[] = 
    
    new 
    
    double[arr.length]; Arrays.fill(prefs, 1); 
    
    if(cplex.refineConflict(arr, prefs))
    { System.out.println(
    "find confilicts successfully!"); ConflictStatus[] conflicts = cplex.getConflict(arr); 
    
    for (
    
    int i1 = 0; i1 < conflicts.length;i1++ )
    { 
    
    if (conflicts[i1]== ConflictStatus.Member) System.out.println(
    " Proved : " + arr[i1]); 
    
    else 
    
    if (conflicts[i1]==ConflictStatus.PossibleMember) System.out.println(
    " Possible : " + arr[i1]); 
    } 
    }
    

    #CPLEXOptimizers
    #DecisionOptimization


  • 8.  Re: Difference about getIIS and refineConflict

    Posted 12/13/12 08:44 AM

    Originally posted by: SystemAdmin


    The version of my cplex is the latest version and I invoke it through java api.
    How can I set IISInd flag to 1? Does there exists some way to make getIIS quicker?
    I found the time of getIIS is still long when I use a hot model and the number of modified constraints is very small.
    #CPLEXOptimizers
    #DecisionOptimization