Decision Optimization

Decision Optimization

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

 View Only
  • 1.  how to decribe this constraint

    Posted Sat February 25, 2012 02:34 AM

    Originally posted by: GMB7_Wang_Kefeng


    forall(j in C)
    sum(i in N1,k in V)x[i][j][k]==1;

    In the above constraint, I want to add one new condition: i!=j.

    Who can tell me how I add this conditon ?
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: how to decribe this constraint

    Posted Sat February 25, 2012 09:31 AM

    Originally posted by: SystemAdmin


    Try this;

    forall(j in C)
    sum(i in N1,k in V : i!=j)x[i][j][k]==1;
    

    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 3.  Re: how to decribe this constraint

    Posted Sat February 25, 2012 07:45 PM

    Originally posted by: GMB7_Wang_Kefeng


    Thank you. If the constraint is form like 1 and 2 in the following, how to add the condition i!=j then?

    1. forall(j in C)
    sum(i in N1)
    z[i][j]-
    sum(i in N2)
    z[j][i]==deliverydemand[j];

    2. forall(h in C, k in V)
    sum(i in N1)
    x[i][h][k]==
    sum(j in N2)
    x[h][j][k];
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 4.  Re: how to decribe this constraint

    Posted Tue February 28, 2012 09:14 AM

    Originally posted by: SystemAdmin


    forall(j in C)
    sum(i in N1 : j != i)
    z[i][j]-
    sum(i in N2 : j != i)
    z[j][i]==deliverydemand[j];
    

    should work.
    #DecisionOptimization
    #OPLusingCPLEXOptimizer