Decision Optimization

Decision Optimization

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


#Analytics
#DecisionOptimization
#DecisionOptimization
 View Only
  • 1.  Subset of a Set

    Posted 06/01/21 02:04 PM

    Hi,

    I have a precedence constraint in my model s.t.

    " forall (j in tasks, k in pre[j])

    sum (i in stations) x[i][j]*i >= sum (i in stations) x[i][k]*i "

    Here, for example,

    for j=1, pre(j) should be empty.

    for j=2, pre(j)=1

    for j=3, pre(j)=1

    for j=4, pre(j)=[2, 3]

    and so on.

    How can I put this constraint, the ranges (j, k) and the subset pre(j) in my model?

    Thanks in advance,



    ------------------------------
    Ceyhan
    ------------------------------

    #DecisionOptimization


  • 2.  RE: Subset of a Set
    Best Answer

    Posted 06/02/21 06:14 AM
    Hi

    you can write

    {int} pre[1..4]=[{},{1},{1},{2,3}];​


    plus since you seem to need to schedule you should have a look at CPOptimizer within CPLEX



    regards



    ------------------------------
    [Alex] [Fleischer]
    [EMEA CPLEX Optimization Technical Sales]
    [IBM]
    ------------------------------