Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Constraints

    Posted 11/24/11 05:26 AM

    Originally posted by: DieterVangheel


    Dear,

    In our model we have the following two constraints:

    For all j and k: ∑_(i=1) till 457 Xi,j,k ≤ Bj * Yj,k
    For all j and k: ∑_(i=458) till 895 Xi,j,k ≤ Bj * (1-Yj,k)

    We have written this in cplex as follow. Is this correct (we think it will not work like this in cplex :s )?
    forall(j in kamers)
    forall( k in dagen)
    sum (i in personen from 1 till 457)x[i][j][k]<=b[j]*y[j][k]

    forall(j in kamers)
    forall( k in dagen)
    sum(i in personen from 457 till 895)x[i][j][k]<=b[j]*(1-y[j][k])
    #CPLEXOptimizers
    #DecisionOptimization


  • 2.  Re: Constraints

    Posted 12/06/11 06:35 AM

    Originally posted by: SystemAdmin


    It seems that this is an OPL syntax question. You may have better luck in getting an answer if you repost this to the OPL forum.
    #CPLEXOptimizers
    #DecisionOptimization


  • 3.  Re: Constraints

    Posted 12/06/11 05:14 PM

    Originally posted by: SystemAdmin


    As Tobias suggests, please post your OPL related questions in the OPL forum as to reach the appropriate folks.

    With regards to your constraints, you could do something like the following to make it work:

    forall(j in kamers)
           forall( k in dagen)
             sum (i in personen:i>=1 && i<=457) x[i][j][k]<=b[j]*y[j][k];
            
         forall(j in kamers)
           forall( k in dagen)
             sum(i in personen: i>=458 && i<=895) x[i][j][k]<=b[j]*(1-y[j][k]);
    

    #CPLEXOptimizers
    #DecisionOptimization