Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Initial Guess

    Posted 07/18/17 08:33 AM

    Originally posted by: sandeepsinghchauhan


    I have a decsion variable which based on a tuple

    tuple TLU
    {
    Pc pr;
    int L;
    int N;
    }
    {TLU} PUnit = {<pl.pr,pl.L,N>| pl in PLl:pl.L<maxPLl[pl.pr],Us in asSet(Pn[pl]..PM[pl])};

    How can I give the inital guess regarding the same in constraint:

    forall(dv in PUnit){

    X[1,1,1] == 500;????

    I don't know the syntax please help me

     


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: Initial Guess

    Posted 07/18/17 08:40 AM

    Hi,

    here is a small example to show you the syntax:

     tuple Pc
     {
     key int pr;
     int p2;
     }
     
     {Pc} Pcs={<1,2>};
     
     
     tuple TLU
    {
    Pc pr;
    int L;
    int N;
    }
    {TLU} PUnit with pr in Pcs= {<<1,2>,1,1>};

    dvar int X[PUnit];

    subject to
    {
    X[<<1,2>,1,1>] == 500;
    }

    regards


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 3.  Re: Initial Guess

    Posted 07/18/17 10:59 AM

    Originally posted by: sandeepsinghchauhan


    How can I impliment this constraint with the help of tuples

    dvar boolean Z[PUnit]; 

    //constraint

    forall (I in PR){  
           sum(j in PO[I])
         Z[j]<=1;
        }

     

    where {string} PR = ...;

    PO = [{ 1  2 3 } { 4 5 } { 6 7 } { 8 } { 9 } { 10 11 12 13 14 15};

    Please help


    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 4.  Re: Initial Guess

    Posted 07/18/17 11:54 AM

    Hi,

    you could use

    tuple Pc
     {
     key int pr;
     int p2;
     }
     
     {Pc} Pcs={<1,2>};
     
      {string} PR = {"A","B","C","D","E","F"};;

    {int} PO[PR] = [{ 1 ,2 ,3 } ,{ 4 ,5 }, { 6, 7 } ,{ 8 } ,{ 9 } ,{ 10, 11, 12, 13, 14 ,15}];
     
     
     tuple TLU
    {
    Pc pr;
    int L;
    int N;
    }
    {TLU} PUnit with pr in Pcs= {<<1,2>,1,1>};

    dvar int X[PUnit];
    dvar boolean Z[PUnit];  

    subject to
    {
    X[<<1,2>,1,1>] == 500;

    forall (I in PR){  
           sum(j in PO[I]) sum(k in PUnit:k.pr.pr==j)
         Z[k]<=1;
        }
    }

    as a starting point

    regards


    #DecisionOptimization
    #OPLusingCPLEXOptimizer