Stochastic OR

6.3 Server Adjustments

In Section 6.2 we study the effect of setup times between batches of jobs. There are, however, other reasons to interrupt the server while it is serving jobs in queue. For example, when a knife on a cutting machine becomes blunt, an operator has to stop the machine to replace the knife. Another example is a medical doctor who has to make many unexpected phone calls between seeing two patients. All such small (maintenance) tasks can be carried out in between jobs, but it is often hard to predict when they are required. Therefore, the number of jobs1 Compare this to a batch of jobs. served between any two tasks2 And compare a task to a setup. is no longer constant. But we know from Sakasegawa's formula that randomness in service times affects queueing times, and we also know from Eq. (6.2.4) that the batch size affects the service time. Hence, such unplanned tasks must make sojourn times longer.

We refer to this type of interruption as a server adjustment. It is important to realize that setups and adjustments are non-preemptive outages, i.e., they occur between jobs, not during job service times. Section 6.4 deals with the latter set of outages.

In this section, we develop a simple model to understand the impact of adjustments occurring randomly between jobs; we use the same notation as in Section 6.2 and follow the same line of reasoning. With this model, we can analyze a number of trade-offs, such as making fewer, but longer adjustments, or planning adjustments instead of just waiting until it becomes necessary at an unexpected moment.3 Ex 6.3.7.

Let us write \(F_{i}\) for the Bernoulli rv that, when equal to \(1\), indicates that job \(i\) requires an adjustment, and, when \(0\), the adjustment is not necessary. We assume that \(F_{i}\sim F\) such that \(\P{F=1} = p = 1-\P{F=0}\). Thus, with constant probability \(p\) an adjustment occurs between any two jobs. As a consequence, the number of jobs served between two consecutive adjustments is a geometric rv \(B\) with \(\E{B} = 1/p\). We further assume that the adjustment times \(R_{i} \sim R\) with mean \(\E R\) and variance \(\V R\). Finally, we assume that the net service times \(\{S_{0,i}\}\), \(\{R_{i}\}\) and \(\{F_{i}\}\) are independent.

Thus, whereas in Section 6.2 the batch sizes were constant between two setups, they are here geometrically distributed.

To compute \(\E\W\) with Sakasegawa's formula, we only have to find out how the adjustments affect the mean \(\E S\) and scv \(C_s^2\) of the effective service time. As adjustments do not influence the job arrival process, \(\lambda\) and \(C_a^{2}\) remain the same.

In the exercises below we show that the average effective service time is

\begin{equation*} \E{S} = \E{S_0} + p \E R = \E{S_0} + \frac{\E R}{\E B}, \tag{6.3.1} \end{equation*}

and its variance is

\begin{equation*} \V{S} = \V{S_0} + p\V{R} + p (1-p)(\E R)^2. \tag{6.3.2} \end{equation*}

By dividing \(\V S\) by \((\E S)^{2}\) we obtain \(C_{S}^{2}\).

Assuming there is one server, we can now fill in Sakasegawa's formula!

Before considering some examples, let us compare the results of this model with those of Section 6.2. The expected effective service time is the same: an amount \(\E R/ \E B\) is added to the net service time \(\E{S_0}\). However, the impact on the variance is different. By comparing Eq. (6.2.4) to Eq. (6.3.2) we see that the latter has an extra (positive) term. This supports our intuition: Unexpected interruptions have a larger effect on variability than expected (planned) interruptions.

The first few exercises demonstrate how to apply the above; the rest are concerned with deriving Eq. (6.3.1) and Eq. (6.3.2).

TF 6.3.1

The number of jobs served between two consecutive adjustments follows a Poisson distribution.

Solution
Did you actually try? Maybe see the 'hints' above!:
Solution, for real

False.

TF 6.3.2

A repair shop is considering buying a new CNC machine. There are two options available, the Yamazaki and the Haas. The Haas is less reliable and breaks down every week on average. However, it can be easily fixed by running through the control checklist, which takes 60 minutes. The Yamazaki breaks down about once a month, but it is much more complicated to fix and takes 3.5 hours. The time till a breakdown is memoryless and the machines have the same service rate. Claim: The Yamazaki is better from a queueing perspective.

Solution
Did you actually try? Maybe see the 'hints' above!:
Solution, for real

False. Having fewer but larger breakdowns increases the variance more. This is bad from a queueing perspective.

TF 6.3.3

Claim: In a system with random adjustments between jobs, the effective service time has the same variance as in a system with planned setups and the same average batch size.

Solution
Did you actually try? Maybe see the 'hints' above!:
Solution, for real

False. Random adjustments add an extra term \(p(1-p)(\E R)^2\) to the variance compared to the planned setup case; see Eq. (6.3.2) versus Eq. (6.2.4). Unplanned interruptions increase variability.

TF 6.3.4

Claim: In a system with random adjustments between jobs, making fewer but longer adjustments (same total adjustment time on average) reduces the waiting time.

Solution
Did you actually try? Maybe see the 'hints' above!:
Solution, for real

False. Fewer but longer adjustments increase the variance of the effective service time, which increases the waiting time through Sakasegawa's formula.

TF 6.3.5

Claim: In a system with random adjustments between jobs, if the probability of an adjustment is constant \(p \in (0,1)\) for each job, the number of jobs served between two consecutive adjustments follows a geometric distribution.

Solution
Did you actually try? Maybe see the 'hints' above!:
Solution, for real

True. Each job independently triggers an adjustment with probability \(p\), so the number of jobs between adjustments is geometric with parameter \(p\).

Ex 6.3.6

Jobs arrive as a Poisson process with a rate \(\lambda=9\) per working day. The machine works two \(8\) hour shifts a day. Work not processed on a day is carried over to the next day. The job service times are 1.5 hours, on average, with a standard deviation of \(0.5\) hours. Outages occur on average between \(30\) jobs. The average duration of an outage is \(5\) hours and has a standard deviation of \(2\) hours. Compute \(\E\J\).

Hint

Get the units right. Compute the load and then the rest.

Solution
Did you actually try? Maybe see the 'hints' above!:
Solution, for real

First we determine the load.

Python
EB = 30
p = 1 / EB
ES0 = 1.5
labda = 9.0 / (2 * 8)  # arrival rate per hour
ER = 5.0
ES = ES0 + p * ER
rho = labda * ES
print(f"{ES=:.4f}, {rho=:.4f}")
Python
ES=1.6667, rho=0.9375

So, at least the system is stable.

Python
VS0 = 0.5 * 0.5
VR = 2.0 * 2.0
VS = VS0 + p * VR + p * (1 - p) * ER * ER
Ce2 = VS / (ES * ES)
print(f"{VS=:.4f}, {Ce2=:.4f}")
Python
VS=1.1889, Ce2=0.4280

And now we can fill in the waiting time formula.

Python
Ca2 = 1  # Poisson arrivals
EW = (Ca2 + Ce2) / 2 * rho / (1 - rho) * ES
EJ = EW + ES
print(f"{EW=:.4f}, {EJ=:.4f}")
Python
EW=17.8500, EJ=19.5167
Ex 6.3.7

In the setting of Ex 6.3.6 we can perhaps choose to make an adjustment every 20 jobs. For simplicity, assume that adjustments never occur at random. Also, assume that an adjustment takes less time, for instance \(4.5\) hours, and is constant. What is \(\E\J\) now?

Hint

Realize that we now deal with setups and batch processing.

Solution
Did you actually try? Maybe see the 'hints' above!:
Solution, for real

We can use the model of Section 6.2.

Python
B = 20
ER = 4.5
VR = 0
ES = ES0 + ER / B
rho = labda * ES
VS = VS0 + VR / B
Ce2 = VS / (ES * ES)
EW = (Ca2 + Ce2) / 2 * rho / (1 - rho) * ES
EJ = EW + ES
print(f"{ES=:.4f}, {rho=:.4f}, {Ce2=:.4f}")
print(f"{EW=:.4f}, {EJ=:.4f}")
Python
ES=1.7250, rho=0.9703, Ce2=0.0840
EW=30.5586, EJ=32.2836

Comparing this to the results of Ex 6.3.6, we see that the load becomes somewhat higher. Since \(\rho\) becomes close to one, regular adjustments are not a good idea.

The easiest way to derive the expressions for \(\E S\) and \(\V S\) is to use Adam's and Eve's rule.4 \(\V{Y} = \E{\V{Y|X}} + \V{\E{Y|X}}\).

Ex 6.3.8

Derive the expressions for \(\E S\) and \(\V S\).

Solution
Did you actually try? Maybe see the 'hints' above!:
Solution, for real

Applying Adam's and Eve's rule is straightforward, but the details require attention. Using independence where necessary (and allowed by our assumptions),

\begin{align*} \E{S|F} &= \E{S_{0} + R F|F} = \E{S_{0}} + F \E{R}, \\ \E S &= \E{\E{S|F}} = \E{S_{0}} + \E F \E{R} = \E{S_{0}} + p \E{R}, \\ \V{\E{S|F}} &= \V{\E{S_{0}} + F \E{R}} = (\E R)^2 \V F = (\E R)^2 p (1-p), \\ \V{S|F} &=\V{S_0 + R F|F} = \V{S_{0}} + F \V R,\\ \E{\V{S|F}} &= \V{S_0} + p \V R, \\ \V S &= \E{\V{S|F}} + \V{\E{S|F}} = \V{S_{0}} + p \V R + p(1-p)(\E R)^{2}. \end{align*}