Decision Optimization

Decision Optimization

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

 View Only

Using presenceOf in a cumulFunction in OPL

  • 1.  Using presenceOf in a cumulFunction in OPL

    Posted 7 hours ago
    First, let me give some context. I am working with a modified version of the multi-mode RCPSP. Here is the following cumulFunction:
     
    cumulFunction renewableRsrcUsage[r in RenewableRsrcIds] =
        sum(m in Modes: m.rsrcId == r) pulse(mode[m], 1)
      + sum(m in Modes: m.taskId == 101 && m.rsrcId == r) pulse(x,1);
     
    Where "x" is a non-optional interval variable. 
     
    What I'm trying to do is address this specific part: 
     
    sum(m in Modes: m.taskId == 101 && m.rsrcId == r) pulse(x,1)
     
    Basically, I only want to consider the value of "m" selected for the task with id=101 in this summation. To do this, I was thinking of something like:
     
    sum(m in Modes: m.taskId == 101 && m.rsrcId == r) pulse(lock101,1) * presenceOf(mode[m])
     
    However, this throws the error "Operator not available for cumulFunction * boolean."
     
    I would appreciate it if anyone could suggest how to approach this.


    ------------------------------
    Francisco Yuraszeck
    Yuraszeck
    ------------------------------