Incorporating Enhanced Decision-Making Capabilities into a ... - MDPI

2 downloads 942 Views 2MB Size Report
Sep 2, 2016 - input and output symbols on subtask STORE). ..... The simulation runs were made on an HP 15 TouchSmart laptop, IntelCore [email protected] ...
processes Article

Incorporating Enhanced Decision-Making Capabilities into a Hybrid Simulator for Scheduling of Batch Processes Girish Joglekar Batch Process Technologies, Inc., 112 Eden Court, West Lafayette, IN 47906, USA; [email protected]; Tel.: +1-765-404-0065 Academic Editor: Michael Henson Received: 18 May 2016; Accepted: 30 August 2016; Published: 2 September 2016

Abstract: A simulation model can accurately capture the details of product recipes in a batch process. By incorporating enhanced capabilities for making key assignment decisions in the simulation executive a model can mimic the experiential knowledge and rules employed in operating a process. As the process complexity and problem size increase using the mathematical programming (MP) techniques to generate schedules becomes increasingly difficult. A simulation run typically takes very little computation time and generates a schedule that is verifiable. Moreover, the model can be used to explore a wide range of parametric space to evaluate alternate policies and the impact of process uncertainties. Although there is no guarantee of optimality, the quality of schedules thus generated is very good and can be deployed in operations. In this paper the decision-making capabilities of the BATCHES simulator are presented with its application to a set of scheduling problems reported extensively in the literature. The results show that ‘smart’ simulation can be used effectively for a large set of scheduling problems. Keywords: hybrid simulation; scheduling; heuristics; batch processes; recipe modeling

1. Introduction A schedule predicts the start and end times, and in some cases the batch size, of each task processed on each piece of equipment in a process for the specified performance measures used in creating that schedule. Often the actual start and end times do not match exactly with the predicted values because of process uncertainties. Typically, a schedule is used as a guide by plant operations personnel who adhere to the sequence of tasks. If the process starts deviating from the predicted schedule, at some point it becomes necessary to generate a new schedule or to undertake an ad hoc adjustment. Scheduling is critical in improving the productivity of multiproduct and multipurpose batch processes. Over the past 30 years, the scheduling problem has been studied extensively in academia and industry, and across a range of industry sectors such as discrete manufacturing and process industries [1–3]. A significant portion of the past work uses mixed integer programming (MIP) for solving the scheduling problem using discrete-time or continuous-time formulation. Although the MIP-based methods guarantee optimality, often the underlying process is simplified so that the problem can be solved in a reasonable amount of time. Some of the inherent complexities simply cannot be handled, such as uncertainties in parameters, while some simplifications are necessary in order to control the problem size, such as the granularity of the discrete time. Additionally, the scheduling applications can be broadly divided into two categories, off-line or real-time. Typically, in off-line applications the time available to find a solution can be fairly large, of the order of several hours or days. The real-time scheduling problems often arise due to the need to modify or reschedule a previously-generated schedule in order to compensate for the deviations in the

Processes 2016, 4, 30; doi:10.3390/pr4030030

www.mdpi.com/journal/processes

Processes 2016, 4, 30

2 of 16

actual process trajectory. The time available for solving the real-time, rescheduling problems is often very limited, of the order of an hour or less. In such cases, mathematical programming (MP)-based formulations may not be able to provide timely solutions. The limitations of mathematical programming techniques in handling complexities and providing timely solutions provide an opportunity to apply other techniques, such as simulation-based methodologies. Simulation has been used extensively in designing batch processes [4,5]. However, simulation has not been extensively used in addressing scheduling problems, mainly because of the inherently myopic view that this technique takes in making assignment decisions. Thus, at any point in time when a simulator has to decide whether to assign a particular piece of equipment to perform a particular task, it has knowledge only of the current state of the process and has no mechanism to evaluate a priori the impact of the decision on a global performance measure, such as an objective function. Such a mechanism would provide the criteria for making or not making a certain decision which, in turn, would affect the schedule. Simulation, coupled with heuristics, has been applied to discrete systems. However, in general the characteristics of batch processes are very complex compared to discrete systems. The complexities preclude the use of discrete event simulation based systems in applications related to batch processes. A simulation-based framework applied to batch processes, as reported by Chu et al. [6,7], augments the underlying MP-based formulations, and has similar limitations as stated earlier. The following are some of the commercially available simulators for batch processes: Batch Process Developer [8], suite of products by Intelligen, Inc. [9], gPROMS [10], and BATCHES [11]. DynoChem [12] is designed for simulating single unit operations used in batch processes. None of these simulators, other than BATCHES, has the ability to dynamically assign a task to a piece of equipment, a key functionality required for solving scheduling problem. The BATCHES simulator [12,13] will be used for solving the scheduling problems discussed in this paper. One of the key steps in the formulation of scheduling problems for batch processes is the modeling of the underlying recipes. The state-task network (STN) [14] or a more generalized resource-task network (RTN) [15] is often used by the MP-based frameworks to model recipes. BATCHES provides modeling constructs that are similar to ANSI/ISA-88 standards [16] to model recipes of various products. These constructs, discussed later, allow very detailed recipe specifications to be incorporated into a model. In addition, the simulator uses a combined discrete and dynamic simulation executive which was developed specifically to meet the special needs of multiproduct and multipurpose batch processes. New capabilities to facilitate improved assignment decisions have been added to the simulator with the view of addressing scheduling problems. In this paper we demonstrate the use of the simulation methodology of BATCHES to solve a set of five scheduling problems which has been studied extensively in the literature. Some of the problems have been modified to suit the limitations of the simulation technique. As we observed for this limited set of problems the simulation method provides very good, sometimes identical results, within a small fraction of computation time. The objective of the paper is not to use simulation for each formulation discussed in the literature, but merely to demonstrate that simulation is a viable technique for solving scheduling problems. Therefore, a set of five representative problems was selected from the literature to illustrate specific capabilities of the BATCHES simulator. The details of the MP formulations and descriptions of underlying process for these examples are available in the paper by Susarla et al. [17]. In the first two sections, the key differences in building process models and the approach to solving scheduling problem using the simulation and mathematical programming techniques are discussed. The subsequent sections compare the results for the five examples from the literature. In the description, the word “simulator” implies the BATCHES simulator. 2. Process Modeling The mathematical programming formulations of the problems considered in this paper use state-task networks to model the process recipes. As an example, the STN for the recipe used in

Processes 2016, 4, 30

3 of 16

Processes 2016, 4, 30

3 of 16

Example 1 (discussed later) is shown in Figure 1. In general, a STN consists of tasks with material Example (discussed and later)downstream is shown in Figure 1. In general, STN consists with material and storage states1 upstream of each task. Theatasks model of thetasks transformations storage states upstream and downstream of each task. The tasks model the transformations and and account for the processing times. Most of the times the transfer of material between a storage state account for the processing times. Most of the times the transfer of material between a storage state task is assumed to be instantaneous. As shown in Figure 1, a batch of task I1 is split in half and goes to and task is assumed to be instantaneous. As shown in Figure 1, a batch of task I1 is split in half and states S2 and S3, while materials from states S4 and S5 are mixed in equal proportions to make a batch goes to states S2 and S3, while materials from states S4 and S5 are mixed in equal proportions to of task I4. A dedicated of equipment task. In thetask. MPInformulations make a batch of taskpiece I4. A dedicated piece is ofavailable equipmenttoisperform available each to perform each the MP storage states are influenced by a storage policy associated with each state. The policies typically formulations storage states are influenced by a storage policy associated with each state. The policies used are unlimited intermediate storage (UIS), limited intermediate storage (LIS), no storage intermediate storage typically used are unlimited intermediate storage (UIS), limited intermediate (LIS), no (NIS), limited unlimited wait(LW), (UW), and limited wait (LW), and zero (ZW). ForLIS the UIS (NIS),intermediate unlimited storage wait (UW), wait zero wait (ZW). For wait the UIS and policies, and LIS policies, a physical unit(s) is(are) available thethe process, while forZW the policies UW, LW,the and ZW a physical unit(s) is(are) available in the process, whileinfor UW, LW, and material is policies the material is typically held in the upstream equipment until it can be emptied downstream typically held in the upstream equipment until it can be emptied downstream in a suitable unit. in a suitable unit.

S2

Task I2 Unit J2

S4 50%

50%

S1

Task I1 Unit J1

Task I4 Unit J4 50%

50%

S3

S6

Task I3 Unit J3

S5

Figure 1.1.State-task forExample Example 1 recipe. Figure State-task network network for 1 recipe.

In the simulation model, a recipe is modeled as a recipe network and the processing units are In the simulation model, a recipe is modeled as a recipe network and the processing units modeled as an equipment network. A recipe consists of tasks and each task, in turn, consists of are modeled as an equipment network. A recipe consists of tasks and each task, in turn, consists subtask(s). Each task in a STN has a corresponding task in the recipe network. In addition, for a of subtask(s). Each task in a STN has a corresponding task in the recipe network. In addition, physical storage tank, which exists when the storage policy is UIS or LIS, there is a corresponding for a task physical storage which the storage policy is UIS or LIS, is a corresponding in the recipe tank, network. Theexists recipewhen network shown in Figure 2 is used forthere modeling the STN task in the recipe network. recipestorage network shown in in Figure 2 is used for modeling theofSTN shown shown in Figure 1 withThe physical tank. A task the STN is modeled as a series three in Figure 1 with physical tank. to A task in thethe STN is modeled as a series three subtasks, subtasks, FILL, PROC,storage and EMPTY represent three separate steps duringofthe execution of a FILL, task, namely filling, processing, and emptying. If asteps batchduring is split multiple ways, there is an namely emptying PROC, and EMPTY to represent the three separate the execution of a task, filling, subtask for each split. Similarly, if materials from more than one upstream states are mixed, then the processing, and emptying. If a batch is split multiple ways, there is an emptying subtask for each subtask has corresponding of inputs. Of course, themixed, duration associated with each has split. filling Similarly, if materials from morenumber than one upstream states are then the filling subtask transfer is zero, while the duration of the PROC subtask corresponds to the task duration. The corresponding number of inputs. Of course, the duration associated with each transfer is zero, while storage task which models the UIS or LIS policy is modeled as consisting of one subtask with the duration of the PROC subtask corresponds to the task duration. The storage task which models the decoupled input and output (hollow input and output symbols on subtask STORE). Thus, tasks S2, UIS or as consisting of one subtask decoupled S3,LIS S4, policy and S5isinmodeled Figure 2 correspond to the storage stateswith S2, S3, S4, and S5input in theand STNoutput shown(hollow in inputFigure and output subtask STORE). tasks S2, material S3, S4, and S5 in Figure 2 correspond to 1. Rawsymbols materialon RM1 represents stateThus, S1, indicating is always available. Sink P1 the storage states S2, S3, S4, and S5 in the STN shown in Figure 1. Raw material RM1 represents state represents state S6, indicating that material can be emptied at any time subtask EMPTY of task I4 S1, indicating is always Sinkare P1modeled represents state S6, that material can be starts. Thematerial NIS, UW, LW, andavailable. ZW policies naturally in indicating the recipe network by not having a storage task. ForEMPTY example,ofif task thereI4isstarts. no intermediate after task I3,policies the output emptied at any time subtask The NIS, storage UW, LW, and ZW arefrom modeled the EMPTY would goby directly to the FILL subtask of I4.For However, in STN suchisstorage states naturally in the subtask recipe network not having a storage task. example, if there no intermediate are after artefacts thethe associated Thus, a subtask recipe network theto actual process recipe of I4. storage taskofI3, output framework. from the EMPTY wouldrepresents go directly the FILL subtask more accurately. However, in STN such storage states are artefacts of the associated framework. Thus, a recipe network represents the actual process recipe more accurately.

Processes 2016, 4, 30 Processes 2016, 4, 30 Processes 2016, 4, 30

4 of 16 4 of 16 4 of 16

Figure 2. 2. Recipe Recipe network network for Figure for Example Example 1. 1. Figure 2. Recipe network for Example 1.

The equipment network for Example 1 is shown in Figure 3. In this example, for each storage The equipment network for Example 1 is shown in Figure 3. In this example, for each storage stateThe andequipment ‘process’ task of thefor STN, there is1 one piece of the example, equipment The network Example is shown in equipment Figure 3. Ininthis fornetwork. each storage state and ‘process’ task of the STN, there is one piece of equipment in the equipment network. equipment parameters such volume specified in equipment the equipment In addition state and ‘process’ task of the as STN, thereare is one piece of in thenetwork. equipment network.any The The equipment parameters such as volume are specified in the equipment network. In addition any connectivity constraints are also shown graphically in the equipment network. When there are no equipment parameters such as volume are specified in the equipment network. In addition any connectivity constraints are also shown graphically in the equipment network. When there are no connectivityconstraints constraints,are thealso equipment is merely set of iconsnetwork. representing unitsare in no a connectivity shown network graphically in the aequipment Whenthe there connectivity constraints, the equipment network is merely a set of icons representing the units in given process, for example, the equipment network in Figure 3. For each task in a recipe network connectivity constraints, the equipment network is merely a set of icons representing the units in a athere givenisprocess, for example, the equipment network in Figure 3. For each task in a recipe network at leastfor one unit suitable to performnetwork that task.inInFigure multipurpose processes, or network a set of given process, example, the equipment 3. For each task in aa unit recipe there is at least one unit suitable to perform that task. In multipurpose processes, a unit or a set of parallel usedsuitable for performing multiple tasks. such cases, the tasks thata are there is atunits leastcan onebeunit to perform that task. InInmultipurpose processes, unitperformed or a set of parallel units can be used for performing multiple In such cases, the tasks that are performed on on those units have same of suitable units.tasks. parallel units can be the used for list performing multiple tasks. In such cases, the tasks that are performed those The unitsGUI have the same list of suitable units. of thethe simulator is used for building on those units have same list of suitable units. the equipment and recipe networks. The GUI of the simulator is used for building the equipment and recipe networks. The GUI of the simulator is used for building the equipment and recipe networks.

Figure 3. Equipment network for Example 1.

Figure 3. Equipment network for Example 1. 2.1. Making a Simulation Run Figure 3. Equipment network for Example 1.

A taska in a recipe can 2.1. Making Simulation Runeither be an independent task or a dependent task. If an input to a task pulls upstream material, such as from a raw material or a storage state, then it is an independent task. A task in a recipe recipe can can either either be be an an independent independent task or a dependent dependent task. If an input to a task An input that pulls material is displayed as a solid triangle in the recipe network. If an upstream pulls upstream material, such as from a raw material or a storage state, it is an independent task. upstream fromthe a raw material or aisstorage state, then then independent task. output pushes material, material such into aastask, receiving task a dependent task.itAn input that accepts An input that pulls material is displayed as aa solid triangle in the recipe network. If an upstream that pulls material is displayed as solid triangle in the recipe network. pushed material is displayed as a hollow triangle in the recipe network. output pushes material into a task, thethe receiving task is a dependent task. An input that accepts pushed output material into a task, receiving a dependent task. An input Inpushes simulation, processing directives are usedtask for is initiating independent tasks. Asthat the accepts name material is displayed as a hollow triangle in the recipe network. pushed material is displayed as a hollow triangle in the recipe network. suggests, the processing directives broadly define how much material should be produced or how In simulation, processing directives are used independent tasks. the name used for for initiating initiating independent tasks. As in many batches of independent tasks should be initiated. For example, for the recipe shown Figure suggests, the processing directives how much material produced how suggests, the processing directives broadly define how much material should be produced or that how 2 the simplest processing directive would be “Make n batches of task I1 of recipe REC01”. Note many batches of independent tasks should be initiated. For example, for the recipe shown in Figure 2 many tasks should be initiated. theupstream recipe shown in tasks. Figure I2, I3,batches and I4 of areindependent also independent tasks because they For pullexample, material for from storage the simplest processing directive would be nnbatches ofoftasks. task of REC01”. Note 2Thus, the simplest processing directive would be“Make “Make batches taskI1 I1 ofrecipe recipe REC01”. Note that that processing directives must be specified for initiating those Four processing directives for I2, I3, and I4 are also independent tasks because they pull material from upstream storage tasks. I2, I3, and I4 are also independent tasks because they pull material from upstream storage tasks. starting the four tasks are shown in Figure 4. Each directive (yellow box) has the time at which it Thus, directives must specified for those Four processing processing directives for Thus, processing directives must be beact specified for initiating initiating those tasks. Four for starts,processing and individual directives in parallel. An entry in atasks. processing directive directives (white box) starting the four tasks are shown in Figure 4. Each directive (yellow box) has the time at which it starts, starting the four tasks are shown in Figure 4. Each directive (yellow box) has the time at which identifies the task to be initiated and the number of batches to be produced of that task. As shown init and directives act of in I1, parallel. in directive box) identifies the starts, and individual act in An parallel. Ana processing entry in abatches processing directive (white box) the individual example, one batchdirectives each I2, and I4 entry is initiated, and four of (white I3 are initiated. A task is identifies the task to be initiated and the number of batches to be produced of that task. As shown in the example, one batch each of I1, I2, and I4 is initiated, and four batches of I3 are initiated. A task is

Processes 2016, 4, 30

5 of 16

task to be initiated and the number of batches to be produced of that task. As shown in the example, Processes 2016, 4, 30 5 of 16 one batch each of I1, I2, and I4 is initiated, and four batches of I3 are initiated. A task is assigned to a unit onlytoif ait unit is available given time specified material is available assigned only if itat is aavailable at a and giventhe time and the amount specifiedof amount of material is in availableunit. in an upstream unit. an upstream

Figure Processing directives directives for 1. 1. Figure 4.4.Processing forExample Example

As the simulation marches in time, the assignments of units to the independent tasks are made

As the simulation marches in time, the assignments of units to the independent tasks are made through the processing directives. The assignments to dependent tasks are made through queues of through the processing directives. The assignments to dependent tasks are amade requests created by upstream subtasks pushing material downstream. Once task isthrough assignedqueues to a of requests by upstream subtasks unit,created its execution is governed by thepushing specifiedmaterial recipe. downstream. Once a task is assigned to a unit, its execution governed the specified The iskey results by generated duringrecipe. a simulation run are the material balance, equipment utilization and the Gantt chart. Of course, a Gantt chart is the by equipment the simulator. The key results generated during a simulation run are theschedule materialcreated balance, utilization One of the input parameters for a simulation run is the end of simulation time. If the simulation and the Gantt chart. Of course, a Gantt chart is the schedule created by the simulator. end time is too large, all the required number of batches are completed before thetime. end time, the One of the input parameters for a simulation run is the end of simulation If theand simulation result of interest is the makespan, that is, the time required to process the specified batches. If the end time is too large, all the required number of batches are completed before the end time, and the end time is the intended scheduling time horizon, for example, one day, then the result of interest is result of interest is the makespan, that is, the time required to process the specified batches. If the end the amount produced in the specified time. time is the intended scheduling time horizon, for example, one day, then the result of interest is the amount in the specified time. 2.2. produced Quality of Schedule Typically, for scheduling applications the desired time horizon is specified for a simulation run, 2.2. Quality of Schedule such as one day or one week. If the selling price, in $/kg, for each of the useful product streams, and

Typically, scheduling the desired time horizon specifiedcomputes for a simulation processing for cost, in $/kg, forapplications each of the waste streams is provided, theissimulator the total run, such revenues as one day one In week. If theifselling price, infor $/kg, forresources each of the product streams, foror a run. addition, the usage costs all the are useful provided, such as $/h for and each equipment, operator, andofutility and $/kg for each raw material, then the computes simulator also processing cost, in $/kg, for each the waste streams is provided, the simulator the total computes the total profit for a run. Furthermore, by using activity based costing the simulator revenues for a run. In addition, if the usage costs for all the resources are provided, such as $/h for each calculates profit/kg each and product. total profit for a then simulation run becomes the key the equipment, operator, andfor utility $/kg Thus, for each raw material, the simulator also computes performance measure to evaluate the quality of schedule it generates. In the absence of costing data total profit for a run. Furthermore, by using activity based costing the simulator calculates profit/kg for total amount of useful products and waste streams produced are used to evaluate the schedule each product. Thus, total profit for a simulation run becomes the key performance measure to evaluate quality. Often, the optimization formulations use profit as the objective function. the qualityAof schedule it generates. Inof the absence is ofthe costing data of total amounttypically of useful products and good measure of the quality a schedule utilization resources, equipment. wasteIfstreams produced are used to evaluate the schedule quality. Often, the optimization formulations a stage in a process is utilized close to 100% then most likely there is no slack available in the use profit as the function. process, andobjective the amount produced would be the maximum possible from the process. The only way to good get more production be of byamaking modifications to the process, such astypically modifying cycle A measure of thewould quality schedule is the utilization of resources, equipment. times or adding/deleting equipment. Of course, making process modifications is beyond the scope If a stage in a process is utilized close to 100% then most likely there is no slack available ofin the scheduling Often a Gantt a good visual possible confirmation reaching peak way process, and theproblems. amount produced wouldgives be the maximum fromof theunits process. The only utilization. The simulator also generates percent utilization for each unit, which can be used as acycle to get more production would be by making modifications to the process, such as modifying quantitative measure of the quality of schedule. times or adding/deleting equipment. Of course, making process modifications is beyond the scope of Since optimization using simulation is an iterative process, with no guarantee of global scheduling problems. Often a Gantt gives a good visual confirmation of units reaching peak utilization. optimum, the number of ‘what ifs’ could skyrocket depending on the parametric space to be The simulator also generates percent utilization forineach unit, beOften used the as auser quantitative explored. Experiential knowledge becomes crucial limiting thewhich searchcan space. has a measure the quality of typical schedule. goodofidea about the sequences in which to make products, or the number of batches to Since using simulation is amount an iterative no on. guarantee of global optimum, initiateoptimization in order to produce the desired of a process, product, with and so Thus, within a limited number of of ‘what runs aifs’ good quality schedule can be obtained. The greatestspace advantage of a the number could skyrocket depending on the parametric to be explored. simulation-based approach is that the underlying process can be very accurately Experiential knowledge becomes crucial in limiting the search space. Often modeled, the user thereby has a good the schedule produced will be very accurate reliable, though idea about the typical sequences in which to and make products, or not thenecessarily number ofoptimal. batches to initiate in In this paper, we have used simulation in scheduling processes for which an optimum solution order to produce the desired amount of a product, and so on. Thus, within a limited number of runs has already been generated. Therefore, the quality of the simulated schedule can be easily a good quality schedule can be obtained. The greatest advantage of a simulation-based approach is that the underlying process can be very accurately modeled, thereby the schedule produced will be very accurate and reliable, though not necessarily optimal.

Processes 2016, 4, 30

6 of 16

In this paper, we have used simulation in scheduling processes for which an optimum solution has already been generated. Therefore, the quality of the simulated schedule can be easily determined by comparing it to the optimum solution. Additionally, the corresponding Gantt chart shows, visually, the quality of the simulation generated schedule. 3. Limitations of Simulation-Based Scheduling In the MILP formulations batch size is often a decision variable with defined upper and lower bounds. It is often coupled with a linear processing time dependency, for example: Processing time = α + β·M where M is the batch size and α and β are constants. This means that for each batch the amount produced, as well as duration, can be changed. Changing batch size for each batch is not impossible, but tedious to achieve in a simulation run. Typically, the size of each batch is determined by the recipe specifications. However, through processing directives it is possible to specify the size of a batch, overriding the recipe. This is equivalent to specifying the start time and batch size for each batch initiated through processing directives. This amounts to specifying the schedule and using the simulator to test if it will work. In typical scheduling applications, the simulator should generate the start time (the schedule) for each batch on each piece of equipment based on the recipe specifications. For the linear processing time dependency the average throughput of a unit or a stage, given by M/(α + β·M), is maximum when M is maximum, or at the upper bound. Thus, by producing batches of sizes smaller than the maximum possible size, the throughput of a stage or the process itself could be reduced. This is typically justifiable only to exploit short-term scheduling. During simulation, unless modified through processing directives, the batch sizes can be computed to fully occupy the available unit. Therefore, if the units suitable for a task have different sizes, the amount of material and the cycle times for that task in each unit would be different. Therefore, simulation should be used with caution for short-term scheduling and the possibility of changing the batch sizes should also be considered. During plant operation, changing the size of each batch is difficult to implement due to practical considerations. Normally, the operating recipes, particularly batch size, are not altered on the fly because that could potentially affect numerous operating parameters and may result in previously unknown trajectories and deviations, and some time in failed batches. For simple tasks, such as mixing, it may be feasible to change batch sizes on the fly without significantly affecting the overall process. 4. Enhanced Decision-Making Capabilities of the Simulator The simulator uses the combined discrete and dynamic methodology to march in time. The trajectory of a process is marked by points in time at which the state of the process changes instantaneously, called discontinuities. Between discontinuities the simulator solves the set of differential/algebraic equations associated with the process dynamics models that best describes the physical/chemical change taking place in the subtasks of all active units. A state variable associated with a dynamics model can be used to define a state event condition. A state event is triggered when a certain variable crosses a specified threshold in a particular direction. The time of occurrence of a state event is not known a priori. For the other type of events, called time events, the time of occurrence is known a priori. At each discontinuity, marked by one or multiple events occurring at that time, the simulation executive scans through all processing directives currently active to decide whether any idle unit can be assigned to perform specified tasks. Note that a sequence of tasks to be initiated is specified in a directive, and each task, in turn, has a list of suitable units. The following functionalities are available in the simulator to solve scheduling problems presented in this paper: equipment assignment logic option, size-dependent material requirements, and queue priorities. These functionalities are discussed in the following sections.

Processes 2016, 4, 30

7 of 16

4.1. Equipment Assignment Logic Option By default the assignment of equipment to a task is made strictly based on the availability of a piece of equipment. Such an assignment logic is very myopic and greedy. Once a unit is assigned to a task it is released only after the assigned task is completed. Thus, if material is not available for the assigned task, the unit must wait until the material becomes available. Moreover, when it is assigned to a task, the unit cannot be assigned to any other task. An alternative assignment logic option is available, which if specified, requires the executive to perform additional checks prior to assigning equipment to a task. This option stipulates that a piece of equipment should be assigned only if it is available and sufficient material is available upstream to fulfil the material requirement specifications for all inputs to the filling subtask. This option plays an important role when parallel units have different sizes and when multiple tasks are competing for the same set of units. For example, suppose unit A1 needs 100 kg and a parallel unit A2 needs 75 kg to fill. If both A1 and A2 are idle at a given time, but only 75 kg is available upstream, then the simulator will assign unit A2 if the new logic is specified in the recipe model. Using the default logic it would assign unit A1 and wait until the additional 25 kg becomes available upstream. 4.2. Size Dependent Material Requirement For a subtask that pulls upstream material the simulator provides a range of options to determine how much material to pull, for example, specified mass or a specified fraction (1 means entire upstream batch). To accommodate the possibility that the downstream equipment items could be of different size and as a consequence the material required may depend of the equipment assigned to the task, an additional option for material specification is available. This option, if selected, directs the simulation executive to compute the mass required based on equipment volume and material density. As explained above, the new material specification coupled with the new assignment logic option can result in improved assignment decisions. 4.3. Queue Priorities In the simplest case, the requests for assigning a unit to a task generated through processing directives are kept as an ordered list in a queue using the first-in-first-out (FIFO) rule. The FIFO rule can be improved through the specification of priority, a positive integer, associated with a processing directive entry. The primary queuing criterion is based on the priorities, and within the same priority the FIFO rule is used. Thus, the higher the priority, the closer to the top of the queue the associated request is placed. At each discontinuity, the simulation executive reviews the entries in each queue, beginning with the top entry, to determine whether a unit could be assigned to the task associated with each entry. Typically, a set of parallel units has one queue associated with it, and all requests for tasks which can be performed on that set reside in that queue. The priorities play a crucial role in determining the order of unit assignment, particularly when a set of parallel units is suitable for multiple tasks, typical of multipurpose processes. As a general guideline, the priority of a task which is downstream of a competing task should be higher. The rationale being that if the downstream material is not processed then it could potentially back up a process. Therefore, if material is available to perform two tasks that can be performed on a unit that is available at a given time, then it would be assigned first to the task with higher priority (the downstream task). Intuitively, the use of priorities for conflict resolution is similar to the logic that might be used in practice. 5. Scheduling Examples In this Section five processes used for testing various MP-based formulations of scheduling problems are discussed. For each process there may be several formulations based on storage policy, operating policy and so on. Collectively there are more than 30 published papers addressing the scheduling of these five processes. The intent of this paper is to illustrate the use of simulation in

Processes 2016, 4, 30

8 of 16

scheduling these processes. Therefore, the results for only one sample case for each process are Processes 2016, 30 ease of comparison, we have chosen those cases for which Gantt charts have8 been of 16 presented. For4, the shown in the paper by Susarla et al. [17]. The headings in this section match with the section headings in the paper by Susarla al. [17]. thispaper section section inshown the reference. References to otheretworks areThe also headings available in in the by match Susarlawith et al.the [17]. headings in the reference. References to other works are also available in the paper by Susarla al. To save space, only the recipe diagrams of the processes are given in various figures. The et STNs are[17]. given in the Susarla paper [17]. The task and storage states in an STN have tasks with same names To save space, only the recipe diagrams of the processes are given in various figures. The STNs in the recipe network. Additionally, in all examples default equipment networks are used, that is, are given in the Susarla paper [17]. The task and storage states in an STN have tasks with same one icon for each unit and no connectivity constraints. The figures of equipment network are not given names in the recipe network. Additionally, in all examples default equipment networks are used, in the paper. The UIS storage policy is used in the simulation. that is, one icon for each unit and no connectivity constraints. The figures of equipment network are The simulation runs were made on an HP 15 TouchSmart laptop, IntelCore [email protected] GHz not given in the paper. The UIS storage policy is used in the simulation. processor, running the Ubuntu 12.04 64-bit operating system. The simulation runs were made on an HP 15 TouchSmart laptop, IntelCore [email protected] GHz processor, the Ubuntu 12.04 64-bit operating system. 5.1. Example running 1 STN 1and recipe network for this example are shown in Figures 1 and 2. The key process 5.1.The Example parameters are given in Table 1. A batch of task I1 is split in half and sent to the storage states. The STN and recipe network for this example are shown in Figures 1 and 2. The key process parameters are given in Table 1. A1. batch of taskparameters I1 is split in and sent Table Key process forhalf Example 1. to the storage states. Table 1. Key process parameters for Example 1. Task Unit α β M, kg

Task M, kg I1 UnitJ1 1.666α 0.03335 β 40 I2 2.333 I1 J1 J2 1.666 0.083350.0333520 40 I3 0.667 I2 J2 J3 2.333 0.06660.08335 5 20 I4 J4 2.667 0.00833 40 I3 J3 0.667 0.0666 5 I4 J4 2.667 0.00833 40 Processing directives were setset toto make one batch each ofoftasks Processing directives were make one batch each tasksI1,I1,I2,I2,and andI4,I4,and andfour fourbatches batchesofofI3 because each batch of I1 results in four batches of I3. All four batches of I3 and a batch of I2 I3 because each batch of I1 results in four batches of I3. All four batches of I3 and a batchare ofneeded I2 are toneeded make ato batch ofaI4. make batch of I4. AA time horizon time horizonofof10.0 10.0hhisisspecified specifiedfor forthe thesimulation simulationrun. run. InIn the specified time horizon 4040 kgkg P1P1 is is produced, which is is thethe same asas thethe amount produced by the specified time horizon produced, which same amount produced bybest the best solution using task-based Gantt chart thesimulation simulationrun runis is shown shown in the solution using MP.MP. TheThe task-based Gantt chart forforthe in Figure Figure5.5. The traces levelsininstorage storageunits unitsshow showthat thatthey theylie liewithin withinthe the specified specified bounds. bounds. The traces ofof levels The simulation run took 0.031 s (user + sys values from the Linux time command). The CPU The simulation run took 0.031 s (user + sys values from the Linux time command). The CPU times for theformulations MILP formulations this problem not reported. fortimes the MILP for thisfor problem are notare reported. The Ganttchart chartshows showsthat thatititisisnot notpossible possibleto to produce produce any any more more material The Gantt material in in the thespecified specifiedtime time horizon. Therefore, this is an optimal solution confirmed. This is also confirmed by the amount horizon. Therefore, this is an optimal solution confirmed. This is also confirmed by the amount produced simulationtotobebethe thesame sameasasthe theamount amountproduced produced by by the the optimal optimal solution. solution. produced byby simulation

Figure Figure5.5.Example Example 11 Gantt Gantt chart. chart.

given in Table 2. In this process, two recipes are manufactured, producing two products P1 and P2. Each unit in the process is suitable to perform two tasks. Table 2. Key process parameters for Example 2. Processes 2016, 4, 30

9 of 16

Recipe

Task Unit α β M, kg I1 J1 1.666 0.0778 30 I2 J2 2.333 0.0667 10 5.2. Example 2 R1 I4 J3 0.667 0.0033325 40 The recipe networks for this example are shown in Figure 6. The key process parameters are I3 J3 0.669 0.0777 30 given in Table 2. In this process, two recipes are manufactured, producing two products P1 and P2. R2 I5 J2 1.332 0.0556 30 Each unit in the process is suitable to perform two tasks. I6 J1 1.5 0.025 20

Figure Recipe network Figure 6. 6. Recipe network for for Example Example 2. 2. TableI12.and KeyI2 process parameters Example 2. The two independent tasks of recipe R1 are for parallel so they should be started as close to each other as possible. Therefore, a priority of two was assigned to the processing directives for Recipe Task Unit kg starting I1 and I2. Consequently, since I6 competes α with I1 forβunit J1,M, a priority of one was assigned I1 I6. Task J1 I4 is 1.666 0.0778 task and 30 competes with I3 for unit to the processing directive for starting a downstream I2 2.333 0.0667 R1 and one J3. Therefore, priorities of two wereJ2assigned to their respective10 processing directives so that I4 J3 0.667 0.0033325 40 I4 will get preference over I3, thereby unblocking the upstream material. Similarly, I5 is a 0.669 0.0777 30 downstream task and competes withI3I2 forJ3unit J2. Therefore priority of three was assigned to I5 so I5 J2 1.332 0.0556 30 R2 that gets preference over I2. A time horizon was specified I6 J1of 6.0 h1.5 0.025 for the 20simulation run. In the specified time horizon, 50 kg P1 and 40 kg P2 are produced, which are the same as the amounts produced by the best solution using MP. The task-based Gantt chart for the simulation run The two independent tasks I1 and I2 of recipe R1 are parallel so they should be started as close is shown in Figure 7. The best solution using MP assumes that material in storage task S5 is allowed to each other as possible. Therefore, a priority of two was assigned to the processing directives for to flow through into task I4, thereby rendering ineffective the storage constraint, or ignoring the starting I1 and I2. Consequently, since I6 competes with I1 for unit J1, a priority of one was assigned to storage tank. Thus, task I4 would start in J3 at time 3.0 h and wait in J3 until J1 finishes I1 at time 4.0 the processing directive for starting I6. Task I4 is a downstream task and competes with I3 for unit J3. Therefore, priorities of two and one were assigned to their respective processing directives so that I4 will get preference over I3, thereby unblocking the upstream material. Similarly, I5 is a downstream task and competes with I2 for unit J2. Therefore priority of three was assigned to I5 so that gets preference over I2. A time horizon of 6.0 h was specified for the simulation run. In the specified time horizon, 50 kg P1 and 40 kg P2 are produced, which are the same as the amounts produced by the best solution using MP. The task-based Gantt chart for the simulation run is shown in Figure 7. The best solution using MP assumes that material in storage task S5 is allowed to

task I2 is completed and allow material to wait in S5 until time 4.0 h. The traces of levels in storage units show that they within the specified bounds. To ignore storage, the recipe network must be modified to reflect the actual operation. The simulation run took 0.039 s (user + sys values from the Linux time command). The CPU times for the MILP formulations for this problem are not reported. Processes 2016, 4, 30 10 of 16 Processes 2016, 4, 30

10 of 16

flow through into task I4, thereby rendering ineffective the storage constraint, or ignoring the storage h. One way to accomplish this in the simulation is to treat S5 as UIS, thereby releasing J2 as soon as tank. Thus, task I4 would start in J3 at time 3.0 h and wait in J3 until J1 finishes I1 at time 4.0 h. task I2 is completed and allow material to wait in S5 until time 4.0 h. The traces of levels in storage One way to accomplish this in the simulation is to treat S5 as UIS, thereby releasing J2 as soon as task units show that they within the specified bounds. To ignore storage, the recipe network must be I2 is completed and allow material to wait in S5 until time 4.0 h. The traces of levels in storage units modified to reflect the actual operation. show that they within the specified bounds. To ignore storage, the recipe network must be modified to The simulation run took 0.039 s (user + sys values from the Linux time command). The CPU reflect the actual operation. times for the MILP formulations for this problem are not reported. Figure 7. Example 2 Gantt chart.

The Gantt chart shows that there is no slack time on both J1 and J2. Therefore, it would not be possible to produce any more material, and the schedule is optimal. This is also confirmed by the amount produced by simulation of the two products to be the same as the amount produced by the optimal solution. 5.3. Example 3 Figure is 7. Example Gantt chart. The recipe network for this example in22Figure 8. The key process parameters are given Figure 7.shown Example Gantt chart. in Table 3. Two units are suitable to perform task I1 and two to perform task I3. The two units suitable for task I1 run have different storage tank available between tasks it I1 and I2,not and The took 0.039there s sizes. (user +Asys values from the Linux time The CPU times The simulation Gantt chart shows that is no slack time onisboth J1 and J2. command). Therefore, would be another between tasks I2 and I3. for the MILP formulations for this problem arethe notschedule reported.is optimal. This is also confirmed by the possible to produce any more material, and Processing directives were specified initiate the three tasks I1,produced I2,would and I3. The Gantt chart that there notoslack time both J1 andasJ2. it not be amount produced byshows simulation of theistwo products toon be the independent same theTherefore, amount byFor the tasks I2 and I3, a unit was assigned only when the required amount becomes available in possible to produce any more material, and the schedule is optimal. This is also confirmed bythe the optimal solution. upstream intermediate storage tanks. input to I1 is fromasathe rawamount material, the batches in amount produced by simulation of theSince two the products to task be the same produced by the units J1 and J2 are initiated without delay. The batches in downstream stages are staggered because 5.3. Example 3 optimal solution. material is not always available to start them without delays. The recipe network for this example is this shown in Figure The key process parameters are8.given A time of 12.0 h was used in example. The8.Gantt chart is shown in Figure The 5.3. Example 3horizon in Table 3. Two units are suitable to perform task I1 and two to perform task I3. The two schedule generated by the simulation model is similar to the optimum schedule. However, units the The for recipe network fordifferent this example is shown in Figure The key process parameters are given in suitable task I1 have storage tank is8.available between tasks I1 and optimizer was able to adjust batchsizes. sizes, A and consequently the duration of each batch, so asI2, to and fit Table 3. Two units are suitable to perform task I1 and two to perform task I3. The two units suitable for another between and I3. complete batchestasks in theI2given time horizon. In the simulation, since the batch sizes could be adjusted, task I1 have different sizes. were A storage tank to is available between tasks I1 and I2, andI1, another between Processing directives specified initiate the three to independent I2, and I3. For the total amount produced of product P1 is 600.0 kg compared 692.665 kg intasks the optimum solution. tasks I2 and I3. tasks I2 and I3, simulation a unit wasatassigned only iswhen amount in the However, in the the end there 200.0 the kg inrequired equipment J3 andbecomes 50.0 kg inavailable S2. upstream intermediate storage tanks. Since the input to task I1 is from a raw material, the batches in units J1 and J2 are initiated without delay. The batches in downstream stages are staggered because material is not always available to start them without delays. A time horizon of 12.0 h was used in this example. The Gantt chart is shown in Figure 8. The schedule generated by the simulation model is similar to the optimum schedule. However, the optimizer was able to adjust batch sizes, and consequently the duration of each batch, so as to fit complete batches in the given time horizon. In the simulation, since the batch sizes could be adjusted, the total amount produced of product P1 is 600.0 kg compared to 692.665 kg in the optimum solution. Figure 8. network for for Example Example 3. 3. Figure 8. Recipe Recipe network However, in the simulation at the end there is 200.0 kg in equipment J3 and 50.0 kg in S2. Table 3. Key process parameters for Example 3. Task

Unit

α

β

M, kg

I1

J1 J2

1.333 1.333

0.01333 0.01333

100 150

I2

J3

1.0

0.005

200

J4 0.667 0.00445 150 I3 J5Recipe 0.667 Figure 8. network0.00445 for Example 150 3.

Processes 2016, 4, 30

11 of 16

Processing directives were specified to initiate the three independent tasks I1, I2, and I3. For tasks Processes 2016, 30 was assigned only when the required amount becomes available in the upstream 11 of 16 I2 and I3, a 4, unit intermediate storage tanks. Since the input to task I1 is from a raw material, the batches in units J1 and Table 3. Key process parameters for Example 3. J2 are initiated without delay. The batches in downstream stages are staggered because material is not always available to start them without delays. Task Unit α β M, kg A time horizon of 12.0 h was used in this1.333 example. The Gantt chart100 is shown in Figure 8. J1 0.01333 I1 by the simulation model is similar to the optimum schedule. However, The schedule generated J2 1.333 0.01333 150 the optimizer was ableI2to adjust batch sizes, and consequently the duration of each batch, so as to fit J3 1.0 0.005 200 complete batches in the given time horizon. In the simulation, since the batch sizes J4 0.667 0.00445 150 could be adjusted, I3 of product P1 is 600.0 kg compared to 692.665 kg in the optimum solution. the total amount produced J5 0.667 0.00445 150 However, in the simulation at the end there is 200.0 kg in equipment J3 and 50.0 kg in S2. The simulation run took 0.045 s (user + sys values from the Linux time command). Some of The simulation run took 0.045 s (user + sys values from the Linux time command). Some of the the MILP formulations did not converge in 10,000 CPU s while some solutions took 5403 CPU s. MILP formulations did not converge in 10,000 CPU s while some solutions took 5403 CPU s. The The appropriate logic used to assign equipment in the simulation was sufficient to schedule this process. appropriate logic used to assign equipment in the simulation was sufficient to schedule this process. The Gantt chart in Figure 9 shows that there is no slack time on both J1 and J2. Therefore, it would The Gantt chart in Figure 9 shows that there is no slack time on both J1 and J2. Therefore, it not be possible to produce any more material. would not be possible to produce any more material.

Figure 9. 9. Example Example 33 Gantt Gantt chart. chart. Figure

5.4. Example Example 44 5.4. The recipe recipenetwork networkfor forthis this example is shown in Figure 10. key Theprocess key process parameters are The example is shown in Figure 10. The parameters are given given 4. Two reactors, RR1 are andsuitable RR2, are suitable tasks to perform R1,The R2,reactors and R3.areThe in Tablein4.Table Two reactors, RR1 and RR2, to perform R1, R2, tasks and R3. of reactors are of different size. Processes 2016, 4, 30 12 of 16 different size. Table 4. Key process parameters for Example 4.

Task H R1 R2 R3 S

Unit H RR1 RR2 RR1

α 0.667 1.334 1.334 1.334

β 0.00667 0.02664 0.01665 0.02664

M, kg 100 50 80 50

Input from (%)

Output to (%)

S2: 50.0 S3: 50.0 HOTA: 40.0

INTAB: 60.0

RR2

1.334

0.01665

80

INTBC: 60.0

P1: 40.0

RR1

0.667

0.01332

50

S3: 20.0

RR2

0.667

0.00833

80

INTAB: 80.0

SR

1.3342

0.00666

200

INTBC: 10.0 P2: 90.0

Figure 10. 10. Recipe Recipe network network for Figure for Example Example 4. 4.

Two finished products are produced in this process, P1 and P2, which is lower quality P1. In addition to being multipurpose, there is recycling of the one of the streams from the last separation task S. Processing directives were specified to initiate tasks R1, R2, R3, H and S. In addition, the priority of three was assigned for task R3, two for R2, and one for R1. A reactor was assigned to R2

Processes 2016, 4, 30

12 of 16

Processes 2016, 4, 30

12 of 16

Table 4. Key process parameters for Example 4. Task

Unit

α

β

M, kg

Input from (%)

H

H

0.667

0.00667

100

R1

RR1 RR2

1.334 1.334

0.02664 0.01665

50 80

S2: 50.0 S3: 50.0

R2

RR1 RR2

1.334 1.334

0.02664 0.01665

50 80

HOTA: 40.0 INTBC: 60.0

R3

RR1 RR2

0.667 0.667

0.01332 0.00833

50 80

S3: 20.0 INTAB: 80.0

S

SR

1.3342 0.00666 200 Figure 10. Recipe network for Example 4.

Output to (%)

INTAB: 60.0 P1: 40.0

INTBC: 10.0 P2: 90.0

Two finishedproducts productsare are produced produced in and P2,P2, which is lower quality P1. InP1. Two finished in this thisprocess, process,P1P1 and which is lower quality addition to being multipurpose, there is recycling of the one of the streams from the last separation In addition to being multipurpose, there is recycling of the one of the streams from the last separation task task S. S. Processing directives were specified to initiate tasks R2, H R3, H S. and S. In addition, the Processing directives were specified to initiate tasks R1, R1, R2, R3, and In addition, the priority priority of three was assigned for task R3, two for R2, and one for R1. A reactor was assigned to R2 of three was assigned for task R3, two for R2, and one for R1. A reactor was assigned to R2 only if only if enough material was available in INTBC and HOTA storage tanks. Similarly, a reactor was enough material was available in INTBC and HOTA storage tanks. Similarly, a reactor was assigned to assigned to R3 only if enough material was available in INTAB storage tank. Thus, if material was R3 only if enough material was available in INTAB storage tank. Thus, if material was available for R3, available for R3, it was given preference over R2 and R1. If R3 could not be initiated and there was it was given preference over R2 and R1. If R3 could not be initiated and there was enough material for enough material for R2, then it was given preference over R1. Task R1 was initiated only when R2, then it was given preference over R1. Task R1 was initiated only when neither R2 nor R3 could be neither R2 nor R3 could be initiated. In the beginning when there is no intermediate material, both initiated. the beginning when there is no intermediate material, both reactors are assigned to R1. reactorsInare assigned to R1. AA time horizon of 16.0 was used usedininthis thisexample. example. Gantt is shown in Figure time horizon of 16.0 h h was TheThe Gantt chartchart is shown in Figure 11. The11. Theschedule schedule generated by simulation the simulation is similar to the optimum As in the generated by the modelmodel is similar to the optimum schedule.schedule. As in the previous previous example, the optimizer was able to adjust batch sizes so as to fit complete batches in thetime given example, the optimizer was able to adjust batch sizes so as to fit complete batches in the given time horizon. The sequence of batches on individual reactors is different from the optimum schedule. horizon. The sequence of batches on individual reactors is different from the optimum schedule. The Thebuilt-in built-in rules generate sensible schedule within a fraction thecomputing computing time. The total rules dodogenerate a asensible schedule within a fraction of of the time. The total amounts produced are:are: 156.0 kg P1 kg P2.kg ForP2. theFor optimum solutionsolution the amounts produced amounts produced 156.0 kgand P1 162.0 and 162.0 the optimum the amounts 147.4 kg P1 kgthe P2.difference Again, theisdifference duethat to the that the is optimizer are:produced 147.4 kg are: P1 and 225.9 kgand P2. 225.9 Again, due to theis fact thefact optimizer able to do is able to do fractional to fit intime. the available time. In the at is the there 60 kg fractional batches to fit inbatches the available In the simulation, at simulation, the end there 60end kg in the isseparator in the separator make up which could makewhich up thecould difference for the P2.difference for P2.

Figure11. 11. Example Example 44 Gantt Figure Gantt chart. chart.

The simulation run took 0.049 s (user + sys values from the Linux time command). All MILP The simulation run took 0.049 s (user + sys values from the Linux time command). All MILP formulations required more than 10,000 CPU s. Using the appropriate logic to assign equipment formulations required more than 10,000 CPU s. Using the appropriate logic to assign equipment along along with assigning priorities to resolve competition was sufficient to schedule this process. with assigning priorities to resolve competition was sufficient to schedule this process. The Gantt chart shows that there is no slack time on both RR1 and RR2. Therefore, it would not be possible to produce any more material.

using the process parameters. The throughputs are given in Table 5. From the material balance, for every 1.0 kg output from R1, at least 2.0 kg output from R2 is produced, and at least 2.4 kg output from R3 is produced. The average maximum throughput of task R2 is twice that of R1. Therefore, tasks R1 and R2 are balanced. However, the average maximum throughputs of R1 and R3 are the Processes 4, 30 13 ofis16 same. 2016, Furthermore, one batch of H2 is required to make one batch of R3. The throughput of H2 approximately half of the total throughput of RR1 and RR2 for task R3. Therefore, H2 is the bottleneck of the process. As a result, in addition to assigning high priority to initiate R3, more 5.5. Example 5 refined logic was added, namely that as long as there is more than a certain quantity of material in INT3, a batch of R2 not initiated, as long as there4.is The morerecipe than anetwork certain amount materialis This process is awas variation of the and recipe in Example for thisof example in INT2, batch of waskey notprocess initiated. The refined logic wasinincorporated simulator asand an shown in aFigure 12.R1The parameters are given Table 5. Theinto twothe reactors, RR1 external module. Similarly, since H1 and H2 compete for HR, the priority of H2 was set higher than RR2, are suitable to perform tasks R1, R2, and R3. In addition, tasks H1 and H2 use the same unit, that of HR. H1. namely

Figure 12. 12. Recipe Recipe network network for Figure for Example Example 5. 5. Table5.5. Key Key process process parameters parameters for for Example Table Example 5. 5.

Task Unit α Task Unit α H1 HR 0.667 H1

H2

H2

R1 R1

HR

HR

HR

RR1 RR1 RR2 RR2

β β 0.00667

M, kg Input from (%) Output to (%) M, kg Input from (%) Output to (%) 100 0.667 0.00667 100 INT4: 25.0 1.0 0.01 100 INT4: S8: 75.025.0 1.0 0.01 100 S8: 75.0 1.334 0.0133 100 1.334 0.00889 0.0133 1.334 150100 1.334

0.00889

150

INT1: 50.0 INT2: 50.0

Throughput kg/h Throughput kg/h 75.0 75.0

50.0 50.0

37.5 37.5 56.2 56.2

R2

RR1 RR2

0.667 0.667

0.00667 0.00445

100 150

R3

RR1 RR2

1.333 1.333

0.01333 0.00889

100 150

INT7: 60.0 P2: 40.0

37.5 56.2

S

SR

2.000

0.00667

300

INT4: 40.0 INT5: 50.0 INT2: 10.0

75.0

M

MR1 MR2

1.333 1.333

0.00667 0.00667

200 200

INT7: 40.0 INT5: 40.0 S11: 20.0

75.0 112.4

75.0

Preliminary stage throughput calculations were performed before developing the equipment assignment strategy. The maximum average throughputs for each unit for each task were calculated using the process parameters. The throughputs are given in Table 5. From the material balance, for every 1.0 kg output from R1, at least 2.0 kg output from R2 is produced, and at least 2.4 kg output

M

MR1 MR2

1.333 1.333

0.00667 0.00667

200 200

INT5: 40.0 S11: 20.0

75.0

At the beginning of the simulation, storage tanks S6 and S7 were initialized to contain 50.0 kg of respectively, to match the condition specified in Susarla et al. [17]. Additionally, 14 ofthe 16 batch size of 200.0 kg was used for task S. The Gantt chart for the simulation is shown in Figure 13. Initially, batches of R1 and R2 are made on the reactors RR1 and RR2. R3 can be initiated only after a from produced. The average maximum throughput of task R2 is twice that of R1. Therefore, batchR3 of Sisand H2 is made. tasksFor R1 the andspecified R2 are balanced. However, average maximum throughputs of R1 and R3 are the time horizon of 14.0the h, 300.0 kg P1, and 120.0 kg P2 is produced, compared to same. Furthermore, one batch of H2 is required to make one batch of R3. The throughput of H2 is 225.0 kg P1 and 160.0 kg P2. approximately half of the total throughput of RR1 and RR2 for task R3. Therefore, H2 is the bottleneck The solution presented in Susarla et al. [17] has reactor batch sizes of 18.25 kg and 25.0 kg, of the process. a result, addition assigning high to initiate R3,can more logic which are oneAs fifth of theinsize of thetoreactors, just so priority that some material be refined produced inwas the added, namely that as long as there is more than a certain quantity of material in INT3, a batch of R2 available time. The simulation model produces different amounts of finished products, but the batch was not initiated, and as long as there is more than a certain amount of material in INT2, a batch of sizes are more realistic. As such, the process is not well balanced. Therefore an ‘optimum schedule’ R1 was initiated. The refined logic was incorporated into the simulator as an external module. may notnot have much practical significance. Similarly, since H1 and H2 compete HR, + the priority H2 was higher that of H1. The simulation run took 0.037 for s (user sys valuesoffrom the set Linux timethan command). All MILP At the beginning of the simulation, storage tanks S6 and S7 were initialized to contain 50.0was kg formulations required more than 5000 CPU s. A more refined logic to assign equipment which of INT4 and INT5, respectively, to match condition specified in Susarla et al. [17]. Additionally, programmed as external module, alongthe with assigning priorities to resolve competition was the batch size of 200.0 kg was used for task S. The Gantt chart for the simulation is shown in Figure 13. sufficient to schedule this process. Initially, of R1shows and R2 arethere made reactors RR1 RR2. R3itcan be initiated only after The batches Gantt chart that is on no the slack time on HR.and Therefore, would not be possible to aproduce batch ofany S and H2 is made. more material. INT4 and INT5, Processes 2016, 4, 30

Figure Figure 13. 13. Example Example 55 Gantt Gantt chart. chart.

6. Advantages of Simulation For the specified time horizon of 14.0 h, 300.0 kg P1, and 120.0 kg P2 is produced, compared to 225.0 kg P1 and 160.0 kg P2. The number of variables in MILP formulations to solve scheduling problems increases The solution presented in Susarla et al. [17] has reactor batch sizes of 18.25 kg and 25.0 kg, which exponentially as the time horizon increases. Consequently, the time required to solve the problems are one fifth of the size of the reactors, just so that some material can be produced in the available time. also increases exponentially. On the other hand, to simulate a process for longer time only one The simulation model produces different amounts of finished products, but the batch sizes are more parameter, simulation end time, needs to change. The underlying model stays the same. As a realistic. As such, the process is not well balanced. Therefore an ‘optimum schedule’ may not have consequence the computation time is typically linear with time horizon. Additionally, the quality of much practical significance. the schedule generated is not affected by the change in simulation time. The simulation run took 0.037 s (user + sys values from the Linux time command). All MILP formulations required more than 5000 CPU s. A more refined logic to assign equipment which was programmed as external module, along with assigning priorities to resolve competition was sufficient to schedule this process. The Gantt chart shows that there is no slack time on HR. Therefore, it would not be possible to produce any more material. 6. Advantages of Simulation The number of variables in MILP formulations to solve scheduling problems increases exponentially as the time horizon increases. Consequently, the time required to solve the problems also increases exponentially. On the other hand, to simulate a process for longer time only one parameter, simulation end time, needs to change. The underlying model stays the same. As a consequence the computation time is typically linear with time horizon. Additionally, the quality of the schedule generated is not affected by the change in simulation time.

Processes 2016, 4, 30

15 of 16

Processes 2016, 4, 30

15 of 16

To demonstrate the linear dependency of computation time on simulation time, the process the simulated linear dependency computation time on time simulation the process describedTo in demonstrate Example 4 was for 32.0of h (double the original of 16.0time, h). The Gantt chart described in Example 4 was simulated for 32.0 h (double the original time of 16.0 h). The Gantt chart for this simulation run is shown in Figure 14. for this simulation run is shown in Figure 14.

Figure Gantt chartfor forExample Example 4, time of of 32.0 h. h. Figure 14.14. Gantt chart 4, simulation simulationend end time 32.0

The simulation run took 0.049 s (user + sys values from the Linux time command) which is, in

The tookh0.049 s (user values fromfor the Linux fact, simulation the same as run the 16.0 run. There is + nosys MILP solution this case.time command) which is, in fact, the same as 16.0chart h run. There no MILP solution this case. Thethe Gantt shows thatisthere is no slack timefor on both RR1 and RR2. Therefore, it would not The Gantt chart shows that there is no slack time on both RR1 and RR2. Therefore, it would not be possible to produce any more material. be possible to produce any more material. 7. Conclusions

7. Conclusions

In this paper we describe the enhanced capabilities to make better equipment assignment decisions which available the BATCHES simulator to facilitate its use in solving scheduling In this paper we are describe the in enhanced capabilities to make better equipment assignment decisions To illustrate capabilities, the simulator was used to schedule five batch processes for whichproblems. are available in thethese BATCHES simulator to facilitate its use in solving scheduling problems. which various MILP formulations have been reported in the literature. In all cases the simulator To illustrate these capabilities, the simulator was used to schedule five batch processes for which generated very high quality solutions within a fraction of the time required for solving MILP various MILP formulations have been reported in the literature. In all cases the simulator generated formulations. Some solutions matched exactly the optimum solutions reported, while for some the very results high quality solutions within a fraction of the time required for solving MILP formulations. were different, but comparable. In certain cases, only a qualitative comparison could be made Somebecause solutions matched the optimum solutions while some thecases, results of the inabilityexactly of the simulator to make fractionalreported, batches. Even in for those special thewere different, but comparable. In certain cases, only a qualitative comparison could be made because assignment decisions made by the simulator were logical and verifiable. The recipe models of the of the inability ofstudied the simulator toproblems make fractional Even in those special cases, the assignment processes in the test were notbatches. very complicated, most likely modified to keep the MILPmade formulations manageable size. However, in general, therecipe underlying recipes could be decisions by the within simulator were logical and verifiable. The models of the processes quite can bewere handled by a simulation model with little or to nokeep impact studied in complex the test and problems not easily very complicated, most likely modified theonMILP computation time.manageable Once the modeling decisions are can easily accommodate formulations within size. However, in verified, general,the thesimulator underlying recipes could be quite complexities such as parameter uncertainties, non-zero transfer times, sequence dependent cleaning, complex and can be handled easily by a simulation model with little or no impact on computation time. shared resources, and so on. The largest advantage of simulation is in tackling larger time horizons Once the modeling decisions are verified, the simulator can easily accommodate complexities such because the computation time is linear with time horizon. For MILP formulations, the number of as parameter non-zero transfer times, sequence dependent cleaning, shared resources, variables uncertainties, increases exponentially with time horizon, often resulting in failure to find even a feasible and so on. The largest advantage of simulation is in tackling larger time horizons because solution. Simulation with more intelligence to make equipment assignment decisions can be a very the computation time linearscheduling with time horizon. For MILP formulations, the number of variables effective tool in is solving problems.

increases exponentially with time horizon, often resulting in failure to find even a feasible solution. Acknowledgments: The author wants to acknowledge Gintaras V. Reklaitis for helpful suggestions for the Simulation with more to make equipment assignment decisions can be a very effective work presented in thisintelligence paper. tool in solving scheduling problems. Conflicts of Interest: Author is associated with Batch Process Technologies, Inc., which develops and licenses the BATCHES simulator. The simulator was used in modeling the processes studied in this paper.

Acknowledgments: The author wants to acknowledge Gintaras V. Reklaitis for helpful suggestions for the work presented in this paper. References Conflicts of Interest: Author is associated with Batch Process Technologies, Inc., which develops and licenses the 1. Harjunkoski, I.; Maravelias, P.; Castro, P.M.; Engell, S.; studied Grossmann, I.E.;paper. Hooker, J.; Mendez, BATCHES simulator. The simulator C.T.; was Bongers, used in modeling the processes in this C.; Sand, G.; Wassick, J. Scope for industrial applications of production scheduling models and solution methods: A review. Comput. Chem. Eng. 2014, 62, 161–193. References

1.

Harjunkoski, I.; Maravelias, C.T.; Bongers, P.; Castro, P.M.; Engell, S.; Grossmann, I.E.; Hooker, J.; Mendez, C.; Sand, G.; Wassick, J. Scope for industrial applications of production scheduling models and solution methods: A review. Comput. Chem. Eng. 2014, 62, 161–193. [CrossRef]

Processes 2016, 4, 30

2. 3.

4. 5. 6. 7.

8. 9. 10. 11. 12. 13.

14. 15. 16. 17.

16 of 16

Méndez, C.A.; Cerdá, J.; Grossmann, I.E.; Harjunkoski, I.; Fahl, M. State-of-the-art review of optimization methods for short-term scheduling of batch processes. Comput. Chem. Eng. 2006, 30, 913–946. [CrossRef] Harjunkoski, I. Industrial perspectives on the deployment of scheduling solutions. In 12th International Symposium on Process Systems Engineering and 25th European Symposium on Computer Aided Process Engineering; Elsevier: Copenhagen, Denmark, 2015; Volume 37, p. 63. Dimian, A.C.; Bildea, C.S.; Kiss, A. Integrated Design and Simulation of Chemical Processes; Elsevier: Amsterdam, The Netherlands, 2014. Gernaey, K.V.; Gani, R. A model-based systems approach to pharmaceutical product-process design and analysis. Chem. Eng. Sci. 2010, 65, 5757–5769. [CrossRef] Chu, Y.; Wassick, J.M.; You, F. Efficient Scheduling Method of Complex Batch Processes with General Network Structure via Agent-Based Modeling. AIChE J. 2013, 59, 2884–2906. [CrossRef] Chu, Y.; You, F.; Wassick, J.M.; Agarwal, A. Integrated planning and scheduling under production uncertainties: Bi-level model formulation and hybrid solution method. Comput. Chem. Eng. 2015, 72, 255–272. [CrossRef] Batch Process Developer. Available online: www.aspentech.com/products/engineering/aspen-batchprocess-developer/ (accessed on 20 July 2016). Intelligen, Inc. Available online: www.intelligen.com/ (accessed on 20 July 2016). gPROMS. Available online: www.psenterprise.com/gproms.html (accessed on 20 July 2016). BATCHES. Available online: www.bptechs.com (accessed on 20 July 2016). BATCHES Users Manual; Batch Process Technologies: West Lafayette, IN, USA, 2015. Clark, S.M.; Joglekar, G.S. Simulation Software for Batch Process Engineering. In Batch Process Systems Engineering Fundamentals and Applications for Chemical Engineering; NATO ASI Series; Springer: Antalya, Turkey, 1996; Volume 143, pp. 376–392. Kondili, E.; Pantelides, C.C.; Sargent, R.W.H. A general algorithm for short-term scheduling of batch operations—I. MILP formulation. Comput. Chem. Eng. 1993, 17, 211–227. [CrossRef] Pantelides, C.C. Unified frameworks for optimal process planning and scheduling. In Foundations of Computer-Aided Process Operations; Cache Publications: New York, NY, USA, 1994; pp. 253–274. ANSI/ISA-88.01-1995: Batch Control Part 1: Models and Terminology; ISA: Research Triangle Park, NC, USA, 1995. Susarla, N.; Li, J.; Karimi, I.A. A Novel Approach to Scheduling Multipurpose Batch Plants Using Unit-Slots. AIChE J. 2009. [CrossRef] © 2016 by the author; licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC-BY) license (http://creativecommons.org/licenses/by/4.0/).

Suggest Documents