Optimal Control of Integrated Production – Forecasting System

In this work, optimal control theory is used to derive the optimal production rate in a manu‐ facturing system presenting the following features: the demand rate during a certain period depends on the demand rate of the previous period (dependent demand), the demand rate depends on the inventory level, items in inventory are subject to deterioration, and the firm can adopt a periodic or a continuous review policy. Also, we are using the fact that the cur‐ rent demand is related to the previous demand in order to integrate the forecasting compo‐ nent into the production planning problem. The forecast of future demand for the products being produced is needed to plan future activities. Forecasting information is an important input in several areas of manufacturing activity. This problem has been considered in the literature. The proposed approach is different from that of other authors which is mainly based on time-series. In [1], the authors deal with the interaction between forecasting and stock control in the case of non-stationary demand. In [2], the authors assume a distribution for the unknown demand, estimate its parameters and replace the unknown demand pa‐ rameters by these estimates in the theoretically correct model. In [3], the authors propose an approach to evaluate the impact of interaction between demand forecasting method and stock control policy on the inventory system performances. In [4], the authors present a sup‐ ply chain management framework based on model predictive control (MPC) and time series forecasting. In [5], the authors consider a data-driven forecasting technique with integrated inventory control for seasonal data and compare it to the traditional Holt-Winters algorithm


Introduction
The production planning problem has received much attention, and many sophisticated models and procedures have been developed to deal with this problem. Many other components of production systems have also been taken into account by researchers in so called integrated systems, in order to achieve a more effective control over the system.
In this work, optimal control theory is used to derive the optimal production rate in a manufacturing system presenting the following features: the demand rate during a certain period depends on the demand rate of the previous period (dependent demand), the demand rate depends on the inventory level, items in inventory are subject to deterioration, and the firm can adopt a periodic or a continuous review policy. Also, we are using the fact that the current demand is related to the previous demand in order to integrate the forecasting component into the production planning problem. The forecast of future demand for the products being produced is needed to plan future activities. Forecasting information is an important input in several areas of manufacturing activity. This problem has been considered in the literature. The proposed approach is different from that of other authors which is mainly based on time-series. In [1], the authors deal with the interaction between forecasting and stock control in the case of non-stationary demand. In [2], the authors assume a distribution for the unknown demand, estimate its parameters and replace the unknown demand parameters by these estimates in the theoretically correct model. In [3], the authors propose an approach to evaluate the impact of interaction between demand forecasting method and stock control policy on the inventory system performances. In [4], the authors present a supply chain management framework based on model predictive control (MPC) and time series forecasting. In [5], the authors consider a data-driven forecasting technique with integrated inventory control for seasonal data and compare it to the traditional Holt-Winters algorithm for random demand with a seasonal trend. In [6], the authors assess the empirical stock control performance of intermittent demand estimation procedures. In [7], the authors study two modifications of the normal distribution, both taking non-negative values only.
Many researchers have investigated the situation where the demand rate is dependent on the level of the on-hand inventory. In [8], the authors consider an inventory model under inflation for deteriorating items with stock-dependent consumption rate and partial backlogging shortages. In [9], the authors examine an inventory model for deteriorating items under stock-dependent demand and two-level trade credit. The reference [10] deals with a supply chain model for deteriorating items with stock-dependent consumption rate and shortages under inflation and permissible delay in payment. In [11], the authors deal with the optimal replenishment policies for non-instantaneous deteriorating items with stock-dependent demand. In [12], the authors investigate an inventory model with stock-dependent demand rate and dual storage facility. In [13], the authors develop a two warehouse inventory model for single vendor multiple retailers with price and stock dependent demand. In [14], the authors asses an integrated vendor-buyer model with stock-dependent demand. In [15], the authors study an EOQ model for perishable items with stock and price dependent demand rate. In [16], the authors develop the optimal replenishment policy for perishable items with stock-dependent selling rate and capacity constraint. In [17], the authors consider an inventory model for Weibull deteriorating items with price dependent demand and timevarying holding cost. In [18], the authors study fuzzy EOQ models for deteriorating items with stock dependent demand and nonlinear holding costs. In [19], the authors approach an extended two-warehouse inventory model for a deteriorating product where the demand rate has been assumed to be a function of the on-hand inventory. In [20], the authors investigate a channel who sells a perishable item that is subject to effects of continuous decay and fixed shelf lifetime, facing a price and stock-level dependent demand rate. In [21], the authors develop a mathematical model to formulate optimal ordering policies for retailer when demand is practically constant and partially dependent on the stock, and the supplier offers progressive credit periods to settle the account. The literature on stock-dependent demand rate is abundant. We have reported some of it here but only a comprehensive survey can summarize and classify it efficiently.
In [22], the authors review the most recent literature on deteriorating inventory models, classifying them on the basis of shelf-life characteristic and demand variations. In [23], the authors introduce an order-level inventory model for a deteriorating item, taking the demand to be dependent on the sale price of the item to determine its optimal selling price and net profit. In [18], the authors formulate an inventory model with imprecise inventory costs for deteriorating items under inflation. Shortages are allowed and the demand rate is taken as a ramp type function of time as well. In [10], the authors model the retailer's cost minimization retail strategy when he confronts with the supplier trade promotion offer of a credit policy under inflationary conditions and inflation-induced demand. In [24], the authors develop two deterministic economic production quantity (EPQ) models for Weibull-distributed deteriorating items with demand rate as a ramp type function of time.
The goal of this chapter is to study the same problem in periodic and continuous review policy context, knowing that the inventory can be reviewed continuously or periodically. In a continuous-review model, the inventory is monitored continually and production/order can be started at any time. In contrast, in periodic-review models, there is a fixed time when the inventory is reviewed and a decision is made whether to produce/order or not.
We assume that the firm has set an inventory goal level, a demand goal rate and a production goal rate, to build the objective function of our model. The inventory goal level is a safety stock that the company wants to keep on hand. The demand goal rate is the amount that the company wishes to sell per unit of time. The production goal rate is the most efficient rate desired by the firm. The objective is to determine the optimal production rate that will keep the inventory level, the demand rate, and the production rate as close as possible to the inventory goal level, the demand goal rate, and the production goal rate, respectively. Therefore, we deal with a dynamic problem and the solution sought, the optimal production rate, is a function of time. The problem is then represented as an optimal control problem with two state variables, the inventory level and the demand rate, and one control variable, the rate of manufacturing.
The rest of this chapter is organized as follows. In section 2, the notation used is introduced and the dynamics of the system are described for both periodic and continuous review systems. In section 3, the optimal solution is computed for each case. Simulations are conducted in section 4 to verify the results obtained theoretically in section 3. Section 5 summarizes the chapter and outlines some future research directions.

Continuous review integrated production model
Consider a manufacturing firm producing units of an item over some time interval 0, T , where T > 0. Let I (t), D(t), and P(t) represent the inventory level, the demand rate, and the production rate at time t, respectively. Let Î(t), D (t), and P (t) represent the corresponding goals at time t. Also, let h , K , r represent the penalties for each variable to deviate from its goal. Then, the objective function J to minimize is given by To use a matrix notation, which is more convenient, let X (t) = ΔI (t) ΔD(t) and let X A 2 = X T AX . Then, the objective function (2) can be further rewritten as Two state equations are used to describe the dynamics of our system. The variations of the inventory level and demand rate are governed by the following state equations with known initial inventory level with known initial demand rate D(0) = D 0 and a < 0 for a stable demand. Since the goals Î(t), D (t), and P (t) also follow the dynamics (4)-(5), we can use the shift operator defined above to express the state equations (4) and (5) as and The state equations (6)-(7) can also be written in matrix form as where , with initial condition X (0) = X 0 .

Periodic review integrated production model
In the periodic review model, the time interval 0, T is divided into N subintervals of equal length. During period k, the plant manufactures units of some product at the controllable rate P(k), and the state of the system is represented by the inventory level I (k) and the demand rate D(k).
Assuming that the initial inventory level is I (0) = I 0 and that the units in stock deteriorate at a rate θ, the dynamics of the first state variable, the inventory level, are governed by the following difference equation: where α = 1 -θ.
Also, and as mentioned in the introduction and previous paragraph, assuming a dependent demand rate and a stock-dependent demand rate with initial value D(0) = D 0 , the dynamics of the second state variable, the demand rate, are governed by the following difference equation: where a and b are positive constants, with 0 < a < 1, for a stable demand.
It is assumed that the firm has set for each period k the following targets: the production goal rate P (k), the inventory goal level Î(k ), and the demand goal rate D (k). If penalties q I , q D , and r are incurred for a variable to deviate from its respective goal, then the objective function to minimize is given by: where the shift operator Δ is defined by Since the target variables satisfy the dynamics (9) and (10), these can be rewritten using the shift operator Δ to get: It is more convenient to write the model using a matrix notation. To this end, let The objective function (11) becomes where X A 2 = X T A X while the dynamics (12)-(13) become where Thus we need to determine the production rates P(k) at each sample that minimize the objective function (14), subject to the state equation (15).

Optimal control of continuous review model
Given the preceding definitions, the optimal control problem is to minimize the objective function (3) subject to the state equation (8): To use Pontryagin principle, see for example the reference [25], we introduce the Hamiltonian where is the adjoint function associated with the constraint (8). An optimal solution to the control problem (P) satisfies several conditions. The first condition is the control equation ∇ ΔP (t ) H(ΔP, X , Λ, t) = 0 which is equivalent to The second condition is the adjoint equation The next condition is the state equation ∇ Λ(t ) H(ΔP, X , Λ, t) = d dt X (t) which is equivalent to (8). Finally, the last condition is given by the initial and terminal conditions X (0) = X 0 and Note that, using the control equation (17), the state equation (8)

Model Solution
We propose the following two equivalent solution approaches to solve the optimal control problem (P).

First solution approach
In this approach, we need to solve a Riccati equation as we will see below. To use the backward sweep method of Bryson and Ho [26], we let where S(t) = s 1 (t) 0 0 s 2 (t) .
Differentiating (20) with respect to t and then using successively the state equation (19) and the change of variable (20) yields Also, using the change of variable (20), the adjoint equation (18) becomes Equating expressions (21) and (22), we obtain the following Riccati equation To solve Riccati equation (23), we use a change of variable to reduce it to a pair of linear matrix equations. Let The Riccati equation (23) becomes Multiplying this expression from the right by F yields Then, we have Multiplying this expression from the left by ( E F -1 ) -1 yields Equations (27) and (29) now give two sets of linear equations Call . The differential equations (30) become of the form We recall that for a given a constant matrix Γ, the matrix exponential e Γt is found as e Γt = Pe Dt P -1 , where D is the diagonal matrix whose elements are the eigenvalues of Γ and P is the matrix whose columns are the corresponding eigenvectors. Thus, In the next solution approach, which also leads to a set of homogeneous equations, we will show how the constant term G(t 0 ) is obtained. For this approach, after finding E (t)and F (t), the desired result S(t) is obtained by using the change of variable (24). The optimal solutions of the problem (P) are:

Second solution approach
This approach avoids the Riccati equation as we will see. The adjoint equation (18) and the state equation (19) are equivalent to the vector-matrix state equation . Then, the vector-matrix state equation (32) can be rewritten as Expression (35) is a set of 4 first-order homogeneous differential equations with constant coefficients. It is similar to (31) and it has a solution similar to (33). We give here the explicit solution.
The matrix Φ has four distinct eigenvalues m i , i = 1,2, 3,4. The explicit expressions of these eigenvalues are easily obtained using some mathematical software with symbolic computation capabilities such as MATHCAD, MAPLE, or MATLAB. These expressions are lengthy and thus are not reproduced here. The explicit expressions of the corresponding eigenvectors are also obtained using the same software. Then, the solution to (33) is given by Note that the first two components of Z (t) thus computed form the state vector X (t) whose components are ΔI (t) and ΔD(t), while the last two components form the co-state vector Λ(t) whose components are λ 1 (t) and λ 2 (t). In what follows, we show how φ(t) and Z (0) are determined using the two initial conditions I (0) = I 0 , D(0) = D 0 and the terminal conditions To determine φ(t), introduce the diagonal matrix M = diag(m 1 , m 2 , m 3 , m 4 ) and denote by Y the matrix whose columns are the corresponding eigenvectors. Then, To determine Z (0) = X (0) Λ(0) , we recall that X (0) = ΔI (0) ΔD(0) is known while Λ(0) = λ 1 (0) λ 2 (0) is not.
However, using the final value Λ(T ), we can find Λ(0) as follows. From (36), we have at t = T , which can be rewritten as Using the terminal condition we have Finally, the optimal solutions of the problem (P) using the second method are: where ∆ I (t) and ∆ I (t) are solutions of the linear equation:

Optimal control of periodic review model
Here also we assume that the system state is available during each period k. To use the standard Lagrangian technique, we introduce the discrete Lagrange multiplier vector: Then, the Lagrangian function is given by The necessary optimality conditions are the control equation and the adjoint equation In order to solve these equations, we use the backward sweep method of Bryson and Ho (1975), who treat extensively in their book the problem of optimal control and estimation. They detail two methods for solving the Riccati equation arising in linear optimal control problem, the first one being the transition matrix method and the second being the backward sweep method. Let The control equation (40)

= Q ΔZ(k) + A T S (k + 1) A ΔZ (k) -B V (k + 1)ΔZ (k) , = { Q + A T S (k + 1)A -A T S (k + 1)B V (k + 1) } ΔZ (k).
Finally, the matrices S can be computed from the backward discrete time Ricatti equation (DTRE) given by the recursive relation The boundary condition S (N ) = Q follows from ΔP(N ) = 0. Now, to obtain the optimal production rates, we use the change of variable (42) to get from the adjoint equation (41), so that Also, from the dynamics (15), we have the optimal production rates where the optimal state vector ΔZ (k) is found in expression (49) above and S(k) is found in expression (47).

Simulation of continuous review model
To illustrate numerically the results obtained, firstly we present some simulations for optimal control of the continuous-review integrated production-forecasting system with stockdependent demand and deteriorating items. The data used in this simulation is presented in Table 1.
Using the MATLAB software, we implemented the results of the previous section and obtained the graphs below. Figures 1, 2 and 3 show the variations of ΔI (t), ΔD(t), and ΔP(t).
We observe that they all converge toward zero, as desired.
Using equation (3), the optimal cost is found to be J = 3047.93. A sensitivity analysis is performed in order to assess the effect of some of the system parameters on the optimal cost. The analysis is conducted by keeping the values of the parameters at the base values shown in Table 1 and varying successively one parameter at a time. We were interested in the effect on the value of the optimal objective function J of the parameters a, b, and θ, that we varied from 0.1 to 0.9. Table 2 summarizes the results of the sensitivity analysis.   As can be seen, the objective function decreases as any of the three parameters increases.

Simulation of periodic review model
In this second part of the simulation, we illustrate the results obtained on the optimal control of the periodic review integrated production-forecasting system with stock-dependent demand and deteriorating items. Thus, consider the production planning problem for a firm for the next T units of time. Divide this interval into N subintervals of equal length. Assume the product in stock deteriorates at the rate θ. Assume also the variations of the demand rate occur according to the dynamics (10). The firm has set the following targets. For k = 1, ⋯ , N , the goal inventory level and goal demand rate are assumed to be as follows: Î(k ) = 5 + 1.5 sign ( sin ( 2πk 40 )) and D (k ) = 2 + 0.5 sign ( sin ( 2πk 15 )) where the sign function of a real number x is defined by We have to note that the goal inventory level and the goal demand rate were constant in the continuous review case.
The goal production rate is then computed using where we assume that the inventory goal level is constant over a certain range. The penalties for deviating from these targets are q I for the inventory level, q D for the demand rate, and r for the production rate. The data are summarized in Table 3. deviation cost for production rate r 0.01 Table 3. Data for periodic-review model For the periodic review case, the simulation results are shown in the graphs below. Figure 4 shows the variations of the optimal inventory level and the inventory goal level. We observe that except for the early transient periods, I (k) follows Î(k )very closely.  Figure 5 shows the variations of the optimal demand rate and the demand goal rate. We observe that except for the early transient periods, D(k) follows D (k) very closely.
Finally, Figure 6 shows the variations of the optimal production rate and the production goal rate. We again observe that except for the early transient periods, P(k) follows P (k) very closely.
The optimal cost is found to be J = 10.3081. Here also a sensitivity analysis is performed in order to assess the effect of some of the system parameters on the optimal cost. The analysis is conducted by keeping the values of the parameters at the base values shown in Table 3 and varying successively one parameter at a time. We were interested in the effect on J of the parameters a, b, and θ, that we varied from 0.1 to 0.9. Table 4 summarizes the results of the sensitivity analysis.  The second column of Table 4 shows that the optimal cost increases as a increases. The third column of Table 4 shows that the optimal cost increases also as b increases. The effect of b on J is however more significant than the effect of a. Finally, column 4 of Table 4 shows that the optimal cost decreases as θ increases. The effect of θ is however almost negligible.

Conclusion
In this chapter we have used optimal control theory to derive the optimal production rate in a manufacturing system presenting the following features: the demand rate during a certain period depends on the demand rate of the previous period (dependent demand), the demand rate depends on the inventory level, items in inventory are subject to deterioration, and the firm adopts either a continuous or periodic review policy. In contrast to most of the existing research which uses time series forecasting models, we propose a new model, namely, the demand dynamics equation. This model approaches realistic problems by integrating the forecasting component into the production planning problem with deteriorating items and stock dependent demand under continuous-review policy. Simulations were conducted in order to show the performance of the obtained solution. The theoretical and the simulations results allow gaining insights into operational issues and demonstrating the scope for improving stock control systems.
Of course, as with any research work, this study is not without limitations. The main contribution of our model is equation (5) where we use the demand from the previous period to predict the demand in the current period. The main limitation of that equation is that it involves two coefficients. We have assumed in this chapter that the parameters a and b of the demand state equation are known. However, in real life, that may not be the case. We are currently further investigating this model to estimate these parameters in the case when they are unknown, using self-tuning optimal control.
Another research direction would be to use a predictive control strategy where, given the current inventory level, the optimal production rates to be implemented at the beginning of each of the following periods over the control horizon, are determined. Model predictive control (or receding-horizon control) strategies have gained wide-spread acceptance in industry. It is also well-known that these models are interesting alternatives for real-time control of industrial processes. In the case where the above parameters a and b are unknown, the self-tuning predictive control can be applied. The proposed control algorithm estimates online these coefficients and feeds the controller to take the optimal production decision.
Note that our state equations are linear and thus linear model predictive control (LMPC), which is widely used both in academic and industrial fields, can be used. Nonlinear model predictive control (NMPC) can be used in case one of the state equations is nonlinear, for example, if equation (5) were of the form d dt D(t) = aD(t) + αI (t) β NMPC has gained significant interest over the past decade. Various NMPC strategies that lead to stability of the closed-loop have been developed in recent years and key questions such as the efficient solution of the occurring open-loop control problem have been extensively studied.
The case combining unknown coefficients and a nonlinear relationship between the demand rate and the on-hand inventory yields a very complex, highly nonlinear process for which there is no simple mathematical model. The use of fuzzy control seems particularly well appropriate. Fuzzy control is a technique that should be seen as an extension to existing control methods and not their replacement. It provides an extra set of tools which the control engineer has to learn how to use where it makes sense. Nonlinear and partially known systems that pose problems to conventional control techniques can be tackled using fuzzy control.