A PREDICTIVE MODEL OF MULTI-STAGE PRODUCTION PLANNING FOR FIXED TIME ORDERS

The traditional production planning model based upon a deterministic approach is well described in the literature. Due to the uncertain nature of manufacturing processes, such model can however incorrectly represent actual situations on the shop ﬂoor. This study develops a mathematical modeling framework for generating production plans in a multi-stage manufacturing process. The devised model takes into account the stochastic model for predicting the occurrence of faulty products. The aim of the control model is to determine the number of products which should be manufactured in each planning period to minimize both manufacturing costs and potential ﬁnancial penalties for failing to fulﬁll the order completely.


Introduction
The ever-increasing competition on the global economic market and growing expectations of customers force manufacturing companies to meet orders in the exact time and quantity as stipulated in a contract [1]. This means that manufacturing plants need to satisfy their customers demands neither too late nor too soon, due to the fact that early production incurs inventory holding costs while late production causes either lost sales or backlogs [2,3]. Excessive inventories can also lead to poor cash flows necessitating financing to cover operational costs, while stock-outs can lead to customer service problems and to the eventual loss of business [4].
In manufacturing environments, production planning involves taking decisions about such issues as the size of production lots, the time by which these lots have to be produced, and sometimes about machines to be used or a production facility where the production process is taking place [5]. Therefore, the main goal of production planning decisions is to arrive at a compromise between economic objectives, such as cost minimization profit maximization, and the less tangible objective of customer satisfaction. To this aim, manufacturing planning systems are becoming more and more sophisticated in order to increase both the productivity and flexibility of production operations.
During the last several years a number of studies on production planning were published in professional and scientific journals. Most of them present production planning models based on integer programming (MIP) models, focusing on set-up costs and times, machine assignment, and the like [6]. A vast majority of these studies focus on typical character-istics of process industries production control compared to the more traditional approaches of production control for discrete manufacturing systems. In this body of literature, two schools of thought can be distinguished. The first advocates the applicability of traditional manufacturing requirements planning (MRP) concepts and systems in process industries. The researchers and practitioners in this school concentrate on the specific characteristics that may occur in process industries, trying to find solutions to implement the MRP [7]. The second school stresses the differences between discrete and process manufacturers, coming up with new or adapted techniques and concepts for production control in these situations. Nonetheless, the problem of the variety of production systems within process industries is very seldom discussed. Some papers address the problem of variety (or the opportunities it offers), but its consequences for production control are not worked out in more detail [8].
The research on optimal planning and control of production processes in made-to-order manufacture and assembly systems is limited. Fransoo presents a typology of production control situations in process industries, where two extreme production systems are distinguished on a continuum [8]. Chen et al. [9] developed an optimal control system in which finished products are produced as soon as there are units available in the inventory for all components. Benjaafar and ElHafsi [10] dealt with a production and inventory single product assemble-toorder system with multiple customer classes. Benjaafar et al. [11] investigated the problem of optimal control of assembly systems with multiple stages and multiple demand classes. The problem of multiple level production planning was also discussed by both Simpson [12] and Wang and Sarker [4]. Millhiser et al. [13] dealt with the problem of dynamic control of arrivals of multiple job classes in N-stage production systems with finite buffers and blocking after service. Gershwin [14] provided a synthesis of works on manufacturing flow control. Kushner [15] as well as Plambeck and Ward [16] formulated Brownian control problems and derived asymptotically optimal policies. Ceryan et al. [17] studied optimal control of an assembly system where the demand may arise either for the end product itself or for any of the components. More recently Liao [18] examined the feasibility of using the economic production quantity (EPQ) model in the modeling of an imperfect process involving deteriorating systems. In a similar vein, Sarkar and Sarkar [19] presented an economic manufacturing quantity model with deterioration and exponential demand for a production sys-tem over a finite horizon under the effect of inflation and value of money. Diponegoro and Sarker [20] developed a model of finite horizon planning for a production system with permitted shortage and fixedinterval deliveries. A model of short-term production planning developed following the stochastic approach was presented by Terkaj and Tolio [21]. Ghelase et al. [22] proposed a method for planning and controlling the entire production process, from customer enquiry up to product delivery, for the made-to-stock manufacturing systems. Finally, Felea at al. [23] presented a model which allows dynamic evaluation of consequences of some disturbances to machine operations in manufacturing systems using indicators based on time, energy and costs.
The problem analyzed in the paper particularly concerns long-term orders which must be realized in some or several planning periods due to their quantity. Specifically, we propose a mathematical model for optimal production planning for a fixed horizon where the produced faulty parts are characterized by the stochastic Poisson function. The objective of the proposed model is to minimize both total production costs and costs for failing to perform the order. The problem is naturally closely associated with capacity balancing, operational management and material requirements planning (MRP); these aspects are not however dealt with in this paper.

Problem formulation
Although the main goal of production systems is both to control production process and to determine the demand for means of production (materials, labor force), it is, however, sometimes better to devise an optimal plan (path) instead of controls [6,7]. Next, the system must be controlled such that it follows a devised plan. Therefore, the task is to determine the optimal trajectory as a set of marks representing the planned production values. In this case, planning means determining a set of points (marks, values) that must be tracked by the production system to satisfy the aim, then the system must be controlled. The objective function represents total costs which are the sum of control costs and costs of missing the target. This total cost is called a composite cost function (CCF). Let (Ω, F , P ) be a probability space. Suppose that w 1 , w 2 , . . . are independent ndimensional random vectors on this space, with Poisson's distribution. We assume that all the above mentioned objects are stochastically independent and the initial state is y 0 . For the above mentioned production, the contracted volume to be realized by a manufacturing plant is a < ∞.
Let the rest of contract non-fulfillment be described by a stochastic state equation: where i = 0, . . . , N − 1, y i ∈ R n ⊕ , B ∈ R nxk . Matrix B denotes the production matrix (transformation matrix from resources to products). The The Y j -measurable vector u j ∈ R k will be called control action system (1) and it stands for production, while u = (u 0 , u 1 , . . .) stands for an admissible control. The class of admissible controls is denoted by U .

Remark 2:
For any t = s the covariance matrix of vectors w t and w s is a zero matrix because all elements of these vectors (random variables) are independent: cov(w t , w s ) = [0].

Remark 3:
The covariance matrix of the vector w t for t ≥ 1 is: (3)

Remark 4: Let the y-production vector and the matrix C be a matrix of raw material at a production unit (matrix of resource consumption), then the vector of resources used in production is calculated as:
while the production matrix: Let the vector K ∈ R k be a vector of unit costs in production, while the matrix Q ∈ R kxk is the matrix of coefficients of quadratic costs. The main aim is to move the system from the state y 0 to the contracted volume a. The system should be carried out (controlled) at the lowest production cost. To specify the aim of control, we introduce the cost of production at time i as u T i Qu i + K T u i and a heredity function α y N − a 2 as losses (added costs) for failing to perform the contract (a ∈ R n ⊕ ). The objective function takes the form: The main aim of optimal control is to realize the contracted volume of production a at the lowest cost possible, which is the sum of costs and losses. Then, the task is to find: and to determine a sequence of admissible control u * = (u * 0 , ..., u * N −1 ) for which infinimum is attained. On the other hand, when we need to determine an optimal production plan, then task (5) should be formulated in a slightly different form. Let det(B T B) = 0. When we want to move system (1) from the state y i to y i + 1, i = 0, 1, . . . , N − 1, then the control takes the form: Thus, task (5) can be replaced by: where The main aim is not to find the solution to problem (5), but only to determine the optimal control, and the solution of task (7) gives the optimal production plan.

Optimal plan determination
By solving task (7) we obtain a set of admissible points (marks) y = (y 0 , . . . , y N ) for which the infinimum is attained. This optimal sequence y i , i = 0, 1, . . . , N presents a route (optimal path of production), along which system (1) should move. and The optimal mark is: and Proof. First, we define the Bellman function (see: [25]), which is non-negative (it is defined as a sum of quadratic forms). For the time N we have: for j = 0, 1, . . . , N − 1. The value of the Bellman function in the step N is given by (13) while in the step N − 1 we have: From the stochastically independent vectors w 1 , w 2 , . . ., the properties of conditional expectation and (2), (3) we have: and From (15)-(17) we have: Thus, the optimal mark is: and finally: We assume that Eqs. (8)-(10) are true for i + 1. From (14) and using the properties of conditional expectation we have: Thus, the optimal mark for the time i + 1 is: Finally we have: and using formulas (8)- (10): Remark 6. Equation (11) gives the formula (rule) of how to determine the optimal state production for the time j + 1 if system (1) in the time j travelled the way (path) y 0 , ..., y j .

Remark 7.
Of course, to determine a plane on which the system should move, we can proceed in another way. First, we solve classical linear quadratic control problem (5) to obtain control laws. Next, we simulate the possible trajectories of linear system (1) using optimal controls. Finally, averaging the possible paths, we obtain a production plan which must be tracked by the system. The obtained plan cannot be optimal. Corollary 8. The optimal plan (set of landmarks) for system (1) is given by (11) for i = 0, 1, ..., N − 1.
If we want to draw up a production plan (as a set of landmarks) at time t = 0, then we must determine an optimal plan conditioned by the σ-field Y 0 : or in a dynamical form: Let: for 0 < j < k. Finally we have: Remark 9. Using formula (18), we can devise a production plan for times i = 1, ..., N at the beginning of production as E(y 1 |Y 0 ) , E(y 2 |Y 0 ) ,. . . , E(y N |Y 0 ), which must be tracked by a company's managing board.

Remark 10.
When the optimal plan for the linear system is known and calculated as (11), then from (6) the expected control conditioned by the σ-field Y j is:

Illustrative example
Let us assume that a company produces two types of products: A and B. To produce them, the company uses two types of means of production, for example material (m) and labor force (l) in the respective quantities: product A -0.8 m units and 0.3 l units; product B -0.15 m units and 0.7 l units. The unit cost of material equals 3.7 while the unit cost of labor force is 1.5. Therefore, the matrix of resource consumption C and the vector of unit costs K are: The ordered quantity of products manufactured in the time N amounts to 2000 units of product A and to 1800 units of product B. The fixed horizon of the production time was conventionally divided into ten equal periods of time defining the production control moments (Fig. 1). To validate the behavior of the model, four scenarios were analyzed. In the first scenario, the unit cost for failing to perform the contract (α) was accepted at a level of 1 monetary unit, in the second case it was α = 10, in the third case α = 100 and in the fourth case α = 1000. In every case, the expected value of faulty products was defined as 2% of the ordered quantity for product A (λ A = 40) and as 1.5% of the ordered quantity for product B (λ B = 27). The production results in each of the planning periods are given in Table 1. As can be observed, when the penalty for failing to perform the contract is higher, the planned quantity of products to be manufactured is close to the quantity stipulated in the order.
When analyzing the prediction track of products to be manufactured (herein named as "ideal prediction trace"), it can be observed that the prediction track in each scenario is not represented by a straight line (Figs. 2-5). In fact, what can be observed is that the shape of the prediction trace is similar. This means that in the first planning period product B is manufactured in a large quantity (14.7% of the whole order is realized in the first planning period), while    product A is manufactured in a very small quantity (only 1.1% of the whole order is realized in the first planning period). The situation then changes to produce considerably more of the A products and very few B products.
The number of products to be manufactured in each planning period can be calculated by subtraction between two consecutive states of the production. The quantity of both products (A and B) that should be manufactured in each planning period is presented in Table 2. As can be observed, the quantity of products manufactured in each planning period is not equal. In the case of product A, the number of products to be manufactured is higher in every planning period, whereas in the case of product B the situation is the opposite (Fig. 6). Generally, the obtained production plans allow to balance production capacity, ensure indispensable workforce and develop individual schedules for each production period.

Discussion
Although the above example shows a means of production planning process for the whole planning horizon, it is worth emphasizing that in real manufacturing environment the quantity of manufactured products is often inconsistent with the planned quantity (the number of faulty parts cannot be absolutely predicted). For this reason, the developed model was also tested for a real-like situation. It means that the quantity of products to be manufactured in a next planning period was dynamically anticipated once the actual state of production for both parts was already known (Fig. 7). The tests were performed only for scenario 4 (a = 1000) using the MATLAB software. Despite the "normal" unpredictability of manufacturing faulty products, we assumed that products A and B were not produced in the fifth planning period (due to the necessity of fulfilling another very important and urgent order and no free capacity). Moreover, to intensify the production of product A, the real state production of product B was reduced from the planned 141.3 units to 30 units in the ninth planning period (p 9 ) - Table 3. The results (predicted and real production states in each planning period) are given in Table 4. Examining the comparison of the planned quantity of products anticipated for the whole planning period (ideal production trace) and products to be made in compliance with the active production trace, it can be observed that active planning (e.g. one that takes both small and large disturbances into account) adjusts the production plans such that the order can be performed at the end of the planning horizon while the total cost of production can be minimized.
With the number of produced parts being near the planned quantity (ideal production trace), the number of dynamically planned production is very similar. The situation changes when unpredicted disturbances occur (e.g. the one in the fifth planning period) -Figs. 8 and 9.

Conclusions
Given an increasingly competitive time-based environment, companies are forced to plan and realize production processes in a more efficient and costeffective way. This poses new challenges with regard to production planning and control. In consequence, it is necessary to develop new, more efficient methods for providing support for operational activities in this field. The problem with production planning and control mainly boils down to the difficulty with predicting the number of faulty parts in the production process. As a result, it is difficult to develop an optimal production plan and, consequently, to predict material demand.
In this study, a mathematical model of multistage production planning for a fixed horizon was proposed. The objective function is the total cost which is the sum of production costs and cost of failing to meet contract requirements. The planning variables (quantity of parts to be produced) are predicted for a defined number of planning periods that are necessary for the order to be realized in time and at the lowest costs possible. The number of parts to be produced is determined based on the stochastic independence of manufacturing faulty products.