Decision Optimization

Decision Optimization

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

 View Only
  • 1.  Constraint Programming: handling setups between last product (period t-1) and first product (period t' >= t)"

    Posted Wed April 16, 2025 05:29 PM

    Hello everyone!

    I am working on a problem that combines lot-sizing decisions (machine, product, period) with scheduling (sequence-dependent setups). I use interval variables to represent the production time window for each lot, defined by the machine-product-period triple. I also use sequence variables for each machine-period pair, applying NoOverlap to prevent temporal overlap of lots and to model both the setup times and setup costs (in the objective function), which are sequence-dependent.

    However, I am struggling to model a specific aspect: there is a setup time/cost between the last product produced in the previous period (t-1) and the first product produced in the current period (t). This setup is performed immediately before the production of the first item in the current period (t). If there is no production in the current period (t), this setup should instead occur before the first product produced in the next period (t' > t) that has production.

    How can I model this phenomenon using the Constraint Programming Optimizer? Any suggestions or examples would be greatly appreciated!

    Thank you in advance!



    ------------------------------
    Mateus Martin
    ------------------------------


  • 2.  RE: Constraint Programming: handling setups between last product (period t-1) and first product (period t' >= t)"

    Posted Thu April 17, 2025 06:59 AM

    Hello Mateus,

                   If you have a sequence var associated to each machine-period, you can define the last product produced in the previous period (t-1) on each machine as the first activity of the corresponding sequence var on the current machine-period (period(t)).

    See constraint first(sequenceVar seq, intervalVar interval).

    Best Regards,

    Thierry.



    ------------------------------
    Thierry Sola
    ------------------------------



  • 3.  RE: Constraint Programming: handling setups between last product (period t-1) and first product (period t' >= t)"

    Posted Sun April 20, 2025 08:08 PM

    Dear Thierry,

    Thank you for your response. I was not familiar with the "first(sequenceVar seq, intervalVar interval)" constraint. In my case, would "interval" be an additional interval variable, rather than my original interval variables indexed by machine.period.product? These interval variables are optional and have minimum and maximum durations.

    Initially, I had considered an additional sequence variable indexed only by machine. This approach helps me handle the sequence-dependent setup costs, but I am still struggling to prevent the setup time from occurring during the transition between periods.

    Thank you all in advance!



    ------------------------------
    Mateus Martin
    ------------------------------



  • 4.  RE: Constraint Programming: handling setups between last product (period t-1) and first product (period t' >= t)"

    Posted 29 days ago

    For Modeling sequence-dependent setup time/cost across periods use the following approach in Constraint Programming Optimizer (e.g., IBM CP Optimizer):

    Use one sequence variable per machine across all periods.

    Define optional interval variables for each lot (machine-product-period).

    Apply NoOverlap with a transition matrix for setup times/costs.

    Handle cross-period setups:

    Use typeOfNext/typeOfPrevious to track product transitions.

    Add dummy intervals for empty periods, skipping them for setups.Include setup costs in the objective via the transition matrix.



    ------------------------------
    Natalie Elijah
    ------------------------------