Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  about execute

    Posted 12/05/08 02:20 PM

    Originally posted by: SystemAdmin


    [jin82873053 said:]

    at first , thank you everybody here, I learned a lot from this forum.and I keep on growing^.^

    I wrote a programe and get the answer Output[P][bminusc]
    and  the code like
      range P = 1..3;
                  range B =1..7;
                  range C = 1..3;
      {int} bminusc = {b-c| b in B,c in C};

    dvar int+ Output[P][bminusc];

    now I get the  Output  from Output[P][-1], Output[P][0], Output[P][1].....Output[P][7],
    if I want to get the Output of range bminusc>=1, it means I only want to get the answer Output[P][1] to Output[P][7],
    shall I write a execute to do it?  and how does it like?
    waiting for your help

    thanks a lot.
    Jin
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: about execute

    Posted 12/08/08 04:12 PM

    Originally posted by: SystemAdmin


    [Didier Vidal said:]

    What about this :


    range P = 1..3;
                  range B =1..7;
                  range C = 1..3;
     
    {int} bminusc = {b-c| b in B,c in C};

    dvar int+ Output[P][bminusc];

    constraints {
      // your constraints
    }

    {int} filteredIndexes = {i | i in bminusc : i >= 1};

    int filteredResult[p in P][b in filteredIndexes] = Output[p][b];

    execute {
      // For debug
      writeln(filteredResult);
    }

    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 3.  Re: about execute

    Posted 12/08/08 07:36 PM

    Originally posted by: SystemAdmin


    [jin82873053 said:]

    It worked~
    Ahaha~

    thank you so much,Didier Vidal ^^

    I learn a lot here.
    Jin
    #DecisionOptimization
    #OPLusingCPLEXOptimizer