Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only

how to build this model in CPLEX Optimization Studio???

  • 1.  how to build this model in CPLEX Optimization Studio???

    Posted 04/30/12 02:06 AM

    Originally posted by: girljasmine


    Please Help me
    I have a model ,how to build in the CPLEX Optimization Studio??

    Consider a supply chain network G =(N, A) , where N
    is the set of nodes and A is the set of arcs. Here, N is
    composed by the set of suppliers S , facilities F and
    customers C .

    How to write the set in the OPL?

    the math model is in the attach file.
    I try to build the model in the below:
    but I do not know where goes wrong.Plese help me~
    int PRODUCTS=...;
    range p=1..PRODUCTS;
    int ll=...;
    range L=0..ll;

    int n=...;
    range node=1..n;

    tuple edge{
    int i;
    int j;
    }
    setof(edge)Edges={<i,j>|ordered i ,j in node};
    int di in node[p]=...;//i is c

    int si in node[p]=...;//I IS S
    int cEdges[p]=...;
    int fj in node=...;//j is F
    int uj in node=...;//j is F
    int rj in node[p]=...;//j is F
    int lj in node[p]=...;//j is F
    int gj in node=...;

    dvar boolean yj in node;
    dvar int xEdges[p];
    dvar int+ zj in nodein L;

    minimize sum(j in node)f[J]*y[J]+sum(J in N:j==J.F)g[J]*z[J]
    +sum(P in p,<i,j>in Edges)c<i,j>[P]*x<i,j>[P]+sum(P in p,J in N:j==J.F)l[J][P]*sum(I in N:i==I.S)x[I][J][P];

    subject to{
    forall(j in node,P in p)
    three:
    sum(<i,j>in node)x<i,j>[P]-sum(I in N:i==I.C)x[J][I][p]==0;

    forall(J in N:j==J.C,P in p)
    four:
    sum(I in N:i==I.F)x[I][J][P]==d[J][P];

    forall(I in N:i==I.S,P in p)
    five:
    sum(J in N:j==J.F)x[I][J][P]<=s[I][P];

    forall(J in N:j==J.F)
    six:
    sum(P in p)r[J][P]*sum(I in N:i==I.S)x[I][J][P]<=u[J]*y[J];
    forall(J in N:j==J.F)
    six:
    sum(P in p)r[J][P]*sum(I in N:i==I.S)x[I][J][P]<=u[J]*y[J];

    forall(J in N:j==J.F)
    seven:
    z[J]<=y[J]*L;
    }
    #DecisionOptimization
    #OPLusingCPLEXOptimizer