Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Expression help!

    Posted 05/03/12 12:28 PM

    Originally posted by: meletis13forever


    Hello,

    In my model I have these data:

    {string} terminals=...;

    tuple terminaltuple{
    key string name;
    int x;
    int y;
    float maxBW;
    {float} availBW;
    }
    {terminaltuple} terminaldata=...;

    terminaltuple terminalterminals = t in terminaldata ;

    Also I have this dvar:
    dvar int bi in terminals;

    How can I express that forall the terminals their bandwidths b[i] must belong in the set of their availBW?

    Also in the constraint block I have these:

    forall(i in terminals)
    b[i] <= terminal[i].maxBW;

    forall(i in terminals)
    b[i] == 64 || b[i] == 128 || b[i] == 256 || b[i] == 384 || b[i] == 512 || b[i] ==1024;

    Can you help me? I am a bit confused!
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: Expression help!

    Posted 05/09/12 11:33 AM

    Originally posted by: meletis13forever


    I found an acceptable solution.
    In the tuple terminaltuple I changed the last field {float} availBW with 3 new fields of integers (availBW1, availBW2, availBW3) and in the subject to block I add:

    forall(i in terminals)
    b[i] == terminal[i].availBW1 || b[i] == terminal[i].availBW2 || b[i] == terminal[i].availBW3;
    #DecisionOptimization
    #OPLusingCPLEXOptimizer