Decision Optimization

Decision Optimization

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

 View Only
  • 1.  special Sets in the model

    Posted Sun September 10, 2017 07:54 AM

    Originally posted by: A.Omidi


    hi

    i have a problem for write special sets, for constraints 44 & 45 in the attached file.

    this sets, consist of some model parameters (r(j), h(j) & p(j) are parameters), and in the constraint 45 in sum expression bounded, have min & max operand.

    pls, let me know, how can i write such sets in opl language?

     

    best regards


    #DecisionOptimization
    #MathematicalProgramming-General


  • 2.  Re: special Sets in the model

    Posted Sun September 10, 2017 08:08 AM

    You can use the colon notation to restrict which elements of a set are picked.

    c44: sum(t in T : t >= r[j] && t <= (h[j] - p[j] + 1)) x[j][t] == 1
    c45: x[j][t] + sum(s in T : s >= r[i] && s >= (t - p[i] - s[i][j] + 1) && s <= (t + p[j] + s[j][i] -1) && s <= (h[i] - p[i] + 1)) x[i][s] <= 1

     


    #DecisionOptimization
    #MathematicalProgramming-General


  • 3.  Re: special Sets in the model

    Posted Mon September 11, 2017 12:27 AM

    Originally posted by: A.Omidi


    dear daniel

    Thanks for your consideration

    In your expressions, how can I define set T from model parameters (r[j], h[j] & p[j])?

    Best regards


    #DecisionOptimization
    #MathematicalProgramming-General


  • 4.  Re: special Sets in the model

    Posted Mon September 11, 2017 01:54 AM

    Don't you know an upper bound on the values in T and can just define T as a range?

    If not then you can do

    int maxT = max(j in J) maxl(r[j], h[j], p[j]);
    range T = 1..maxT;

     


    #DecisionOptimization
    #MathematicalProgramming-General