A continuous time model for a short-term multiproduct batch process scheduling

In the chemical industry, it is common to find production systems characterized by having a single stage or a previously identified bottleneck stage, with multiple non-identical parallel stations and with setup costs that depend on the production sequence. This paper proposes a mixed integer production-scheduling model that identifies lot size and product sequence that maximize profit. It considers multiple typical industry conditions, such as penalties for noncompliance or out of service periods of the productive units (or stations) for preventive maintenance activities. The model was validated with real data from an oil chemical company. Aiming to analyze its performance, we applied the model to 155 instances of production, which were obtained using Monte Carlo technique on the historical production data of the same company. We obtained an average 12 % reduction in the total cost of production and a 19 % increase in the estimated profit.


Introduction
The chemical industry is characterized by having repetitive production operations in which chemical reactions occur either in batches or in continuous flow of liquid or gaseous material, rather than in discrete units.This aspect, together with the limitations of several processes, makes the planning of the production process, of a greater complexity than those of the manufacturing industry.
Figure 1 presents an outline of the process.A basic feature of this production process is that it involves multiple stages but there is a main bottleneck stage that uses the most expensive operating resources of the plant.Those resources are the chemical reactors, hereinafter referred to as processing units or just units.This fact forces the other stages of the process to subordinate to these units, and allows the simplification of the scheduling process to the single bottleneck stage as in (Marchetti & Cerdá, 2009).It also requires the most efficient use of these units by using them at their maximum load and by minimizing setup times.Setup times are often associated with cleaning operations, tool changes and machine shapes.Non-identical units imply different capacities and different processing times for a given product.It also implies that there is a subset of units that can process a particular product.The planning problem also includes the scheduling of maintenance operations.The production planning process usually includes a stage prior to the planning horizon, in which the various orders of a product are grouped and, after checking the inventory status, a "total production demand" is determined for each product.Products may have intermediate due dates, i.e. some partial or total demand for a particular product may have more than one specific due date within the planning horizon for either the same or different customers.A model should then consider an objective function with penalization by violations in demand goals and other policies, and subject to operations constraints (i.e.sequence, product-unit compatibility and sequence dependent preparation times).
Although important research efforts have been made in this area (Harjunkoski, et al., 2014;Mendez, Cerdá, Grossmann, Harjunkoski, & Fahl , 2006), some challenges have been identified related to the ability of academic proposals to represent a) the actual features of industrial problems (Novara, Novas, & Henning, 2016), and b) the size of problems that can realistically be solved with these methods.
This article addresses the first challenge by solving a shortterm batch scheduling for a chemical company context.The operational issues considered in this work have not all been addressed before: (a) the product compatibility expressed by sequence dependent preparation times, which is given by the number of washing procedures of the unit required between two consecutive products, and by sequence dependent costs; that is, costs that depend on the number of washing operations; (b) The flexibility of partially or totally rejecting the processing of a specific product over a given horizon is also handled considering the demands; (c) Non identical parallel units; (d) inventory reorder points, and inventory (minimum and maximum) limits of each product; (d) Overproduction, which is a major problem due to storage limitations, is controlled with upper bounds; (e) Product priorities are also considered based on marketing conditions; (f) The option of having multiple batches per order; and (g) A monolithic approach, in the sense that not only consists on the definition of the number and size of batches of the same product but of the same order, and their sequence.This approach has shown to yield better solutions than those obtained by two-stage methods (Castro & Novais, 2009).
Moreover, the computational complexity of these types of problems (i.e.NP hard) has proved to be very sensitive to several parameters and their inter-dependencies (Koçlar, 2005;Transchel, Minner, Kallrath, Löhndorf, & Eberhard, 2011).Despite this, the performance of several of the approaches has been evaluated numerically well with few examples, sometimes small, or with real data given by very specific conditions (Harjunkoski, et al., 2014;Novara, Novas, & Henning, 2016).Thus, to address the second challenge, the robustness of this proposal was validated using a set of data generated using the Monte Carlo technique from real data, which is an uncommon approach for testing these type of models.

Literature review
Optimum planning of batch production has received great attention in recent years because of its positive impact on production efficiency and economic benefit (Xue & Sun, 2010).The latest revisions of batch scheduling problems can be found in Allahverdi, Ng, Cheng, & Kovalyov (2008), Harjunkoski, et al. (2014); Jans & Degraeve (2008), Karimi, Ghomi, & Wilson (2003), Mendez, Cerdá, Grossmann, Harjunkoski, & Fahl (2006) and in Zeballos, Novas, & Henning (2011).The last four focused on industrial models.Scheduling problems considering maintenance can be found in (Chang & Manikas, 2009;Tsai & Wang, 2017).An extensive part of the literature deals with the problem of the size and the programming of batches with discrete time intervals (Harjunkoski, et al., 2014;Merchan, Lee, & Maravelias, 2016;Velez, Dong, & Maravelias, 2017).Though this is perhaps the most general approach (Harjunkoski, et al., 2014), its major drawback is related to data accuracy, and as Jans and Degraeve (2008) say: "The main limitation of this approach is the unnecessary increase in the overall problem size due to the introduction of additional binary variables associated with each discrete time interval".These drawbacks have attracted the development of continuous time scale models.
Additionally, multi-product and multi-stage continuous programming time MILP models have been proposed.They consider sequence-dependent preparation times, unit-dependent preparation times and due dates (Afzalirad & Rezaeian, 2016;Atan & Akturk, 2008;Castro & Novais, 2009;Karimi & Liu, 2005;Mendez, Henning, & Cerda, 2000;Xue & Sun, 2010).Novara, Novas, & Henning (2016) performed a review on scheduling problems of resource-constrained multiproduct multistage batch plants.They divided the methods in two groups: those that assume a single batch per order and after 2008, approaches that manage orders comprising multiple batches.Table 1 shows a summary of some continuous short-term multiproduct scheduling problems found in the literature.However, none of them is fully adaptable to the conditions previously discussed.
Among the latest proposals, Novara, Novas, & Henning (2016) and Afzalirad & Rezaeian (2016) address several features of industrial environments (e.g.forbidden productequipment assignments, sequence-dependent changeover tasks, dissimilar parallel units at each stage, etc.).The first ones proposed a constraint programming model for multiproduct multi-stage batch scheduling problems.They handled multiple-batch orders by defining a campaign operating mode, which is common in practice but can produce suboptimal solutions, since a campaign mode consists of scheduling a predefined number (or range) of batches of the same product.Afzalirad & Rezaeian (2016) formulated a discrete model, proposed two metaheuristic algorithms to solve it, and validated them with 14 randomly generated examples.Recently, Hinder & Mason (2017) exploited known order-based properties of optimal solutions for simpler single stage, family setup times and a single machine scheduling problem.In this case, large scale instances are generated and solved up to 1 080 jobs and 270 families.

Problem description
The problem can be classified according to Mendez et al. (2006) as shown in

Inventory Storage Policy
Finite final storage

Demand patterns
Due dates: single or multiple.Horizon: variable

Costs
Equipment, material, exchanges

Degree of certainty Deterministic
Source: Authors The conditions and assumptions considered in this problem are: (a) Demand, capacity, processing times, units suitable for each product, inventory limits (minimum and maximum), and due dates for the time horizon are known and fixed; (b) raw material, units and other resources are always available; (c) There are no interruptions, unplanned unit breakdowns or reprocessing; (d) the parallel units are not identical, work at full load and can process at most one batch at a time; (e) setup times and costs depend on the degree of compatibility between two consecutive products; (f) a product can be processed in more than one unit, but at most once in each unit during the time horizon; (g) an order can be split in multiple batches according to the intermediate due dates; (h) the time horizon for each unit is independent and is a subset of the general planning horizon; and since the units constitute a very restricted resource, even the time horizon could be violated (and thus penalized); (i) given the short-term horizon, the programming of the first product in each unit considers its compatibility with the last product programmed in that unit during the previous horizon; (j) preventive maintenance operations are translated into maintenance demands and then they are considered as products with their own times and preparation goals.
The main assumption considered is that the problem can be simplified to a single stage process, focusing on the bottleneck process scheduling, in which transfer times are not relevant, and neither storage transfer policies are.
The basic decisions to be taken are the sequence of products in each unit, the lot size, which is the number of consecutive batches of a product in the same unit, and the follow-up of the start (continuous) time of each lot.Other decision variables control violations of various operational considerations.

Mathematical model
The proposed model uses a continuous time representation with network flow equations (for products and units), where both the lot size and the schedule are defined simultaneously.An event occurs at a global time point, considering immediate precedence, with an objective function of maximizing profits with penalties related to non-fulfillment of demands, due dates, inventories, and costs.The model is based on the longest path problem, with many side constraints, through a multilevel network, in which each route represents the schedule of one unit.Each path has a specific starting node, but all paths terminate at the same sink node.A node at any level represents the processing event of a product, which keeps track of sequence information with a binary variable, batch size with an integer variable, and initial processing time with a continuous variable.Finally, sequence, demand constraints and time-related constraints are formulated.The tracking of the last product processed in a unit during the previous planning horizon allows taking it as input data for the following period, to determine the compatibility of the first product.
By default, the due date for each product is set at the end of the scheduling horizon.When a product has more than one due date (i.e.partial deliveries with distinct due dates), then that product is divided into R + 1 products -the original plus R pseudo-products-each with its specific due date and demand, which is called "partial demand".Thus, the sum of the production of these R + 1 products is the total demand of the original product.IR ⊆ I .If a product i ∈ IQ has delivery dates prior to the planning horizon, the product is decomposed into pseudo-products each with its own demand and delivery date.The demand for pseudo-products is less than or equal to the demand for the product from which it is decomposed.

Sets
Uncovered demand of product i ∈ IQ (to reach re- order point) bpar i Uncovered demand of pseudo-product i ∈ IR bm i Uncovered demand of product i ∈ IQ (to reach mi- nimum inventory level) Production excess of product i ∈ IQ (i.e. with res- pect to the reorder point).
smx i Production excess of product i ∈ IQ (i.e. with res- pect to the maximum inventory level).late i Tardiness of product i ∈ IQ (i.e. with respect to the due date) zu Objective function value.

Parameters d i
Production demand of product i ∈ IQ (to reach re- order point) dm i Production demand of product i ∈ IQ (to reach mi- nimum inventory level) dmx i Production demand of product i ∈ IQ (to reach maximum inventory levels) Processing time of product i in unit k.
w i,j Number of washing procedures required in a sequence i -j.
DD i due date for product i ∈ IR spr i Sale price of product i pr i Product priority i.
QR ij QR i,j = 1 if pseudo-product i ∈ IR has the same due date as the product i ∈ IQ from which it was de- composed; QR i,j = 0 otherwise.RR i,j RR i,j = 1 if due date of seudo-product i ∈ IR is ear- lier than that of product j ∈ IR .Both i, j are pseu- do-products from the same product i ∈ IQ .RR i,j = 0 otherwise.

M k
Scheduling horizon for the unit k. mks Maximum allowed violation of the programming horizon.

MIP Model
max zu =

DÍAZ-RAMÍREZ, AND HUERTAS
X ijk ∈ {0,1} ∀i, j,k The objective function in Equation ( 1) is a profit maximization penalized by the violation of some of the operating restrictions.The first term on the right-hand side calculates the income generated by the total quantity produced minus the surplus with respect to the demand.The second term calculates the cost of production, including the costs of preparation, and finally, the third term is given by Equation ( 2).This equation penalizes (a) the inclusion of washing procedures, (b) late production, (c) production outside inventory limits, (d) partial deliveries not satisfied, and (e) differences from reorder points.
Equations ( 9) to (13) deal with the demand.Equation (9) computes the amount of production scheduled and the differences from the demand to the reorder point.Equation (10) computes deviations from partial deliveries, and Equations ( 11) and ( 12) deviations from minimum and maximum inventory levels.Equation ( 13) limits the maintenance batch size to 1.
Related to time, Equation ( 14) computes violation on due dates, equations ( 15) and ( 16) ensure that the schedule of a given unit k begins at its own horizon time, and equation ( 17) ensures the time ordering between pseudo-products.Finally, Equations ( 18) to (20) give the variables' domain.

Numerical Experimentation
The proposed model was verified and validated with a set of instances generated from real historical information from a chemical company in Mexico.Figure 2 shows the experimentation process.

Pre-processing
The following trivial situations were identified so that variable levels were fixed before running the model, reducing the problem size: a) All X iik = 0 ; b) X ijk = 0 if products i and j are incompatible; c) X ijk = 0 if j is the first product in the sequence of k; d) X 'last' jk = 0 ; e) X ijk = 0 if r ij = 0 or r jk = 0 .

Model validation
To validate the model, input parameters from a Mexican chemical company were used, corresponding to a typical production month, in which 30 products were produced, with 6 units enabled for production and no programmed partial deliveries.The horizon used was one month.
Overall results are summarized in Table 3. Costs and profits are compared to the baseline (actual values of real case) in a scale of 100.Source: Authors

Random generated Instances
Goodness of fit tests were applied to historical 9-month data to describe product demand.In particular, the probability of a product being demanded in a month (i.e. the programming horizon used) and the mean and standard deviation of demand for each product were identified.
Using the Monte Carlo technique, 155 instances were generated with a set of products no greater than 30, as shown in Table 4; some of them with a maximum of two partial deliveries (with distinct due dates) and with 4 units enabled.

Results and discussion
The model was run with a three-objective function: a) only the time component of equation ( 1); b) only the cost component of Equation ( 1), -in these case, to be minimized-, and c) the complete Equation (1).The results obtained from the 155 generated instances are presented in Table 5.Additionally, the option of relaxing constraints (11) and ( 12) related to the minimum and maximum production levels was considered (i.e."without bounds" in Table 5).

Source: Authors
From Table 5, it can be seen that the vast majority of instances were resolved in less than one minute; however in the case of minimizing time with quotas, 20 % of instances could not be resolved in half an hour.A much better performance in terms of demand compliance is also observed when considering the bounds constraints; but a better performance in terms of number of washing procedures is shown when these are not included.The negative unmet demand value refers to an average production of 1 % above the reorder point.Finally, no objective function is dominant in terms of performance.

Conclusions
The problem of a single machine production system with sequence dependent setup times and several real world operational constraints was studied.
A comparative performance study between the mathematical model and real data from a chemical company was carried out, obtaining the following results with the proposed model: a reduction of 2 % in the processing time of the product, a 12 % reduction in the total cost of production and an increase of 19 % in the estimated profit.The optimization model allows the integration of the decision about the order of the products to be processed in the different production machines, the number of batches to produce each item, the time each product will start to be processed and other decisions that seek to quantify non-compliance with respect to demand and due dates.Finally, through Monte Carlo simulation, instances were generated to validate the model, obtaining solutions in short computational times in a desk computer (i.e.half an hour) for sizes similar to those of the industry.

Figure 1 .
Figure 1.Illustration of the chemical flow process.Source: Authors

Figure 2 .
Figure 2. Experimentation process scheme.Source: AuthorsThrough an interface in Excel®, the user feeds the model and calls the solver.Then, the output is translated again through the interface into an Excel output file.The model was coded in GAMS® software with the CPLEX® solver version 22.6 and run on a computer with 1.99 GB of RAM, with an Intel Xeon (R) CPU 5150 at a speed of 2.66 GHz, working under the windows operating system XP.

Table 2
Allahverdi et al. (2008)erdi et al. (2008), as an R | ST sd,b | TSC, where R refers to unrelated machines, ST sd,b refers to preparation times dependent on the batch sequence or family of products, and TSC refers to the performance focused on minimizing preparation or change time.Although in this case, it is measured with a composite objective function including delays, due dates, and inventory policies.

Table 2 .
Problem Classification

k
Processing variable unit cost of product i in unit k.

Table 3 .
Results of the model vs baseline

Table 4 .
Generated instances description

Table 5 .
Numerical experimentation results