Performance Analysis of Hybrid MTS/MTO Systems with Stochastic Demand and Production

: We present a comprehensive numerical approach with reasonably light complexity in terms of implementation and computation for assessing the performance of hybrid make-to-stock (MTS)/make-to-order (MTO) systems. In such hybrid systems, semi-ﬁnished products are produced up front and stored in a decoupling inventory. When an order arrives, the products are completed and possibly customised. We study this system in a stochastic setting: demand and production are modelled by random processes. In particular, our model includes two coupled Markovian queues: one queue represents the decoupling inventory and the other the order backlog. These queues are coupled as order processing can only occur when both queues are non-empty. We rely on matrix analytic techniques to study the performance of the MTO/MTS system under non-restrictive stochastic assumptions. In particular, we allow for arrival correlation and non-exponential setup and MTS and MTO processing times, while the hybrid MTS/MTO system is managed by an ( s , S ) -type threshold policy that governs switching from MTO to MTS and back. By some numerical examples, we assess the impact of inventory control, irregular order arrivals, setup and order processing times on inventory levels and lead times.


Introduction
The boundary between forecast-driven and demand-driven activities is a key strategic decision in supply chain management. This boundary is referred to as the order decoupling point, and its position considerable influences the market and operational performance of the supply chain [1,2]. Make-to-stock (MTS) and make-to-order (MTO) are the best known inventory management strategies. Under make-to-stock management, all production is purely forecast driven. The products are manufactured up front without allowing for customer customisation. As these products are stored till ordered, high holding costs are unavoidable. Moreover, one can expect frequent stock-outs when demand fluctuates considerably [2]. Some main performance metrics of MTS systems include the fill rate and the average work-in-process, as well as the demand forecasting accuracy [3]. While MTS is purely forecast driven, MTO is purely order driven. In MTO, manufacturing of products only starts when a customer order is placed. This of course leads to long response times during periods where there is considerable demand for the product. Performance metrics for MTO systems therefore include the mean response time, order delay and manufacturing lead time; see [3] and the references therein. Incorporating the benefits from both systems, hybrid MTS/MTO strategies have been proposed in the literature [4,5]. In such hybrid strategies, production is split up into two states. The production of semi-finished items in the first production stage is forecast driven, and the semi-finished products are stored in a decoupling inventory, much like for the MTS strategy. In contrast and in line with MTO, the second production stage only starts upon reception of an order.
Various authors have studied such MTS/MTO systems. Ghrayeb et al. [6] proposed a deterministic optimisation model of a hybrid MTS/MTO system, in the context of an assemble-to-order manufacturing environment. These authors showed that the hybrid case inherits the strengths and conceals the weaknesses of both pure MTS and pure MTO systems. Köber and Heinecke [7] considered hybrid production strategies when demand is volatile and seasonal. The costs and benefits of delayed product differentiation were studied by Gupta and Benjaafar [8] when the order lead times are load dependent. It was observed that later differentiation is preferred when the load is higher. Liu et al. [9] studied a similar problem and found that a push-pull strategy is optimal when the system load is high. Hierarchical production planning was investigated by Soman et al. [3] in the context of production management decisions for MTS/MTO operations in food processing. Their framework includes strategic, tactical and operational levels, which correspond to the MTS/MTO decision, the capacity coordination and the scheduling, respectively. These authors [10] also investigated an economic lot scheduling problem, again in the context of a food production system. Finally, Rafiei and Rabbani [11] focused on the tactical level of the hierarchical production planning framework for hybrid MTS/MTO production systems with pure MTS, pure MTO and hybrid MTS/MTO products and applied their capacity coordination model to a realistic industrial case.
In this work, we propose a stochastic inventory model for assessing the performance of hybrid MTS/MTO systems. Stochastic models explicitly account for uncertainty in demand, inventory replenishment and order processing. Such stochastic inventory models most closely relate to the present study. We mention [12], where a variety of combined make-to-order (MTO) and make-to-stock (MTS) supply chains was investigated in a stochastic framework. These authors found that hybrid MTS/MTO systems can dramatically cut costs, although the information exchange between suppliers and manufacturers is key for effective lead time quotations. Further, Adan and Van der Wal [13] showed that the combination of pure MTS and pure MTO strategies in a production system can significantly reduce lead times, albeit under the restrictive stochastic assumption of exponentially distributed production times. Ohta et al. [14] and Arreola-risa and Decroix [15] proposed conditions that make MTO and MTS policies optimal using a base-stock inventory policy. In these works, a single server queueing model represents the production system. Ohta et al. [14] also relied on results from queueing theory in their study of a multi-product inventory system. Demand arrives in accordance with a Poisson process, and the production times follow an Erlang distribution, as the authors noted that queueing theory does not provide explicit expressions for the queue size probabilities for general production time distributions. Their key result was an optimality condition that classifies products into MTS and MTO. Finally, Beemsterboer et al. [16] studied the optimal lot sizing when make-to-stock products are batch produced, where the system can only manufacture one product at a time (either MTS or MTO) and when a setup is required to switch between MTS and MTO.
In continuous make-to-stock operations, MTS production only halts when the inventory is full. When this happens, there can be a non-negligible setup time to restart production. If this is the case, starting production whenever there is space in the product inventory is inefficient. Efficiency can be attained by continuous review (s, S)-policies. For such a policy, replenishment starts when the inventory level drops to the threshold value s and stops when level S is attained. Such policies need constant monitoring of the inventory level, hence the term 'continuous review'. Most work conducted on (s, S)-policies assumes that any amount of inventory can be replenished all at once; see, e.g., [17][18][19][20][21] and the references therein. However, for real manufacturing systems, the production time to produce a single item is non-negligible, and it takes considerable time to replenish the inventory one item at a time. Motivated by this observation, different authors have also investigated hybrid MTS/MTO systems with replenishments on an item-by-item basis [22][23][24][25][26].
The present study differs from previous work on stochastic hybrid MTS/MTO systems by its inclusion of an order backlog. This modification considerably complicates performance assessments, as the corresponding stochastic model now consists of two coupled 'queues': a decoupling inventory and an order backlog. See, e.g., [27][28][29][30] for other applications of coupled queueing systems and [31][32][33][34] for Markovian systems that include both queueing and inventory management. The performance of this hybrid MTS/MTO system is assessed when the same production capacity is used for MTS and MTO. Such an assumption is for example natural in a job shop [4]. Other applications where the production system is shared by MTO and MTS operations include the aluminium profiles manufacturing industry [35] and the garments industry [36]. In our study, production alternates between MTS and MTO by a modified (s, S)-policy: production switches from MTS to MTO at inventory level S and switches from MTO to MTS when the inventory is empty or when the inventory is below level s and there are no outstanding orders. While the inclusion of the additional queue complicates the Markovian description of the system, we can exploit structural properties of the Markov model and solve the system with reasonable computational complexity by matrix-analytic methods. Furthermore, the stochastic assumptions are non-restrictive, including Markovian production and order arrivals. Specifically, the Markovian production process at hand allows for introducing phase-type distributed setup times and MTO and MTS production times. Specifically, the Markovian production process at hand allows for introducing phase-type distributed setup times and MTO and MTS production times (cf. Section 3).
The remainder of this paper is organised as follows. In Section 2, the Markovian hybrid MTS/MTO model is introduced and analysed. The balance equations are studied in Section 2.1 and solved in Section 2.2. Expressions for various performance measures of interest are found in Section 2.3, while Section 2.4 studies the MTO/MTS system in overload. To illustrate our approach, Section 3 considers some numerical examples. In particular, we study inventory levels, backlog sizes and lead times, as well as the optimal (s, S)-policy when holding cost and lead times are combined in a single cost function. Finally, conclusions are drawn in Section 4.

Queueing/Inventory Model
We consider a stochastic inventory model, which supports MTS and MTO operations. Figure 1 depicts the main components of the system. There is a product inventory, an order backlog, as well as MTO and MTS production units. The product inventory can store up to S semi-finished products, whereas the infinite-capacity order backlog keeps track of the orders that have not yet been delivered. Arriving orders are processed first-come-first-served. Each order takes a semi-finished product from the decoupling inventory and sends it to the order processing unit to complete the product in accordance with order specifications. Note that the two 'queues'-the product inventory and the order backlogin the model at hand are tightly coupled. Departures from the inventory are only possible when there are backlogged orders. Similarly, departures from the order backlog are only possible if there are semi-finished products in the product inventory. There is also coupling between the MTS and MTO production units. We assume there is only a single production facility for MTS and MTO operations. Therefore, the production facility either works on finishing semi-finished products (MTO) or on producing semi-finished products (MTS). Production switches from MTO to MTS when the inventory is empty or when there are no backlogged orders and the inventory is at most at level s. Oppositely, production switches from MTS to MTO when the inventory level hits S.
We study the inventory model at hand in a continuous-time Markovian framework, which combines modelling versatility with computationally efficient analysis techniques. Orders arrive at the system in accordance with a Markov arrival process with state space A = {1, . . . , A}. Let α 1 ij and α 0 ij denote the transition rates from state i to state j with and without an order arrival, respectively, for i, j ∈ A and with α 0 ii = 0 for i ∈ A as usual. The MTS production process is modelled by a Markov process with finite state space B = {1, . . . , B}. Let β 1 ij and β 0 ij denote the transition rates from state i to state j with and without the completion of a semi-finished product, respectively, for i, j ∈ B and with β 0 ii = 0 for i ∈ B. When the production system switches to MTS production, the MTS process starts in a random state, independent of the system state. Let p i denote the probability that MTS production starts in state i ∈ B. Note that the distribution of the initial state of the MTS production process can be chosen freely and typically differs from the stationary distribution of the Markov process (with transition rates β 0 ij + β 1 ij ); see Section 3. Furthermore, the MTO production process is modelled by a Markov process. As the production process is either making to order or making to stock, let C = {B + 1, . . . , B + C} denote the finite state space of the MTO production process. Further, let γ 1 ij and γ 0 ij denote the transition rates from state i to state j with and without the completion of an order for i, j ∈ C. As for the MTS process, when the production system switches to MTO production, the MTO process starts in a random state. Let q i denote the probability that MTO production starts in state i ∈ C. The distribution of the initial state of the MTO production process can be again chosen freely and typically differs from the stationary distribution of the MTO Markov process. Finally, it is possible that MTO production temporarily stops, without switching to MTS. This happens when there are more than s semi-finished products in the inventory and there are no outstanding orders. In this case, the MTO production process is temporarily stopped: the state of the process does not change till there is a new order arrival if the production state is in any of the states in C 0 ⊂ C. Transitions from states in C 1 = C \ C 0 are possible, but only transitions without order completions are allowed: γ 1 ij = 0 for i ∈ C 1 . This partition of the state space C offers the versatility to separate production from setup times and maintenance times in the MTO production process. A concrete example with setup times will be introduced in Section 3.

Balance Equations
In view of the assumptions above, the system at hand can be described by a four-dimensional continuous-time Markov chain. To be precise, the state of the inventory system at each point in time is described by a tuple (n, m, i, j) where n ∈ N is the number of backlogged orders, m ∈ S = {0, . . . , S} denotes the inventory level, i ∈ A denotes the state of the order arrival process and j ∈ B ∪ C denotes the state of the production process. Noting that (i) production is MTO when the inventory is full, (ii) that production is MTS when the inventory is empty and (iii) that production is MTS when the inventory is at most s and there are no outstanding orders, the state space of the Markov process is, with N = {0, 1, 2, · · · } and N + = {1, 2, · · · }.
We now summarise the description of the inventory system at hand, by listing the possible transition rates from a fixed state (n, m, i, j) ∈ X : • Transitions related to the order arrival process: A new order arrives with rate α 1 ii , which invokes a transition to state (n + 1, m, i , j). The state of the order arrival process changes without arrivals with rate α 0 ii invoking a transition to state (n, m, i , j).

•
Transitions related to the MTS production process (j ∈ B): Note that j ∈ B implies m < S as there is no MTS production when the inventory is full. For m < S, there is a possible transition to state (n, m, i, j ) with rate β 0 jj for j ∈ B. For m < S − 1, there is a possible transition to state (n, m + 1, i, j ) with rate β 1 jj for j ∈ B. For m = S − 1, the production of a new semi-finished product induces a switch from MTS to MTO. Hence, we have a transition to state (n, S, i, k) for k ∈ C with rate: • Transitions related to the MTO production process (j ∈ C): Note that j ∈ C implies m > 0, as there is no MTO production when the inventory is empty. When n = 0, there is a possible transition to state (n, m, i, j ) with rate γ 0 jj for j ∈ C 1 and j ∈ C. When n > 0, there is a possible transition to state (n, m, i, j ) with rate γ 0 jj for j ∈ C. For n > 1 and m > 1 and for n = 1 and m > s, there is a possible transition to state (n − 1, m − 1, i, j ) with rate γ 1 jj for j ∈ C. Finally, for n = 1 and m ≤ s (no backlogged orders and inventory level below s) and for n > 0 and m = 1 (empty inventory), MTO switches to MTS upon completion of a product: there is a transition to state (n − 1, m − 1, i, k) for k ∈ B with rate: Let {π(m, n, i, j), (m, n, i, j) ∈ X } denote the invariant probability distribution of the Markov chain at hand. Accounting for the transmission rates defined above and assuming that the Markov process is ergodic (see below), we find that the invariant distribution satisfies the following set of balance equations: with, for (n, m, i, j) ∈ X and where we set π(n, m, i, j) = 0 for (n, m, i, j) / ∈ X to simplify notation. Here, 1 {·} denotes the indicator function, which evaluates to one if its argument is true and to zero if this is not the case.
Let X 0 and X 1 denote the set of states of the inventory, the arrival and the production process when there are no orders and when there are outstanding orders, respectively: These sets are finite and countable. In the remainder, we assume a fixed order when we iterate over the elements of these sets to construct vectors and matrices. We collect the invariant probabilities of states with the same order backlog sizes in row vectors π 0 = [π(0, m, i, j)] (m,i,j)∈X 0 and π n = [π(n, m, i, j)] (m,i,j)∈X 1 (n = 1, 2, . . .). The system of balance equations can then be rewritten as follows, where the matrices: collect the transition rates, and where the matrices:

Quasi-Birth-Death Process
From Equation (2), it is easily seen that the Markov process under consideration is a homogeneous quasi-birth-and-death process (QBD); see [37]. A QBD is a Markov process, where the state is described by a level and a phase. The phase can only take a finite number of values, and transitions between any two phases are allowed. In contrast, the level is a non-negative integer number, and only transitions between adjacent levels are allowed. In the present setting, we identify the level with the number of backlogged orders while the phase indicates both the content of the decoupling inventory, the states of the arrival process and the state production processes. The balance equations now immediately show that transitions are indeed restricted to states in the same level (from state (n, * , * , * ) to state (n, * , * , * )) or in two adjacent levels (from state (n, * , * , * ) to state (n + 1, * , * ) or state (n − 1, * , * , * )). Intuitively, this is also clear: orders arrive and are processed one-by-one such that the order backlog increases and decreases in unit steps.
The QBD is ergodic and therefore admits an invariant distribution provided that the drift towards the level down exceeds the drift towards the level up. This drift condition can be expressed as follows, where e 1 = [1] (m,i,j)∈X 1 is a row vector of ones, where e is the transpose of e and where ω is the normalised solution of: In general, the ergodicity of the system depends on the inventory policy, e.g., the modelling assumptions allow for introducing setup times (see below) when production switches from MTS to MTO or vice versa. In this case, the stability rule from queueing theory that states that the load should not exceed the service capacity depends on the switching rates between MTS and MTO, which in turn depend on the inventory policy as some production capacity is lost on setup times. In some instances, however, a simple condition for the ergodicity of the process can be found. For example, when the MTO and MTS production times constitute sequences of independent random variables and switching between MTS and MTO is immediate, the ergodicity condition can be expressed as follows, where ρ denotes the average number of order arrivals per time unit and where m mts p and m mto p denote the mean MTS and MTO production times.
Assuming that the stability condition (3) holds, a well-known method for finding the stationary distribution of QBD processes is the matrix-geometric method. The method proposes the following solution of the set of balance Equation (2), where the so-called rate matrix R is the minimal non-negative solution of the non-linear matrix equation: The rate matrix R records the rates of sojourn in states at a level per unit of the local time of the preceding level − 1. This can be re-expressed as R = G 0 N, where the matrix N records the expected sojourn times at a level before the first visit to the lower level − 1 if one starts at level ; see, e.g., ([37], section 6.4). Several iterative procedures exist for solving Equation (4) above. For example, Gun [38] uses the following simple recursion: In the numerical section, we compute the rate matrix by implementing the improved iterative algorithm of [37] (Chapter 8, pp. 179-187). Once the rate matrix has been determined, the vectors π 0 and π 1 can be found by solving, π 0 F 0 + π 1 F 1 = 0 , π 0 G 0 + π 1 G 1 + π 1 RG 2 = 0 , π 0 e 0 + π 1 (I − R) −1 e 1 = 1 , where e 0 = [1] (m,i,j)∈X 0 is again a row vector of ones. After some simple matrix manipulations, we find, Here, the irreducibility of the Markov process implies that F 0 is invertible.

Performance Measures
We now express a number of interesting performance measures for the decoupling inventory system in terms of π 0 , π 1 and R. The marginal probability mass function of the content of the number of orders in the order backlog equals, π (o) (0) = π 0 e 0 , π (o) (n) = π n e 1 = π 1 R n−1 e 1 , for n = 1, 2, . . ., while the marginal probability mass function of the inventory equals, Moreover, as the inventory is finite, the mean and variance of the inventory content can be simply calculated as follows, We can further calculate the mean lead time by Little's result. The mean lead time LT is the average amount of time between the placement of an order and the completion of a finished product, with η the order arrival rate, Here, e a is a row vector with A ones and θ is the unique normalised solution of θ(A 0 + A 1 ) = 0. Finally, we also calculated the switching rate ξ between MTO and MTS or, equivalently, the switching rate between MTS and MTO. Both are of course identical as each switch to MTO is followed by a switch to MTS. As a switch from MTS to MTO occurs when the inventory level reaches S, we find:

Overload Analysis
When the arrival load of new orders exceeds the production capacity of the MTO/MTS system, the order queue grows unbounded. This particularly implies that there always will be outstanding orders for the MTO/MTS system. In this case, the state of the production process and the inventory size can be studied in isolation, without accounting for the state of the arrival process or the state of the order backlog. The balance Equation (1) then considerably simplifies. With a slight abuse of notation, let π(m, j) denote the invariant probability to have inventory level m and production state j. These probabilities can then be found by solving the following set of balance equations, The size of this system of equations is considerably smaller and is easily solved numerically. As usual, the system of equations determines the probabilities π(m, j) up to a normalising constant, which follows from the normalisation condition: The mean and variance of the inventory size and the MTO/MTS switching rate can then be expressed in terms of these probabilities as follows, Finally, note that the parameter s does not appear in the system of Equation (5) above. Hence, for increasing load, one can expect that the influence of the parameter s on the system's performance measures disappears. This is not unexpected. The threshold s determines switching to MTS when the order backlog is empty, which never occurs in overload.

Numerical Results
We now illustrate our approach by means of some numerical examples. In particular, we focus on a system where the MTO and MTS production times constitute sequences of independent and identically phase-type distributed random variables and where a PH-distributed setup time is required for switching from MTO to MTS and back. Moreover, new orders arrive in accordance with an interrupted Poisson process.
To limit the number of parameters, we further assume that all PH-type distributions (for the production and setup times) are generalised Erlang(2) distributions. The generalised Erlang(2) distribution is the distribution of the sum of two exponential random variables and therefore completely characterised by the rates of these exponential distributions. We write GE(α 1 , α 2 ) for the generalised Erlang distribution with rates α 1 and α 2 . For values m > 0 and s 2 > 0, such that 0.5 ≤ s 2 /m 2 < 1, let x 1 and x 2 be the (positive) solutions of the quadratic equation: Then, GE(1/x 1 , 1/x 2 ) is a generalised Erlang distribution with mean m and variance s 2 . See also Telek and Heindl [39] who discussed the moment characterisation of the more general ACPH(2)distribution, which allows for higher variances without introducing additional states.
Let the setup time of MTO be GE(φ o 1 , φ o 2 ), and let the MTO production times be GE(ψ o 1 , ψ o 2 ). Similarly, let the setup time of MTS be GE(φ s 1 , φ s 2 ), and let the MTS production times be GE(ψ s 1 , ψ s 2 ). The corresponding MTO and MTS arrival processes then each have four states (two setup states and two production states), such that the production process has eight states in total. The transition probabilities of these production processes can then be expressed in terms of the parameters of the different GE distributions as follows. Assume that States 1 and 2 (States 3 and 4) correspond to the setup time (production time) of MTO, while States 5 and 6 (States 7 and 8) correspond to the setup time (production time) of MTS. We then have that all transition rates of the production process are zero apart from the following non-zero transition rates, Moreover, the MTO and MTS production processes start in production States 1 (p 1 = 1) and 5 (q 5 = 1), respectively.
As mentioned above, we model order arrivals by an interrupted Poisson process, which allows for assessing the impact of correlation in the order arrival process. The interrupted Poisson process is a two-state Markov arrival process. There is an active state (say State 1) during which new orders arrive in accordance with a Poisson process with rate λ. In contrast, there are no arrivals when it is in its inactive state (say State 2). Let a and b denote the transition rates from the active to the inactive state and from the inactive to the active state, respectively. Hence, we have that all transition rates of the arrival process are zero apart from the following non-zero transition rates, For convenience, we replace the parametrisation (a, b, λ) of the interrupted Poisson process by the more intuitive parametrisation (σ, κ, ρ), with: Here, σ denotes the fraction of time the interrupted Poisson process is active, while the absolute time parameter κ is the average time between the start of two consecutive active periods and ρ is the arrival load of the orders.
We are now ready to explore the impact of the parameters on the various performance measures. To this end, we consider the base case of Table 1 with m mts s and v mts s the mean and variance of the MTS setup times. Similar notation is used for the mean and variance of the production times (with subscript p) and for the corresponding quantities for MTO (with superscript mto). In the numerical examples below, we only mention the parameters that deviate from this base case. It is implicit that parameter values that are not mentioned are taken from the base case. The parameters of the base case correspond to a system load of 63%.

Inventory
Orders MTO MTS The left pane of Figure 2 studies the impact of the load on the system's performance. In particular, the mean inventory level E[Q p ], the mean backlog size E[Q o [ and the mean lead time LT are depicted vs. the order arrival load ρ for different values of the threshold s. In line with expectations, the mean backlog size and lead time increase when ρ increases. When there are more orders, it is more likely that there are many uncompleted orders when a new order is placed. In contrast, the mean product inventory mostly decreases when the load increases. However, for s = 1, the mean product inventory first decreases and then again increases with increasing load. More load means that more semi-finished products are produced, but also that more semi-finished are made to order. It is hence hard to predict its influence on the mean inventory level. The effect of changing the threshold s is easier to explain. For higher s, production more easily switches from MTO to MTS. Therefore, it is not unexpected that the mean inventory level increases for higher s. Larger values of s further lead to lower values of the mean order backlog and the mean lead time. This can be explained by noting that having more semi-finished products ready lowers the backlog and lead times. Finally, note that for higher load, the influence of the parameter s disappears. This is in line with our findings in Section 2.4 where it is noted that performance measures do not depend on s in overload situations. The influence of the threshold s on the performance is further explored in the right pane of s /2). In line with the observations above, the mean inventory level increases when s increases. Moreover, longer setup times lead to lower inventory levels. This is not unexpected; it is less likely that there are no outstanding orders as the system's load is higher as a larger part of the production capacity is lost on setup. The threshold s affects the mean order backlog and the mean lead time as well. For increasing s, these quantities first decrease and then increase again. The shape of these curves can be explained by two opposing effects. For higher s, the system more easily switches when there are no orders, such that it is more likely that there are semi-finished products ready when orders arrive. However, switching incurs also a cost as some production capacity is lost on setups.
To study the effect of order arrival correlation, the mean  Figure 3. Recall that the parameter σ denotes the fraction of time with order arrivals. Hence, for a fixed load, low σ means that the order arrivals are more concentrated in time compared to higher values of σ. In line with findings from queueing theory, we find that the mean and variance of the order backlog and the mean lead time are negatively affected by arrival correlation. Indeed, these values increase when σ decreases. The variance of the inventory level also decreases for increasing σ, while, depending on the threshold s, the mean inventory level either increases or decreases when there is more correlation. More correlation means that there are longer periods without orders during which the inventory level is high, but this also means there is less overhead from switching between MTS and MTO. The latter is clearly confirmed by the plot of the switching rate, which shows that there is less switching when there is more correlation.  The same performance measures are also considered in Figure 4. These measures are plotted for different values of the threshold s vs. the inventory capacity S, for S ≥ s. Both the mean and variance of the inventory level increase for increasing S. This is not unexpected, S being the inventory level when MTS switches back to MTO. However, larger S are not necessarily beneficial for the mean and variance of the order backlog and for the mean lead time. If S is small, increasing S will lead to less switching (and setup) such that the mean and variance of the order backlog and the mean lead time decrease. However, if one increases S further, the cost of switching is already low, while the MTS operation interrupts the MTO operation for longer times. As the backlog typically increases during the MTO operation, one finds larger backlogs and longer lead times. Finally, we study the optimal (s, S)-policy, accounting for both holding costs and lead times. To be more precise, we seek the optimal strategy that minimises the cost C ν , Here, the parameter ν determines the relative weight of the holding cost and the lead time. Figure 5 shows the optimal s and S vs. the cost parameter ν. The left pane considers the optimal policy for different values of the setup time m s as indicated (we again assume Erlang(2) setup times as in Figure 2). In contrast, the right pane depicts the optimal policy for different values of the load ρ. Increasing ν corresponds to shifting weight from the holding cost to the lead times. As holding costs are lower for smaller s and S, it is expected that s and S increase with ν. For large ν, the holding cost only marginally affects the cost C ν , so that the policy converges to the policy that only optimises the lead time. Moreover, if the mean setup time increases, it is optimal to keep more inventory. Long setup times make switching between MTO and MTS expensive, while keeping more inventory reduces the need for switching. Finally, in line with expectations, it is also beneficial to keep more inventory if there are more orders.

Conclusions
We introduced an analytically tractable stochastic model for studying the performance of a hybrid make-to-stock/make-to-order system. Our model includes two "queues": the semi-finished product inventory and the order backlog. We rely on matrix-analytic solution techniques to evaluate the performance of this system. Our approach allows accounting for uncertainty in demand and MTO and MTS setup and production times under non-restrictive stochastic assumptions. Switching between MTO and MTS operations is governed by an (s, S)-type policy. By some numerical examples, we show how one can find the optimal policy that balances holding costs and lead times.
The model at hand can be used to support MTO/MTS decisions in production environments. For an accurate performance assessment, it is however essential that the stochastic characteristics of the production processes and of the demand are accurately estimated. The statistical inference of the model parameters can either be based on prior measurements or can be learned while the production system is running using an exploration-exploitation approach [40,41], and this will be considered in future work.
We finally mention some alternative hybrid MTO/MTS systems that can be studied by a similar methodological approach: (i) systems with dedicated MTS and MTO production, (ii) systems with multiple production units, either dedicated or units that can switch between MTS and MTO, and (iii) systems where production capacity can be arbitrarily divided between MTS and MTO.