Decision Optimization

Decision Optimization

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

 View Only
Expand all | Collapse all

Subset of Interval Variable

  • 1.  Subset of Interval Variable

    Posted Wed May 10, 2017 10:23 AM

    Originally posted by: ZuluBravo


    Hi everyone,

    I am a beginner both in CP Optimizer and Java interface and I am having hard times implementing a very simple scheduling problem.

    The problem is to minimize makespan in a single machine with sequence-dependent setups. However setups can only occur after the release time of the related job, so unfortunately noOverlap function does o no good in this case. I have been able to solve this problem in CP Optimizer by adding additional interval variables, but I cannot implement it in Java because I cannot add only a subset of interval variables to the sequence variable.

    Basically, I am trying to write the following constraints in Java

    dvar interval job[0..NbJob] 

    dvar sequence schedule in all(j in 0..K) job[j] types all(j in 0..K) state[j} // Again, K < NbJob

     

    Thanks a lot in advence,

    Zeynep.


    #CPOptimizer
    #DecisionOptimization


  • 2.  Re: Subset of Interval Variable

    Posted Fri May 12, 2017 10:16 AM

    Originally posted by: ol


    Hello,

    " I cannot implement it in Java because I cannot add only a subset of interval variables to the sequence variable."

    You need to create a new array with exactly the interval variables you want to be in the sequence, and then call the constructor intervalSequenceVar with this array.

    Regards,

    ol


    #CPOptimizer
    #DecisionOptimization