Processing math: 100%

Wednesday, June 7, 2017

Minimum down- and up-time

In machine scheduling models we sometimes want to impose minimum up-time and minimum down-time restrictions. E.g., from (1):

My question is how do I add in additional constraints that if the factory switches off then its needs to stay off for 3 months, and if it switches back on then it needs to stay on for 4 months?

One possible solution is the following. Let us define our binary decision variable by

xi,t={1if factory i is operating in month t0otherwise
Method 1

We really want to forbid short run patterns such as 010 (i.e. off-on-off), 0110, 01110 and 101, 1001. Forbidding patterns 010, 0110, 01110 will ensure a factory is up at least 4 consecutive periods. By not allowing 101,1001 we really make sure that a down time period is at least three months. We can model these restrictions in a linear fashion as follows (2):

Forbid 010 xi,t+xi,t+1xi,t+20
Forbid 0110 xi,t+xi,t+1+xi,t+2xi,t+31
Forbid 01110 xi,t+xi,t+1+xi,t+2+xi,t+3xi,t+42
Forbid 101 xi,txi,t+1+xi,t+21
Forbid 1001 xi,txi,t+1xi,t+2+xi,t+31
Method 2

A different approach is as follows. First define binary variables:

δoni,t={1if factory i is turned on in month t0otherwiseδoffi,t={1if factory i is turned off in month t0otherwise

Mathematically we write this as:

δoni,t=(1xi,t1)xi,tδoffi,t=xi,t1(1xi,t)

We can linearize these non-linear equations by:

δoni,t1xi,t1δoni,txi,tδoni,txi,txi,t1δoffi,txi,t1δoffi,t1xi,tδoffi,txi,t1xi,t

With these variables we can implement the implications:

δoni,t=1xi,t+xi,t+1+xi,t+2+xi,t+3=4δoffi,t=1xi,t+xi,t+1+xi,t+2=0

This can be linearized as:

xi,t+1+xi,t+2+xi,t+33δoni,txi,t+1+xi,t+22(1δoffi,t)

Note that I dropped xi,t in both inequalities. These are already known from the definition of δoni,t and δoffi,t.

In the comments it is mentioned by Rob Pratt that we can strengthen this a bit (the math does not look very good in a comment, so I repeat it here):

xi,t+1δoni,txi,t+2δoni,txi,t+3δoni,txi,t+11δoffi,txi,t+21δoffi,t

References
  1. How do I add a constraint to keep a factory switched on or off for a certain period of time in PuLP? https://stackoverflow.com/questions/44281389/how-do-i-add-a-constraint-to-keep-a-factory-switched-on-or-off-for-a-certain-per/44293592
  2. Integer cuts, http://yetanothermathprogrammingconsultant.blogspot.com/2011/10/integer-cuts.html

No comments:

Post a Comment