Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  A constraint

    Posted 11/30/08 12:44 PM

    Originally posted by: SystemAdmin


    [jin82873053 said:]

    Hello everyone *.* 

         I  come again:)  I need help and thanks for yours kindness and helps.

         I worte a  code  like:
           {string} A ;
           range B;
           range C;
           dvar int [b]Output[A] [B][/b] ;
           min
               sum(a in A,b in B)
                 [b]Output[A] [B][/b] - 40 <= 100;<br />
         and  my new Problem have to find out the Output  of    rangeB-rangeC .  I mean  [b]Output[A][B-C][/b]
         I tried some ways to discribe this problem but failed.
         So  could anybody tell me  how to write the programing of this problem?

          thank you.
          Jin

         
         

    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 2.  Re: A constraint

    Posted 12/01/08 12:16 PM

    Originally posted by: SystemAdmin


    [alain.chabrier said:]

    Hi,

    Some starting point:


    range B = 1..10;
    range C = 3..6;

    {int} D = asSet(B) diff asSet(C);

    execute {
      writeln(D);
      }

    gives :

    {1 2 7 8 9 10}

    Hope this helps,

    Alain
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 3.  Re: A constraint

    Posted 12/02/08 06:58 AM

    Originally posted by: SystemAdmin


    [jin82873053 said:]

    [quote author=alain.chabrier link=topic=723.msg2196#msg2196 date=1228122970]
    Hi,

    Some starting point:

    code
    range B = 1..
    ...

    ...
    Alain


    It is very kind of you,alain. But maybe I haven't explained my question clearly.

    in my problem, range B- range C ,
    if   range B =1..5;
           range C = 1..3;
      I want to get B-C  1-1=0,1-2=-1,1-3=-2;
                               2-1=1,2-2=0,2-3=-1;
                              ....
                                 5-1=4,5-2=3,5-3=2;
    the Output[A][B] in ex-problem have to change to Output[A][B-C]
    and in subject to
            ct-ex:
            Output[A][B]*Handcost[A]<=22.5 ...<br />      have to change to
             ct-now:
              Output[A][B-C]*Handcost[A][1+C]<=22.5;<br />    if range B=1..3;
       then 1+C is 2,3,4
    I wish i explained my question clearly this time....
    thank you
    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 4.  Re: A constraint

    Posted 12/03/08 01:52 PM

    Originally posted by: SystemAdmin


    [dgravot@noos.fr said:]

    Maybe something like :


    range B =1..5;
    range C = 1..3;
    range C1 = 2..4;//index of Handcost

    {int} bminusc = {b-c| b in B,c in C};

    dvar int+ Output[bminusc];
    float Handcost[c1 in C1] = 1;

    constraints
    {
    //Output[A][B-C]*Handcost[A][1+C]<=22.5;<br /> forall(b in B,c in C)
    Output[b-c] * Handcost[1+c] <=22.5;<br />
    }

    #DecisionOptimization
    #OPLusingCPLEXOptimizer


  • 5.  Re: A constraint

    Posted 12/05/08 01:24 PM

    Originally posted by: SystemAdmin


    [jin82873053 said:]

    that is what i want.
    thank you so much. DGravot .

    Jin


    #DecisionOptimization
    #OPLusingCPLEXOptimizer