Integration of Production Planning and Scheduling Based on RTN Representation under Uncertainties

Production planning and scheduling are important bases for production decisions. Concerning the traditional modeling of production planning and scheduling based on Resource-Task Network (RTN) representation, uncertain factors such as utilities are rarely considered as constraints. For the production planning and scheduling problem based on RTN representation in an uncertain environment, this paper formulates the multi-period bi-level integrated model of planning and scheduling, and introduces the uncertainties of demand and utility in planning and scheduling layers respectively. Rolling horizon optimization strategy is utilized to solve the bi-level integrated model iteratively. The simulation results show that the proposed model and algorithm are feasible and effective, can calculate the consumption of utility in every period, decrease the effects of uncertain factors on optimization results, more accurately describe the uncertain factors, and reflect the actual production process.


Introduction
Production planning and scheduling are important bases for production decisions, and play an important role in economic benefits.In the traditional control of production processes, production planning and scheduling are optimized, respectively, which has obvious disadvantages such as the infeasibility and sub-optimality of optimization results.With the rapid development of economic globalization and product demand diversification, competition among enterprises is more and more fierce.In order to arrange production reasonably and enhance competitiveness of enterprises, enterprise managers and researchers realize that single production planning or scheduling cannot satisfy the needs of production and management in enterprises.Consequently, the integration problem of production planning and scheduling is receiving more and more attention [1] in the complex and changeable economic situation [2,3].Shao et al. [4] proposed that production planning and scheduling are complementary, and that integration of production planning and scheduling can enhance the performance of production management greatly.Lasserre [5] formulated a holistic integrated model of production planning and scheduling, and solved the integrated model hierarchically.Xiong et al. [6] explored multi-period multi-workshop production planning and scheduling problems, and formulated an integrated optimization model of the production planning and scheduling based on nonlinear mixed integer programming.An alternant iterative method by hybrid genetic algorithm is employed to solve the integrated model, which promoted the research of the integration problem of production planning and scheduling.Li et al. [7] stated that implementing integrated optimization of planning and scheduling can improve the quality of decision making in the process operations, and also proposed a new decomposition strategy based on two-level optimization.Wang et al. [8] formulated a bi-level integrated model of production planning and scheduling based on State-Task Network (STN) representation, and introduced the rolling horizon optimization strategy to solve the bi-level integrated model iteratively.The feasibility and effectiveness of the proposed model are illustrated through benchmark examples.Vogel et al. [9] developed a hierarchical and integrated model considering both levels, aggregate production planning, and master production scheduling.Computational tests show that it is possible to solve the integrated model and it outperforms the existing hierarchical approach for all instances.Hassani et al. [10] proposed a new model integrating planning and scheduling to make up for the defect that the capacity limitation could not reflect the practical availability of resources, and added the constraint of resource availability.In this model, the optimization total cost of a single-level job shop was taken as the objective function, and the random approximation method was adopted as the genetic algorithm to solve the N-P problem.
A reasonable and elaborate representation for production processes is an important point to establish production planning and scheduling model.In the process industry, general representation methods for production process include STN, State-Sequence Network (SSN) and Resource-Task Network (RTN).Pantelides et al. [11] proposed the RTN representation method, which is a comprehensive and concise process-representation method.This representation method can describe all the resource properties in a unified manner.Any kinds of facilities and other resources are not distinctive, and considered as producible and consumable resources when the tasks are active.Zhang et al. [12] extended the concept of RTN to provide a unified mathematical formulation of the problem of determining the optimal operating conditions of a mixed production facility, comprising a multipurpose plant for both batch and continuous operations.Alternative approaches for solving the general problem were discussed, and some preliminary numerical results were presented.Castro et al. [13] proposed an improved general mathematical programming formulation for optimal scheduling of batch processes based on the RTN representation.The proposed models led to simpler and less degenerate mathematical models.These models can be solved in significantly less CPU time, when compared to other RTN continuous-time formulations.Chen et al. [14] proposed an improved mixed integer linear programming model for short-term scheduling of multipurpose batch plants under maximization of profit based on RTN representation and unit-specific events.To solve the model, a hybrid method based on line-up competition algorithm and linear programming was presented.Simulation results show that the proposed model and hybrid method were effective for short-term scheduling of multipurpose batch plants.Some research achievements on the production planning and scheduling problem based on RTN representation were proposed, however, the majority of these achievements are under determinate condition, and do not involve uncertain factors [15,16].Chao et al. [17] believed that distributionally robust optimization (DRO) is a new and effective method to deal with the imprecise probability distribution of uncertain parameters in the decision-making process.They proposed an effective DRO framework to solve the production planning and scheduling problem in the uncertain demand environment.Based on this, they considered the multi-stage sequential decision structure in the operation process.Curcio et al. [18] proposed an adaptive strategy applicable to the multi-stage setting of the two-stage planning and robust optimization model, and an approximate heuristic algorithm based on multistage stochastic programming and adjustable robust optimization.The simulation results show that the strategies are promising in solving large-scale problems: the approximate strategy based on adjustable robust optimization has, on average, 6.72% better performance and is 7.9 times faster than the deterministic model.Production planning and scheduling problem based on RTN representation considering uncertain factors as constraints in production process, is rare.This paper formulates the multi-period bi-level integrated model of production planning and scheduling, considers the demand and utility uncertainties for the production planning and scheduling problem based on RTN presentation.A deterministic model with two layers of planning and scheduling is formulated firstly.In the deterministic model, uncertainties of demand and utility are treated as deterministic parameters in the planning layer and scheduling layer respectively.Then the chance constrained programming [19] and fuzzy theory [20,21] are introduced into the planning layer model and scheduling layer model, respectively, to describe the uncertainties of demand and utility [22,23].The planning layer model is formulated by the discrete-time modeling method [24].The scheduling layer model is formulated by the unit-specific event-based continuous-time modeling method.Rolling horizon optimization strategy [25] is utilized to solve the bi-level integrated model iteratively.The simulation results show that the model and algorithm can accurately describe the uncertain factors, decrease the effects of uncertain factors on optimization results, and more accurately reflect the actual production processes.
This paper is organized as follows: Section 1 introduces the research status of production planning and scheduling integration.Section 2 establishes the deterministic model and the uncertain model at the planning layer and the scheduling layer respectively.Section 3 introduces the rolling horizon optimization strategy.An example is simulated and analyzed in Section 4. Conclusions are presented in Section 5.

Planning Layer Model
Due to the long time scale of the planning layer, it can be divided evenly into several time periods.A discrete-time linear programming model is established at the planning layer, with the maximization of profits as the objective function.Chance constrained programming is introduced to describe the uncertainty of demand.Through a series of mathematical transformations, the uncertain model with chance constraints is transformed into a deterministic model with a specified confidence level.At last, the transformed deterministic model is solved.
The maximum of profit is taken as the objective function of the production planning layer model, where the first part represents the product profit, the second part represents the punishment cost caused by the backlog order quantity of the products, the third part represents the cost paid due to the impact of the productivity fluctuation in the production processes, and the fourth part represents the cost paid when the inventory quantity exceeds the safe limit of inventory.

Material balance constraints:
Constraints ( 2) and (3) respectively represent the material balance in the subsequent period and the initial period.The inventory s(i, k) of the material status i at the end of the planning period k is equal to the inventory at the end of the previous period s(i, k − 1) plus the output of current period p(i, k), and finally minus the delivery of current period D(i, k) and the corresponding consumption j∈N i c ij • P( j, k), which is consumed by downstream production.Among them, N i is the downstream material set of material state i; c ij is the conversion coefficient between material state i and material state j.

Demand constraints:
Constraint (4) represents that the backlog order quantity Td(i, k) of product i in the period k is equal to the backlog order quantity in the previous period Td(i, k − 1) plus the order quantity in the current period Ord ik , minus the final delivery D(i, k) .In Constraint (5), td i,k is a parameter in the model and, as a backlog order quantity generated by the scheduling layer, feedback to the next planning period, where, the delivery quantity D(i, k) should be less than or equal to the sum of the order quantity of this period and backlog order quantity of the previous period, as well as the backlog order quantity from the scheduling layer in the previous period.

Production Capacity and Productivity Fluctuation Constraints:
Constraint ( 6) represents the production capacity constraint of materials.Material status i produced in the period k should be between maximum production capacity P max i and the minimum production capacity P min i .In order to avoid excessive fluctuation of productivity in the adjacent periods, auxiliary variable Flu(i, k) is introduced into Constraint (7) and corresponding penalty weight β is introduced into the objective function, so as to reduce the loss caused by productivity fluctuation as much as possible.

Inventory constraints:
Constraint (8) represents the inventory of material status i at the end of the period k.S(i, k) should be between the inventory upper limit S max i and the inventory lower limit S min i .In order to avoid the situation that the inventory storage level is too high or too low, auxiliary variable Inv(i, k) is introduced into Constraint (9), and penalty weight θ is introduced into the corresponding objective function.The reference upper limit S Ul i and lower limit S Ll i of the inventory storage are set, so as to reduce the impact of the inventory storage level on the production processes.

Chance Constrained Uncertain Model
The uncertain factors in production planning have attracted more and more attention from scholars and researchers, as well as many methods and theories have been proposed to deal with the uncertain factors in production planning, including stochastic programming [26], fuzzy programming [27], robust optimization [28,29], recoverable robustness [30], sensitivity analysis [31] etc.At present, many research results have been obtained by using stochastic programming to deal with the problem of demand uncertainty [32,33].Chance constrained programming is an important branch of stochastic programming.It allows decisions, to some extent, to not meet the constraints, but these decisions should make the probability of the constraints set up no less than a certain confidence level.The chance constrained method can more truly and effectively respond to demand uncertainty in the production planning.
In Constraints (10) and (11), the parameter order demand quantity Õrd ik is a random variable, assuming that the parameter obeys normal distribution, namely N(E Õrd ik , var Õrd ik ).Under a certain confidence level, Constraints (10) and (11) can be rewritten into Constraints (12) and (13).
By using the knowledge of Theorem 1 and Theorem 2 the probability density function can be used to further transform Constraints ( 12) and (13) into Constraints ( 14) and (15), and finally transform the model with demand uncertainty into a deterministic model with a confidence level.This transformation of the chance constraint has been solved in detail in many related studies [34,35], and it will not be repeated here in this paper.
Theorem 1.For the random linear programming model: ) is a single random variable, and the deterministic programming model with the formula at the confidence level ν is as follows: Theorem 2. For the random linear programming model: ) is a single random variable, and the deterministic programming model with the formula at the confidence level ν is as follows:

Scheduling Layer Model
The continuous-time modeling method was adopted to establish the scheduling layer model.The optimization objective of the scheduling layer is to complete the production tasks assigned from the planning layer as much as possible.Therefore, the minimization of the value of the difference between the task amount assigned by the planning layer and the task amount completed by the scheduling layer was taken as the objective function.Resource balance constraint, capacity constraint, demand constraint, time constraint, sequence constraint, utility supply and utility time constraint were also considered.In scheduling layer, fuzzy theory is utilized to describe the uncertainty of the utility.Finally, the uncertainty model of utility is transformed into a deterministic model with membership degree by corresponding mathematical method.

Deterministic Model
The objective function is the minimization of the value of the difference between the task quantity assigned by the planning layer and the task quantity completed by the scheduling layer.The first part represents the reference task quantity assigned at the end of the planning period, and the second part represents the total final delivery of products completed by the scheduling layer within the planning period.

Resource balance constraints:
Constraints ( 21) and ( 22) respectively represent resource balance constraints of subsequent event points and the initial event point.The amount of available resources at event n E(r, n) is equal to the amount of available resources at the previous event point E(r, n − 1) plus the production amount of the previous event point, and the consumption of the current point.Moreover, in Constraints ( 21) and ( 22), µ c ri ≤ 0, ρ c ri ≤ 0. 3. Capacity constraints: Constraint (23) represents that the availability of the resource status r at the event point n is limited between the resource upper limit E max r and the resource lower limit E min r .For device resources, this constraint limits the appropriate number of device units; for material resources, this constraint limits the storage of material resources.In Constraint (24), B max i is the upper limit of material handling amount and B min i is the lower limit of material handling amount.When w(i, n) = 1, material handing amount b(i, n) of task i should be between the upper limit of material handling amount B max i and the lower limit of material handling amount Constraint (25) represents that the reference task quantity De f r,k assigned by the planning layer within the specified period k shall be greater than or equal to the total product delivery quantity.In Constraint (26), the backlog order quantity of product td(r, k) of the scheduling layer should be equal to the difference between the reference task quantity De f r,k of the planning layer and the final delivery quantity of the product, the backlog order quantity td(r, k) in the obtained optimization results of the scheduling layer is fed back to the next period of planning model as td i,k+1 in Constraint (5).When we first solve the planning layer, we treat td i,k as 0 and get the first period of optimization result of the planning layer.By inputting this result into the scheduling layer, the optimization result of scheduling layer, optimized for the first time, will be obtained.The backlog order quantity td(r, k) in the obtained optimization results of the scheduling layer is fed back to the next period of planning model as td i,k+1 .The final optimization results of planning layer and scheduling layer are obtained by iterative solution.
5. Time constraints: Constraint (28) represents that the start time T s (i, n) of tasks i at the event point n should be less than or equal to the scheduling horizon H.In Constraint (29), α i • w(i, n) and β i • b(i, n) respectively represent the constant term and variable term of task duration time, namely the end time T f (i, n) of tasks i at the event point n should be equal to the duration time of the task plus the start time of the task.

Sequence constraints:
a. Same task in the same unit: Constraint (30) represents that the start time of tasks i at the event point n + 1 should be greater than or equal to the end time of tasks i executing on the same device at the event point n.
b. Different tasks in the same unit: Constraint (31) represents that the start time of tasks i at the event point n + 1 should be greater than or equal to the end time of different tasks i executing on the same device at the event point n.
c. Different tasks in different units: In Constraint (32), if w(i , n) = 1, the start time of tasks i at the event point n + 1 should be greater than or equal to the end time of different tasks i on different devices at the event point n; If w(i , n) = 0, Constraint (32) is relaxed, where Sla is a positive big number.

Utility supply and utility time constraints:
Constraint (33) represents that the maximum supply U max u of utility u should be greater than or equal to the total consumption of the same utility u at the same event point n.The consumption of utility is determined by constant term λ iu • w(i, n) and variable term ϕ iu • b(i, n).Constraint (34) represents that the start time consuming utility u should be less than or equal to the scheduling time horizon H. Constraint (35) represents that the start time of the utility u at the event point n + 1 should be greater than or equal to the start time of the utility u at the event point n.

Fuzzy Uncertain Model
It is an effective method to describe the uncertainty of utility with fuzzy theory, because it is much easier to determine the membership function of a fuzzy number than the distribution function of a random variable.Different from the order demand, utilities are greatly influenced by the energy system, and the energy system is disturbed by many factors, so it is difficult to determine the specific distribution function to express the uncertainty of utilities.In this chapter, the fuzzy theory [36] is used to describe the uncertainty of utilities.
The utility supply Ûmax u in Constraint ( 36) is an uncertain parameter.It is assumed that the triangular membership function of Ûmax u is T ri (u), which is expressed as follows: Algorithms 2019, 12, 120 9 of 21 Using the theory of fuzzy knowledge, Constraint (36) can be converted to Constraint (38).Finally, the uncertain model with utility constraints is transformed into a deterministic model with membership degree.
w 1 ,w 2 ,w 3 are the weights, and w 1 + w 2 + w 3 = 1; the fuzzy parameters of High-pressure Steam (HS) and Cooling Water (CW) include the most pessimistic value, the most possible value, and the most optimistic value.The three prominent values, i.e., the most pessimistic, the most possible, and the most optimistic values for each fuzzy number are usually estimated by decision maker [37,38].In this paper, the three prominent values are defined according to determining method of universe and the experience of engineering.The universe U of fuzzy number is defined as an equation according to Basyigit and Ulu [39], where D min is the minimum value in statistical data of fuzzy number, D max is the maximum value in statistical data of fuzzy number.D 1 and D 2 are defined as an equation and according to the experience of engineering.D m f is the value of which the frequency of occurrence is the highest in statistical data of fuzzy numbers.
In order to describe fuzzy numbers more generally, in this paper we define u 1 , u 2 and u 3 as the most pessimistic value, the most possible value, and the most optimistic value.The most pessimistic value u 1 is equal to D min − D 1 (the left boundary of universe).The most possible value u 2 is equal to D m f .The most optimistic value u 3 is equal to D max + D 2 (the right boundary of universe).
The triangular membership degrees of U max 1,δ , U max 2,δ , U max 3,δ are the boundary points of U max u under the cut set δ, the corresponding calculation formula of the boundary point is as follows, and the relationship between them is shown in Figure 1.
Tri(u) Using the theory of fuzzy knowledge, Constraint (36) can be converted to Constraint (38).Finally, the uncertain model with utility constraints is transformed into a deterministic model with membership degree. 1 w w w + + = ; the fuzzy parameters of High-pressure Steam (HS) and Cooling Water (CW) include the most pessimistic value, the most possible value, and the most optimistic value.The three prominent values, i.e., the most pessimistic, the most possible, and the most optimistic values for each fuzzy number are usually estimated by decision maker [37,38].In this paper, the three prominent values are defined according to determining method of universe and the experience of engineering.The universe U of fuzzy number is defined as an equation according to Basyigit and Ulu [39], where mf D is the value of which the frequency of occurrence is the highest in statistical data of fuzzy numbers.
Figure 1.The triangular membership function of parameter U max u .

Integrated Model and Solving Strategy
In this paper, the integrated model of production planning and scheduling considering demand uncertainty and utility uncertainty is solved based on the integrated optimization method and rolling horizon optimization strategy.The solving method of integrated optimization is to construct a bi-level integrated model of planning and scheduling to deal with the demand and utility uncertainties.As the uncertainty of demand and utility are different in time scales, it is necessary to deal with the uncertainty of demand and utility in production planning layer and scheduling layer respectively.The discrete-time model is established in the production planning layer, and chance constrained programming is used to describe demand uncertainty.The continuous-time model is established in the production scheduling layer, and fuzzy theory is used to describe utility uncertainty.When the planning layer completes the Kth optimization, the optimization result D(i, k) corresponding to the first planning period is equal to De f r,k .Parameter De f r,k is assigned as a task to the scheduling layer.The double-layer structure of production planning and scheduling is shown in Figure 2. In order to describe fuzzy numbers more generally, in this paper we define 1 u , 2 u and 3 u as the most pessimistic value, the most possible value, and the most optimistic value.The most pessimistic value 1 u is equal to (the left boundary of universe).The most possible value The triangular membership degrees of max 1, U  are the boundary points of max u U under the cut set  , the corresponding calculation formula of the boundary point is as follows, and the relationship between them is shown in Figure 1 .

Integrated Model and Solving Strategy
In this paper, the integrated model of production planning and scheduling considering demand uncertainty and utility uncertainty is solved based on the integrated optimization method and rolling horizon optimization strategy.The solving method of integrated optimization is to construct a bi-level integrated model of planning and scheduling to deal with the demand and utility uncertainties.As the uncertainty of demand and utility are different in time scales, it is necessary to deal with the uncertainty of demand and utility in production planning layer and scheduling layer respectively.The discrete-time model is established in the production planning layer, and chance constrained programming is used to describe demand uncertainty.The continuous-time model is established in the production scheduling layer, and fuzzy theory is used to describe utility uncertainty.When the planning layer completes the Kth optimization, the optimization result ( , ) D i k corresponding to the first planning period is equal to Def is assigned as a task to the scheduling layer.The double-layer structure of production planning and scheduling is shown in Figure 2. Rolling horizon optimization strategy is a general time decomposition method.The planning horizon of the discrete-time model in the planning layer is composed of m planning periods with equal time durations.The scheduling horizon of the continuous-time model in the scheduling layer Rolling horizon optimization strategy is a general time decomposition method.The planning horizon of the discrete-time model in the planning layer is composed of m planning periods with equal time durations.The scheduling horizon of the continuous-time model in the scheduling layer is equal to the length of the planning period.The rolling horizon optimization strategy is used to iteratively solve the integrated model of production planning and scheduling.The specific steps of rolling horizon optimization strategy are as follows: a. Solve the production planning model and assign the delivery quantity of the first planning period to the scheduling model.
b. Solve the scheduling model of the current period and judge whether the scheduling layer has completed the delivery quantity assigned by the planning layer.If it can be completed, roll the planning horizon and repeat step a; if it cannot be completed, the unfinished tasks will be passed to the next planning period as the backlog order quantity, then roll the planning horizon and repeat the step a.
c.The calculation is terminated after obtaining the planning and scheduling schemes for all periods.
The flow chart of iterative solving strategy of integrated model is shown in Figure 3, and the schematic diagram of rolling horizon optimization strategy is shown in Figure 4.
is equal to the length of the planning period.The rolling horizon optimization strategy is used to iteratively solve the integrated model of production planning and scheduling.The specific steps of rolling horizon optimization strategy are as follows: a. Solve the production planning model and assign the delivery quantity of the first planning period to the scheduling model.
b. Solve the scheduling model of the current period and judge whether the scheduling layer has completed the delivery quantity assigned by the planning layer.If it can be completed, roll the planning horizon and repeat step a; if it cannot be completed, the unfinished tasks will be passed to the next planning period as the backlog order quantity, then roll the planning horizon and repeat the step a.
c.The calculation is terminated after obtaining the planning and scheduling schemes for all periods.
The flow chart of iterative solving strategy of integrated model is shown in Figure 3, and the schematic diagram of rolling horizon optimization strategy is shown in Figure 4.

Solve the opportunity constraint model of the planning layer
Roll the horizon of planning layer Whether the completion of all of the planning periods scheduling results? Defr,k=∑d(r,n)?
Obtain the optimal scheduling result ∑d(r,n) of the current planned period.

Start
The optimal solution D(i,1) of the planning layer in the first planning period is passed to Defk of the scheduling layer.And solve the scheduling layer based on fuzzy theory.
Feedback Td(i,k) to the planning layer, and roll the horizon of lanninglayer.
Whether the completion of all of the planning periods scheduling results?  is equal to the length of the planning period.The rolling horizon optimization strategy is used to iteratively solve the integrated model of production planning and scheduling.The specific steps of rolling horizon optimization strategy are as follows: a. Solve the production planning model and assign the delivery quantity of the first planning period to the scheduling model.
b. Solve the scheduling model of the current period and judge whether the scheduling layer has completed the delivery quantity assigned by the planning layer.If it can be completed, roll the planning horizon and repeat step a; if it cannot be completed, the unfinished tasks will be passed to the next planning period as the backlog order quantity, then roll the planning horizon and repeat the step a.
c.The calculation is terminated after obtaining the planning and scheduling schemes for all periods.
The flow chart of iterative solving strategy of integrated model is shown in Figure 3, and the schematic diagram of rolling horizon optimization strategy is shown in Figure 4.

Solve the opportunity constraint model of the planning layer
Roll the horizon of planning layer Whether the completion of all of the planning periods scheduling results? Defr,k=∑d(r,n)?
Obtain the optimal scheduling result ∑d(r,n) of the current planned period.

Start
The optimal solution D(i,1) of the planning layer in the first planning period is passed to Defk of the scheduling layer.And solve the scheduling layer based on fuzzy theory.
Feedback Td(i,k) to the planning layer, and roll the horizon of lanninglayer.
Whether the completion of all of the planning periods scheduling results?

Case Study
The classical example [40] was used to verify the feasibility and effectiveness of the two-layer integrated model of planning and scheduling in dealing with the uncertain problems of demand and utility based on the RTN representation.The example uses RTN representation to describe the production process, as shown in Figure 5.The three raw materials S1, S2 and S3 produce two products S8 and S9 through a series of endothermic and exothermic reactions, in which the endothermic reaction requires high-pressure steam (HS) and the exothermic reaction requires condensed water (CW).Due to the limitations of the energy system, the average supply of HS and CW is 64 and 69 kg/min, respectively.Heating can be performed on heater J1.Reaction 1 can be performed on reactors J2, J3.Reaction 2 can be performed on reactors J2, J3.Reaction 3 can be performed on reactors J2, J3.Separation can be performed on separator J4.The study involved a total of eight different production processes.Unlimited storage policy is adopted for raw materials and products, and limited storage policy is adopted for intermediate materials [41,42].The relevant data of the calculation example are shown in Tables 1-3.

Case Study
The classical example [40] was used to verify the feasibility and effectiveness of the two-layer integrated model of planning and scheduling in dealing with the uncertain problems of demand and utility based on the RTN representation.The example uses RTN representation to describe the production process, as shown in Figure 5.The three raw materials S1, S2 and S3 produce two products S8 and S9 through a series of endothermic and exothermic reactions, in which the endothermic reaction requires high-pressure steam (HS) and the exothermic reaction requires condensed water (CW).Due to the limitations of the energy system, the average supply of HS and CW is 64 and 69 kg/min, respectively.Heating can be performed on heater J1.Reaction 1 can be performed on reactors J2, J3.Reaction 2 can be performed on reactors J2, J3.Reaction 3 can be performed on reactors J2, J3.Separation can be performed on separator J4.The study involved a total of eight different production processes.Unlimited storage policy is adopted for raw materials and products, and limited storage policy is adopted for intermediate materials [41,42].The relevant data of the calculation example are shown in Tables 1-3.

The Influence of the Planning Layer Confidence Factor on the Optimization Results
The stochastic programming with chance constraints is introduced into the production planning layer to describe the uncertainty of demand.Through a series of mathematical transformation, the uncertain model with chance constraints can be transformed into a deterministic model with specified confidence level.Different confidence levels have a very important impact on the optimization results.The objective functions under different confidence factors are shown in Table 4.The value of the confidence factor in the part of integrated model simulation analysis is 0.9.The variation trend of maximum profit under different confidence levels is shown in Figure 6.

The Influence of Scheduling Layer Fuzzy Weight on the Optimization Results
In the production scheduling layer, fuzzy theory is introduced to describe the uncertainty of utilities.It is assumed that triangular membership function is adopted to express the uncertainty of utilities.Using the knowledge of fuzzy theory, the uncertainty model with utility is transformed into a certainty model with fuzzy weights.The fuzzy parameter values of HS is u 1 = 62 , u 2 = 64 , u 3 = 68; and the fuzzy parameter values of CW is u 1 = 67 , u 2 = 69 , u 3 = 73.A visualized sensitivity analysis of fuzzy weights is illustrated in Figure 7.The optimization results of scheduling layer under different weights are shown in Table 5.It can be seen from Figure 7 that when the weight of the maximum possible value increases from 0.1 to 0.8, the optimal solution of the uncertain model is closer to the optimal solution of the deterministic model.This is because the weights w 1 , w 2 , and w 3 represent the degree of inclination of the model to the most optimistic value, the maximum possible value, and the most pessimistic value in the membership function.In other words, if the weight of the boundary is large, the influence of the boundary on the optimization result will be greater.For the fuzzy weights, w 1 , w 2 , w 3 represent the weights of the most pessimistic, the most possible, and the most optimistic value of the related fuzzy numbers, respectively.In practice, the suitable values for these weights as well as δ are usually determined subjectively by the experience and knowledge of the decision maker.Based on the most likely value concept proposed by Lai and Hwang [38], and considering several relevant works [43,44], we set these parameters to: w 1 = 0.1 , w 2 = 0.5 , w 3 = 0.4 in this paper.

Integrated Model Simulation Analysis
The order data of two products in nine planning periods and the corresponding average supply of two utilities are given.Based on the RTN representation, integrated optimization solving method and rolling horizon optimization strategy were used to iteratively solve the integrated model to complete the planning and scheduling tasks of the first five planning periods.The software Lingo 11.0 was used for simulation calculation on a 2.20 GHz computer, where the planning horizon is 5 days and the planning period and scheduling horizon are both 1 day.The number of event points is 12. Figures 8 and 9 respectively show the gantt chart and utility consumption level of the deterministic method and the uncertainty method.From Figures 8 and 9, we can intuitively get the respective task number and the corresponding specific utility consumption under the deterministic method and the uncertain method.Under the deterministic method, the solution time of the rolling horizon algorithm is 28 s.Under the uncertain method, the solution time of the rolling horizon algorithm is 34 s.
In the comparative analysis between the deterministic method and the uncertain method shown in Tables 6 and 7, S represent the scheduled production of S 8 and S 9 respectively.The objective function of the planning layer of the deterministic method is $99,688.52,and the output of products S 8 and S 9 in the planning layer are, respectively, 1330 and 1550 kg.In the uncertain method with the confidence factor of 0.9, the objective function of the planning layer is $97,285.11,and the output of products S 8 and S 9 are respectively 1296.998 and 1514.416kg.The objective function in the scheduling layer of the deterministic method is 128.9 kg, and the output of products S 8 and S 9 are, respectively, 1201.1 and 1550 kg.The objective function in the scheduling layer of the uncertain method is 87.277 kg, and the output of products S 8 and S 9 are, respectively, 1209.721 and 1514.416kg.The final profit of the enterprise under the deterministic method is $86,792.96,and the final profit of the enterprise under the uncertain method is $88,557.392.The comparison of the final profit shows that the uncertain method reflects the actual production process more realistically due to considering the uncertainty of the demand and the utility, which brings greater profits to the enterprise.Tables 8 and 9 respectively represent the consumption amount of utility in each period under the deterministic method and uncertain method, where use i (i = 1 • • • 5) represents the consumption amount of utility in the planning period i and use all represents the total usage amount of utility.The total amounts of utility HS used under the deterministic method and the uncertain method are 1804.94419and 1735.6687kg, respectively.The total amounts of utility CW used under the deterministic method and the uncertain method are 1685.06007and 1732.3723kg, respectively.
Backlog order quantity of 87.277 kg under the uncertain method is significantly less than that of 128.9 kg under the deterministic method.These comparative results show that introducing the uncertain programming method into the planning and scheduling layers, respectively, can greatly reduce the generation of backlog order quantity, and the scheduling layer can more effectively complete the tasks assigned by the planning layer.Based on the RTN representation, the uncertain method adopted in the scheduling layer can effectively reduce the impact of uncertainty factors on the optimization results, and can clearly count the consumption amount of utilities in each period.Therefore, the proposed integrated model can more realistically reflect the actual production situation, save energy, and reduce production costs, so that the final profit of the enterprise obtained by the uncertain method is $88,557.392,which is obviously better than the final profit of the enterprise under the deterministic method of $86,792.96.
Considering the uncertainty of demand and utility, the proposed method is slightly more complex than the deterministic model in modeling and solving, but it belongs to the category of pre-scheduling, and the solving time is 34 s, which can fully meet the real-time requirements of actual production.In addition, this method has more application value for chemical enterprises whose demand is affected by seasons and which need utilities, especially for small businesses.In order to reduce the cost, small businesses will be gathered and purchase utilities from other companies to support their own production.Compared with large enterprises which have their own energy systems, the utilities supply for small businesses experiences disturbance more easily.Consequently, for this kind of small business, considering the uncertain utility problem for effective enterprise production process is of great application value and practical significance.

Conclusions
This paper introduces and analyzes uncertain factors involved in production planning and scheduling.According to the property of time scale, these uncertain factors are dealt with distinctively in the planning and scheduling layers.The planning layer and scheduling layer models are formulated by discrete-time and continuous-time modeling methods, respectively.Chance constrained programming and fuzzy theory are introduced into planning layer model and scheduling layer model, respectively, to describe the uncertainties of demand and utility.Rolling horizon optimization strategy is utilized to solve the bi-level integrated model iteratively.Through comparison, simulation results show that the proposed model and algorithm are feasible and effective, can calculate the consumption of utility in every period, decrease the effects of uncertain factors on optimization results, and more accurately reflect the actual production process.The downstream material status set of material status i c. Parameters: Price i

Nomenclature
The market price of product i, $ • kg −1 α The penalty weight of backlog order item, which is 100 in this paper β The penalty weight of productivity fluctuation item, which is 0.0001 in this paper θ The penalty weight of inventory limit item, which is 0.0001 in this paper S ini i Initial inventory of material status i c ij Conversion coefficient between material status i and material status j Ord ik Order quantity for product i in period k p min i Minimum production capacity of material status i p max i Maximum production capacity of material status i s min i Inventory lower limit of material status i s max i Inventory upper limit of material status i s Ll i Inventory reference lower limit of material status i s Ul i Inventory reference upper limit of material status i td i,k−1 Backlog order quantity from material status i of the scheduling layer Pr{•} Probability computing operator λ Confidence factor d. Variables: S(i, k) Inventory of material status i in planning period k P(i, k) Amount of material status i produced in planning period k D(i, k) Delivery of material status i in planning period k Td(i, k) Backlog order quantity of material status i in planning period k Flu(i, k) Auxiliary variable of productivity fluctuation Inv(i, k) Auxiliary variable of inventory limit

Figure 1 .
Figure 1.The triangular membership function of parameter max u U .

1 D and 2 D
minDis the minimum value in statistical data of fuzzy number, max D is the maximum value in statistical data of fuzzy number.are defined as an equation and according to the experience of engineering.

Figure 2 .
Figure 2. The double-layer structure of production planning and scheduling.

Figure 2 .
Figure 2. The double-layer structure of production planning and scheduling.

Figure 3 .
Figure 3. Flow chart of integrated model iterative solving strategy.

Figure 6 .
Figure 6.The variation trend of maximum profit under different confidence levels.

Figure 6 .
Figure 6.The variation trend of maximum profit under different confidence levels.

Figure 7 .
Figure 7. Scheduling layer optimization results under different weights.

Figure 7 .
Figure 7. Scheduling layer optimization results under different weights.
planned production of S 8 and S 9 ; S schedule 8 and S schedule 9

Figure 9 .
Figure 9. Gantt chart and utility consumption of the uncertain method.

Figure 8 .Figure 9 .
Figure 8. Gantt chart and utility consumption of the deterministic method.

Figure 9 .
Figure 9. Gantt chart and utility consumption of the uncertain method.
tasks that consume material resources I u A set of tasks that consume utilities R , R S , R J Resource set, Material resource set, Device resource set N Event point set H Scheduling horizon c.Parameters: De f r,k The amount of reference tasks assigned at the end of the planning period k E ini Initial resource quantity use i Consumption amount of utility in the planning period i(i = 1 • • • 5) use all Total usage amount of utility µ p ri , µ c ri Production and consumption coefficients of device resources involved in task i; µ p ri ≥ 0 µ c ri ≤ 0 ρ p ri , ρ c ri Production and consumption coefficients of material resources involved in task i; ρ p ri ≥ 0 ρ c ri ≤ 0 E min r The lower limit of resource r E max r The upper limit of resource r B min i Lower limit of material handing amount of task i B max i Upper limit of material handing amount of task i Sla Large positive number in relaxation constraints.w 1 , w 2 , w 3 Weights U max 1δ , U max 2δ , U max 3δ The boundary points of the triangular membership function under the cut set δ T ri (u) Triangle membership function of U max u

Table 1 .
Task processing time coefficient and capacity data.

Table 1 .
Task processing time coefficient and capacity data.

Table 2 .
Material and device resource related data.

Table 4 .
The objective function under different confidence factors.

Table 4 .
The objective function under different confidence factors.

Table 5 .
Scheduling layer optimization result data under different weights.

Table 5 .
Scheduling layer optimization result data under different weights.
Gantt chart and utility consumption of the deterministic method.

Table 6 .
Comparative analysis of the planning layer.Gantt chart and utility consumption of the deterministic method.

Table 6 .
Comparative analysis of the planning layer.

Table 6 .
Comparative analysis of the planning layer.

Table 7 .
Comparative analysis of the scheduling layer.

Table 8 .
The consumption amount of each period of utility under the deterministic method.

Table 9 .
The consumption amount of each period of utility under the uncertain method.