Simple Continuous-Time Formulation for Short ... - ACS Publications

Dec 3, 2003 - Dynamic Scheduling of Shuttle Robots in the Warehouse of a Polymer Plant Based on Dynamically Configured Timed Automata Models. Christia...
0 downloads 12 Views 334KB Size
Ind. Eng. Chem. Res. 2004, 43, 105-118

105

Simple Continuous-Time Formulation for Short-Term Scheduling of Batch and Continuous Processes Pedro M. Castro,*,† Ana P. Barbosa-Po´ voa,‡ Henrique A. Matos,§ and Augusto Q. Novais† Departamento de Modelac¸ a˜ o e Simulac¸ a˜ o de Processos, INETI, 1649-038 Lisboa, Portugal, and Centro de Estudos de Gesta˜ o and Departamento de Engenharia Quı´mica, Instituto Superior Te´ cnico, 1049-001 Lisboa, Portugal

A new and simple general mathematical formulation for scheduling multipurpose plants involving batch and/or continuous processes, based on the resource-task network (RTN) representation, is presented. The formulation uses a uniform-time-grid continuous-time representation and results in a very efficient mixed integer linear programming model that can be solved to optimality for a given number of event points. The performance of the formulation is illustrated through the solution of two case studies that have been thoroughly examined in the literature: the first involves a continuous plant and is solved for three different storage policies, and the second concerns a batch plant. The formulation is shown to compare favorably to existing continuous-time formulations. More specifically, a new optimal solution is obtained for the finite intermediate storage scenario of the first case that is also a global optimal solution. 1. Introduction Scheduling in process systems refers to the procedures and processes of allocating resources and equipment over time so as to execute the chemical and physical processing tasks required to manufacture one or more products. Scheduling is required whenever there is a competition among activities for scarce resources over time. It is a decision-making process aiming to optimize one or more objectives by taking into account the production requirements, available resources (process units, materials, utilities), and their interactions in the process. Because of the need to move toward more flexible plants that respond to market requirements quickly, a significant body of research has appeared in the chemical engineering literature concerning the short-term scheduling of multipurpose plants. In the past couple of decades, scheduling formulations have evolved from a large set of different approaches, each attempting to exploit the characteristics of specific categories of problems, to more general approaches based on a more systematic way of representing the process under study. Model development for scheduling problems became increasingly simpler, first with the well-known statetask network (STN) process representation, introduced by Kondili et al.,1 and later with the resource-task network (RTN) process representation of Pantelides.2 The other criterion that can be employed to classify scheduling formulations concerns the treatment of time. Whereas early formulations were based on a simple discretization of the time horizon into equal-length intervals, most of the more recent work uses continuoustime formulations to eliminate unnecessary time inter* To whom correspondence should be addressed. Tel.: +351217162712. Fax: +351-217167016. E-mail: pedro.castro@ ineti.pt † INETI. ‡ Centro de Estudos de Gesta˜o, Instituto Superior Te´cnico. § Departamento de Engenharia Quı´mica, Instituto Superior Te´cnico.

vals with the aim of reducing the problem size and the computational cost. Continuous-time formulations can use a common time grid for all resources in the process or a different time grid for each resource. The formulations of Mockus and Reklaitis,3 Zhang and Sargent,4 Schilling and Pantelides,5 Castro et al.,6 and Maravelias and Grossmann7 fall under the uniform-time-grid category, while those of Zentner and Reklaitis,8 Pinto and Grossmann,9 Ierapetritou and Floudas,10-12 and Giannelos and Georgiadis13,14 fall under the nonuniformtime-grid category. In this paper, an RTN-based continuous-time (uniformgrid) short-term scheduling formulation that handles both batch and continuous processes is proposed. It can be viewed as an improved formulation of the approach of Castro et al.6 Three main differences can be identified: (i) the new formulation can now handle continuous tasks, which are treated very similarly to batch tasks; (ii) it uses a more efficient set of constraints for batch tasks subject to zero-wait policies; and (iii) it uses a different set of timing constraints that provide improved linear relaxations of the formulation and that can have a profound effect on the computational cost. The capability of the proposed approach is illustrated through the solution of two well-known case studies that can be viewed as performance benchmarks. The first case considers a continuous plant and will be used to provide a comparison to the RTN-based uniform-timegrid formulation of Schilling and Pantelides,5 the STNbased nonuniform-time-grid formulations of Ierapetritou and Floudas11 and Giannelos and Georgiadis,14 and the formulation of Me´ndez and Cerda´.15 On the other hand, the second case considers a batch plant and will be used to compare our formulation to the STN-based uniformtime-grid continuous-time formulation of Maravelias and Grossmann,7 which has just been published. The paper is structured as follows: Section 2 introduces the fundamental concepts underlying the proposed short-term scheduling formulation. The formulation is then described in detail in section 3, leading to an MILP problem. Section 4 addresses the applicabil-

10.1021/ie0302995 CCC: $27.50 © 2004 American Chemical Society Published on Web 12/03/2003

106

Ind. Eng. Chem. Res., Vol. 43, No. 1, 2004

Figure 1. Adopted continuous-time representation.

ity of the proposed formulation through the solution of several examples taken from the literature. In section 5, a comparison with other continuous-time short-term formulations is provided, where the results obtained in section 4 are critically reviewed. Finally, the conclusions are stated in section 6. 2. Fundamental Concepts In this section, the fundamental concepts upon which our formulation is based are presented, namely, those relating to the representation of time and those relating to the resource-task network process representation. 2.1. Representation of Time. The structure of scheduling formulations is largely dictated by the treatment of time. In most formulations, the time horizon of interest (H) is divided into several time intervals/slots, with events taking place only at interval boundaries. As the underlying mathematical model must characterize the potential occurrence of events (beginning or ending of tasks) at each time point, the greater the number of time intervals considered, the larger the size of the mathematical model. If time intervals have fixed and uniform durations, this leads to the case of discretetime representations. On the other hand, in continuoustime formulations, the length of each time interval is unknown and is to be determined. In this case, two types of grids are normally used, a uniform time grid for all resources and a nonuniform time grid where each resource is treated independently. This work adopts a uniform type of grid where a common time grid is used for all resources, as shown in Figure 1. Event points are numbered from 1 to T, spanning the time from 0 to H, the time horizon. Nonuniform time grids are also frequently used in scheduling formulations. The reason for this is that the number of event points required by each resource is usually smaller than the total number in the common time grid. Thus, if a different time grid is used for each resource, the size of the mathematical problem is reduced. The major disadvantage of this approach is that it is not trivial to model interactions between tasks involving the same material states and extreme care is required in placing material balance and intermediate storage constraints or else infeasible schedules might result. In fact, infeasible solutions have already been reported14 for the formulation of Ierapetritou and Floudas.11 2.2. Resource-Task Network (RTN) Process Representation. The resource-task network process representation2 regards all processes as bipartite graphs comprising two types of nodes: resources and tasks. The concept of a resource is entirely general and includes all entities that are involved in the process steps, such as materials (raw materials, intermediates, and products), processing and storage equipment (tanks, reactors, etc.), and utilities (operators, steam, etc.). A task is an abstract term for an operation that transforms a certain set of resources into another set. In our formulation, a task is assumed to interact with resources discretely at its start and end and/or continu-

Figure 2. RTN representation of a continuous packing task.

ously at a rate that remains constant throughout its duration. An example of this (Figure 2) is a packing task consuming a continuous amount of resource Int1 and producing a continuous amount of resource PD11 throughout its operation. Although the rate of the task can vary between given lower and upper limits (e.g. 0-5.5714, see Figure 2), the relation between the amount of material processed in the task and the amount of resource produced/consumed must be known for all resources, with 1 being the default value (omitted for simplification). The packing line in Figure 2 can also be viewed as “consuming” the item of equipment in which it takes place (Line3) at the start and “producing” the same item at the end. Note that a discrete interaction with a resource is represented as a dashed line, whereas a continuous interaction is represented as a solid line. In this paper, it is assumed that all equipment resources, with the exception of storage tanks, are considered individually. Thus, if two or more identical pieces of equipment exist, one resource will need to be defined for each item. Furthermore, it is assumed that only one task can be executed in any given equipment resource at a certain time. This is ensured by setting to unity the absolute value of the integer extent coefficients relating these two entities. These two assumptions, although increasing the number of tasks and resources that need to be considered, allow for some important model simplifications that have the overall effect of decreasing the number of constraints required by the formulation and, most importantly, its complexity. This will be better understood upon further discussion. A binary variable N h i,t,t′, and a continuous variable, ξhi,t,t′, characterize the instance of task i, starting at event point t and ending at event point t′. The former identifies the occurrence of the task, and the latter gives the total amount of material being processed. To account for tasks of variable duration, it is assumed that the task processing time is given by a constant plus a term proportional to the amount of material being processed (eq 1). This model covers a wide variety of cases, such as batch tasks with fixed duration (βi ) 0) and continuous tasks with processing rate Fi (Ri ) 0 and βi ) 1/Fi), max with Fi ∈ [Fmin ]. i , Fi

Ri + βiξhi,t,t′

(1)

The amounts of each resource produced or consumed at the start and end of a task are assumed to be proportional to the binary and/or continuous extents of the task. The total amount of resource r consumed at the start of task i beginning at event point t and ending at event point t′ is

h i,t,t′ + νr,iξhi,t,t′ µr,iN

(2)

and the amount produced at its end is

h i,t,t′ + νjr,iξhi,t,t′ µ j r,iN

(3)

Ind. Eng. Chem. Res., Vol. 43, No. 1, 2004 107

where the parameters µr,i and µ j r,i are usually associated with resources corresponding to equipment items, whereas the parameters νr,i and νjr,i are typically linked with material resources. Positive coefficient values denote production of the resource, whereas negative values denote consumption. A task might also interact in a continuous manner with one or more resources throughout its duration. In this case, it is assumed, without loss of generality, that any instance of the task can last for only one time interval, i.e., if the task starts at event point t, it must end at event point t′ ) t + 1, and the rate of generation of resource r by task i during interval t is given by

optimum solution. If a certain task i, i ∈ I b, is a limiting task in the schedule, the difference between those two event points will match its processing time; otherwise, that difference will be greater. Naturally, in the latter situation, the model assumes that the material is held in the corresponding unit of equipment for more time than it should, which of course might not be possible for all tasks, namely, those subject to zero-wait policies (belonging to set I ZW). To overcome this problem, such tasks have been subjected to another set of constraints, first proposed by Schilling.16 In this paper, a more efficient and simple set of constraints is used instead

λr,iξhi,t,t+1

Tt′ - Tt g RiN h i,t,t′ + βiξhi,t,t′ ∀ i ∈ I b, t ∈ T, t′ ∈ T, t < t′ e ∆t + t, t * |T| (5)

(4)

It is now possible to identify and quantify the parameters implicit in the RTN of Figure 2: µLine3,Pack_D11 ) - 1, µ j Line3,Pack_D11 ) 1, λInt1,Pack_D11 ) - 1, and λPD11,Pack_D11 ) 1. Note that a discrete interaction exists between task Pack_D11 and resource Line3, whereas a continuous interaction is observed for resources Int1 and PD11, that translates, respectively, into a continuous consumption and production. It is also worthwhile to explain the procedure followed to model a particular type of task. Storage tasks hold a given material resource for a certain (unknown) amount of time. The total amount stored varies within the scheduling horizon and sometimes even within a particular time interval. Thus, it is impossible to define a total amount of material being stored in each interval, and so the use of the continuous extent variables ξhi,t,t′ is inappropriate. Instead, a different procedure is used that consists of activating storage tasks every time there is an excess amount of the corresponding material resource (see eqs 16 and 17). The use of parameters µr,i and µ j r,i to model the consumption/production of a particular resource (in this case, the storage tank) remains unchanged. 3. Mathematical Formulation The proposed formulation requires the indices, sets, parameters, and variables that are listed in the Nomenclature section. Note that all continuous variables assume only nonnegative values. Using this notation, the mathematical model for the short-term scheduling of plants involving both batch and continuous processes is achieved by the following constraints. 3.1. Timing Constraints. Timing constraints are the core of all continuous-time formulations. They have such an influence on the overall performance of the formulation in terms of both the quality of the solution returned and the computational cost, that much of the work in this area has focused mainly on them. This can be seen when comparing the formulation presented in this paper to those of Castro et al.6 and Schilling and Pantelides5 for uniform-time-grid formulations and the formulations of Ierapetritou and Floudas10,11 to those of Giannelos and Georgiadis13,14 for nonuniform-time-grid formulations. In the formulation of Castro et al.6 (for batch plants), the difference between the absolute times of any two event points (t and t′) is allowed to be either equal to or greater than the processing time of all tasks starting and ending at those same event points. For batch tasks, this has the effect of decreasing the number of event points required by the formulation to achieve the global

h i,t,t′) + RiN h i,t,t′ + βiξhi,t,t′ Tt′ - Tt e H(1 - N ∀ i ∈ I b, i ∈ I ZW, t ∈ T,t′ ∈ T, t < t′ e ∆t + t, t * |T| (6) Note that both eqs 5 and 6 become relaxed every time a task does not start at event point t or finish at t′ (N h i,t,t′ ) 0, and from eq 13, ξhi,t,t′ ) 0) because the difference between any two event points is always greater than 0 and less than the time horizon. These constraints also ensure that, whenever a task subject to zero-wait policies is executed (N h i,t,t′ ) 1), the difference between the absolute times of event points t and t′ is the exact processing time (see eq 1). The above equations are in a general form and so can also be applied to continuous tasks. However, we find it preferable to rewrite them again after replacing the parameters with others that are better related to and Fmin continuous tasks, namely, Fmax i i , the maximum and minimum allowable rates, respectively, of task i, i ∈ I c. The second set of constraints is now extremely useful for tasks that must exceed a certain minimum rate (set I EMR).

Tt+1 - Tt g

ξhi,t,t+1

∀ i ∈ I c, t ∈ T, t * |T|

Fmax i

h i,t,t+1) + Tt+1 - Tt e H(1 - N

(7)

ξhi,t,t+1 Fmin i

∀ i ∈ I , i ∈ I EMR, t ∈ T, t * |T| (8) c

Although very simple, eqs 5-8 have the drawback of producing poor linear relaxations of the formulation, especially for problems involving continuous tasks. Furthermore, the integrality gap tends to increase rapidly with the number of event points. These two effects, when combined with the high degree of degeneracy exhibited by such problems, might prevent us from reaching a good solution, not to mention the global optimum, in a reasonable computational time (see section 4.1.1). Nevertheless, they provide a very good starting point for the strategy proposed in this paper. With the simple assumption that only one task can be executed in any given equipment unit at a certain time (see section 2.2), a more powerful set of constraints can be derived. Now, instead of considering all tasks individually, we combine all tasks that take place in the same equipment resource (r ∈ REQ) into a single constraint, or two if there are zero-wait batch tasks or continuous tasks subject to a predefined minimum rate.

108

Ind. Eng. Chem. Res., Vol. 43, No. 1, 2004

In this way, not only is the number of constraints reduced but, most importantly, a much better linear relaxation of the formulation is obtained. However, this does not mean that the following set of constraints will always lead to a better performance than the above set (see section 4.2). Also, all tasks must be considered, so if there are tasks not linked to equipment resources, then the above set of constraints must also be applied to such tasks.

Tt′ - Tt g



µ j r,i(RiN h i,t,t′ + βiξhi,t,t′) +

i∈I b

(



i∈I c

µ j r,iξhi,t,t′ Fmax i

)|

t′)t+1

∀ r ∈ REQ, t ∈ T, t′ ∈ T, t < t′ e ∆t + t, t * |T| (9)



Tt′ - Tt e H(1 -



µ j r,iN h i,t,t′ -

i∈ I b,I ZW



µ j r,iN h i,t,t′|t′)t+1) +

i ∈ I c,I EMR

βiξhi,t,t′) +

(∑ i∈I

∀r∈R

EQ

µ j r,i(RiN h i,t,t′ +

)|

i ∈ I b,I ZW

µ j r,iξhi,t,t′

c,I EMR

Fmin i

For continuous tasks, these bounds are more difficult to define because the amount of material processed in a given interval is related not only to the rate of the task but also to the length of the interval. Assuming ∆tmin as the minimum interval length, the following constraints result

∆tminFmin N h i,t,t+1 e ξhi,t,t+1 e HFmax N h i,t,t+1 i i ∀ i ∈ I c, t ∈ T, t * |T| (14) Note that the lower bounds in eqs 13 and 14 must be greater than 0. Otherwise, N h i,t,t′ can be equal to 1 even for ξhi,t,t′ ) 0. 3.3. Excess Resource Balance Constraints. The excess resource balances are typical multiperiod material balance expressions, in which the excess amount of a resource at event point t is equal to the excess amount at the previous event point (t - 1) adjusted by the amounts discretely or continuously produced/ consumed by all tasks starting or ending at t.

Rr,t ) R0r |t)1 + Rr,t-1|t>1 +

∑ [ t′∈T ∑

i∈I b

t′)t+1

, t ∈ T, t′ ∈ T, t < t′ e ∆t + t, t * |T| (10)

In eqs 5, 6, 9, and 10, parameter ∆t is used to define the number of event points allowed between the beginning and end of a batch task, given that, for a continuous task, ∆t is necessarily equal to 1, as mentioned in section 2.2. In reality, this parameter can be omitted from the formulation simply by using its upper bound (|T| - 1).5,6,16 However, in such a case, the number of variables and constraints increases rapidly with the number of event points considered, whereas if the value of ∆t is made independent of |T|, then the same increment is observed every time the number of event points increases by 1. Furthermore, the use of a fixed value for ∆t is quite a reasonable assumption in cases where the task processing times are of the same order of magnitude, where it is expected that few event points exist between the beginning and end of a given task. Note, however, that the use of an exceedingly small value might prevent the formulation from reaching the global optimum or might even turn the model infeasible (see Castro et al.17). The full set of timing constraints is completed with two very simple equations, defining the absolute times of the first and last event points. Thus, according to Figure 1

T1 ) 0

(11)

T|T| ) H

(12)

3.2. Operational Constraints. If a processing task occurs, the amount of material being processed must lie within the range between the minimum and maximum amounts. For batch tasks, these parameters can be associated with the minimum and maximum capacities of the piece of equipment on which each task takes place.

N h i,t,t′ e ξhi,t,t′ e Vmax N h i,t,t′ Vmin i i ∀ i ∈ I b, t ∈ T, t′ ∈ T, t < t′ e ∆t + t, t * |T| (13)

νr,iξhi,t,t′) +



(µr,iN h i,t,t′ +

t