scheduling of multistage multiproduct chemical batch plants using a constraint-based approach

4
e Pergamon Computers and Chemical Engineering Supplement (1999) S51 1-5514 © 1999 Elsevier Science Ltd. All rights reserved PIt: S0098-1354199/00019-6 Scheduling of Multistage Multiproduct Chemical Batch Plants Using A Constraint-Based Approach W. Huang and P.W.H. Chung Department of Chemical Engineering, Loughborough University Loughborough, Leicestershire LEI I 3TU, U.K. ABSTRACT Multistage multiproduct chemical batch plants provide great flexibility but the task of scheduling them to meet product demands can be challenging. A typical scheduling problem involves the allocation of resources over time. A constraint-based approach to solve this kind of scheduling problems is considered. The essential feature of this approach is that it docs not require elaborate mathematical formulae, but it requires a problem to be stated in terms of constraints. A general constraint model was created to represent a common class of chemical batch plants and a scheduling system was produced based on this model. A user can simply input the information of production requirements through a user interface and, if necessary, modify the constraints related to the specific problem and a viable schedule is created automatically. Keywords: Schedule, Chemical batch plants, Activity, Constraints, Constraint satisfaction techniques INTRODUCTION In recent years there has been considerable interest in the scheduling of multistage multiproduct batch-plants with the aim to improve productivity. Various approaches have been considered to solve this type of problems. Most researchers in this field have used the Mixed Integer Linear Programming (MILP) approach. In this approach, an elaborate mathematical model is required to describe a problem and it is then solved by a MILP algorithm. Kondili et al. (1993) suggested a general algorithm for short-term batch scheduling formulated in MILP using a discrete time representation. Shah et al. (1993) introduced a rigorous mathematical programming framework for the optimal periodic scheduling of multipurpose batch plants. Constraint Satisfaction Techniques (CST) have recently been used to solve problems ranging from design to scheduling. This approach does not require elaborate mathematical formulae but requires a problem to be stated in terms of its constraints. Problems which are solved using CST are called Constraint Satisfaction Problems (CSP). A simple CST backtracking algorithm is described by Wang and Liao (1997): Given: a set of variable, each of which has a range of values as its domain, and a finite set of constraints among the variables. Find: assignments for all the variables with values in their domains such that all the given constraints are satisfied. The algorithm is to repeat the following steps until all the variables are instantiated Stepl: choose an uninstantiated variable X for the next instantiation. Step2: choose a value E from the current domain of X. Step3: instantiate X with E, and make constraint propagation to reduce the domains of the remaining uninstantiated variables. Step4: if an inconsistency occurs then backtrack to Step3. If there is no backtrack point i.e. the search is exhausted, then no solution is found for this problem. Step5: if no inconsistency occurs and not all variables are instantiated, then go to Stepl. If no inconsistency occurs and all variables are instantiated, then output solution. This study investigates the application of CST to solve scheduling problems in multistage multiproduct chemical batch plants. A typical problem involves the allocation of resources and the determination of a suitable time slot for each job in the schedule. This paper considers scheduling problems in a campaign mode in which a chemical batch process is considered to be operating in a cyclic mode with the same sequence of operations repeated in each cycle. We sought to develop a general system for solving this type of problems. In order to produce such a system, a general constraint model for describing CSPs in chemical batch plant scheduling was created and ·the model was implemented as part of a scheduling system based on CSTs. The effectiveness of this approach is illustrated using a case study. GENERAL CONSTRAINT MODEL FOR BATCH PLANT SCHEDULING Before describing the model, some terms are explained first: Cycle

Upload: w-huang

Post on 02-Jul-2016

214 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Scheduling of multistage multiproduct chemical batch plants using a constraint-based approach

e PergamonComputers and Chemical Engineering Supplement (1999) S51 1-5514

© 1999 Elsevier Science Ltd. All rights reservedPIt: S0098-1354199/00019-6

Scheduling of Multistage MultiproductChemical Batch Plants

Using A Constraint-Based ApproachW. Huang and P.W.H. Chung

Department of Chemical Engineering, Loughborough UniversityLoughborough, Leicestershire LEI I 3TU, U.K.

ABSTRACTMultistage multiproduct chemical batch plants provide great flexibility but the task of scheduling them to meetproduct demands can be challenging. A typical scheduling problem involves the allocation of resources over time.A constraint-based approach to solve this kind of scheduling problems is considered. The essential feature of thisapproach is that it docs not require elaborate mathematical formulae, but it requires a problem to be stated in termsof constraints. A general constraint model was created to represent a common class of chemical batch plants and ascheduling system was produced based on this model. A user can simply input the information of productionrequirements through a user interface and, if necessary, modify the constraints related to the specific problem anda viable schedule is created automatically.

Keywords: Schedule, Chemical batch plants, Activity, Constraints, Constraint satisfaction techniques

INTRODUCTIONIn recent years there has been considerable interest inthe scheduling of multistage multiproduct batch-plantswith the aim to improve productivity. Variousapproaches have been considered to solve this type ofproblems. Most researchers in this field have used theMixed Integer Linear Programming (MILP) approach.In this approach, an elaborate mathematical model isrequired to describe a problem and it is then solved by aMILP algorithm. Kondili et al. (1993) suggested ageneral algorithm for short-term batch schedulingformulated in MILP using a discrete timerepresentation. Shah et al. (1993) introduced a rigorousmathematical programming framework for the optimalperiodic scheduling of multipurpose batch plants.

Constraint Satisfaction Techniques (CST) have recentlybeen used to solve problems ranging from design toscheduling. This approach does not require elaboratemathematical formulae but requires a problem to bestated in terms of its constraints. Problems which aresolved using CST are called Constraint SatisfactionProblems (CSP). A simple CST backtracking algorithmis described by Wang and Liao (1997):Given: a set of variable, each of which has a range of

values as its domain, and a finite set ofconstraints among the variables.

Find: assignments for all the variables with values intheir domains such that all the given constraintsare satisfied.

The algorithm is to repeat the following steps until allthe variables are instantiatedStepl: choose an uninstantiated variable X for the next

instantiation.Step2: choose a value E from the current domain of X.

Step3: instantiate X with E, and make constraintpropagation to reduce the domains of theremaining uninstantiated variables.

Step4: if an inconsistency occurs then backtrack toStep3. If there is no backtrack point i.e. thesearch is exhausted, then no solution is foundfor this problem.

Step5: if no inconsistency occurs and not all variablesare instantiated, then go to Stepl. If noinconsistency occurs and all variables areinstantiated, then output solution.

This study investigates the application of CST to solvescheduling problems in multistage multiproductchemical batch plants. A typical problem involves theallocation of resources and the determination of asuitable time slot for each job in the schedule. Thispaper considers scheduling problems in a campaignmode in which a chemical batch process is consideredto be operating in a cyclic mode with the samesequence of operations repeated in each cycle. Wesought to develop a general system for solving this typeof problems. In order to produce such a system, ageneral constraint model for describing CSPs inchemical batch plant scheduling was created and ·themodel was implemented as part of a scheduling systembased on CSTs. The effectiveness of this approach isillustrated using a case study.

GENERAL CONSTRAINT MODEL FOR BATCHPLANT SCHEDULINGBefore describing the model, some terms are explainedfirst:• Cycle

Page 2: Scheduling of multistage multiproduct chemical batch plants using a constraint-based approach

5512 Computers and Chemical Engineering Supplement (1999) S511-S514

Each production cycle produces a batch of finalproducts. In order to meet the required quantityof final products, one or more cycles of theproduction process may be required.

• ActivityA cycle may consist of one or more activities.Each activity transform materials from its inputstate into an output state.

• RunAn activity under a cycle may run once or moretimes dependent on the availability of feedmaterials from previous activities of the cycleand the capacity of the processing unit used forthe particular activity under consideration.

• JobA run for an activity under a cycle is called ajob. The total number of jobs is the total numberof runs for all activities under all cycles.

The constraint model includes variables, value rangesand various constraints. Because different problemshave different requirements for the management oftime and resources, variables in the constraint modelmay be modified by a user to represent a particularproblem. The value ranges of these variables may alsobe provided by the user. Usually the value range for a'variable of machine type is the list of machines thatmay be used for a specific activity and the value rangefor a variable of material type is the quantities that maybe provided. Constraints specify the relationshipsbetween different jobs and are represented by simplemathematical relations such as :S;,~ ,= and E.

Let a schedule have n jobs . .J j and ~ represent the ith

and the jth job respectively, where i E [l,n] and

j E [I,ll] . There are several main types of constraints

in this model:Type]: The start time of the first job of the whole

process is the time origin and the end time of thelast job can not exceed the time horizon:ST(JI) = TO and ET(J~):S; THWhere ST and IT are the start time and end timeof a job respectively, and TO and TH are the timeorigin and time horizon respectively.

Typez: Sometimes, under a cycle an activity mustprecede another activity:ET(J) s ST(Jj)

where ET(J j ) is the end time of the last job of an

activity and ST(Jj) is the start time of the first

job of another activity.Type3: Under some requirements, an activity has to

operate within a time slot, i.e. the first job of theactivity has to start after a time ~ and the last job

of the activity bas to end before another time Ty:ST(Ji)~Tx and ET(Jj):S;Ty

Types: Sometimes a final product may be required tobe produced before a time T, i.e. the last job of an

activity producing this final product has to endbefore time T: ET( J j ) :s; T

Type5: Because a processing unit is a unary resource,any two jobs requiring a common processing unitcan not overlap, i.e. the end time of onejob mustprecede thestart time of the other:If M(J) = M(Jj) then ET(Jj):S; ST(Jj)

Where M is the machine required by ajob.Type6: Because a material is a discrete resource with

capacity one or greater, two and more jobsrequiring the same discrete resource at the sametime T may overlap in time as long as their totalrequirement for this material do not exceed theavailable quantity:

[ST(J.) s T]

If L Q(J j) :s; Q(MT) then I

j ET(J)?:. T

Where Q(Jj) represents the quantity of a

material required by the ith job at time T and

L Q(Jj ) represents the total required quantity ofj

this material at time T .Q(MT) represents the

total available quantity of this material at time T.Type7: Under a cycle, an activity which runs more

than once must operate in tum i.e. the start time ofajob is the end time of the last one:If J j ,Ji +1 E A, then ST(Ji+l ) =ET(Jj)Where A is the value range of jobs for the sameactivity under a cycle.

Type8: Any two jobs which are not restricted by theabove constraints may overlap i.e. the start time ofone job or the end time of the job or both can beincluded in the duration of the other job:

[

ST(J j ) ~ STeJ j)]orland

ST(J) < ET(J)

[ET(Jj ) > STeJ)]

ETeJj) :s; ETeJ j)

COMPUTER IMPLEMENTATIONA software system based on the above constraint modelwas developed in C++. The system provides a userinterface through which users can simply input theinformation of production requirements. Theinformation is then analysed and used to modifyvariables, value ranges and constraints based on theabove model. After that, the system produces aschedule by calling ILOG library functions to search fora solution (ILOG is a constraint-based software toolavailable commercially).

The UserInterface For Problem DescriptionThe user interface is implemented in C++ which allowsa user to specify a scheduling problem simply byanswering a sequence of questions. The questions aredivided into two parts: the first part is for generalinformation and the second part is for specific

Page 3: Scheduling of multistage multiproduct chemical batch plants using a constraint-based approach

Computers and Chemical Engineering Supplement (/999) S5JI-S514 5513

'hb

T. bl 2 P d

T. blIP

2. By using different combinations and proportions ofadditives, 3 different lubricants are manufactured.The proportions (by weight) are shown in table1.

3. The raw lubricant manufactured must be allowedto cool and settle for 5 hours.

4. The settled lubricant can be packed in eitherbottles or drums for delivery to customers.

Production targetsand working practices:It is desired to schedule the plant operation over aperiod of 2 days, during which the 5 orders as shown intable 2 must be produced for delivery to customers. Theplant operates 24 hours a day, but the bottling line onlyoperates from 9:00 to 17:00 every day.

Equipment available:1. Two 40-tonne blender for blending and three

60-tonne tanks for settling.2. A bottling line for a continuous bottling operation

with a throughput of 30 tonne/hour.3. A drumming line for a continuous drumming

operation with a throughput of 40 tonne/hour.4. No dedicated storage capacity is available for raw

lubricant, but settled lubricant may wait in thesettling tank for as long as required.

5. Unlimited storage is available for base oil,additives and all packaged products.

In this case study, the solution must meet a number ofconstraints. Examples of different types of constraintsaccording to the proposed model are shown below.Type1: time origin is zero and time horizon is 48

hours i.e. TO = zero and TH = 48.Type2: for a batch of any final product, settling has to

start immediately after blending, but packing(bottling or drumming) may start any time aftersettling because settled lubricant may wait in thesettling tank for as long as required. Both of theconstraints are temporal constraints.

Type3: the bottling line can only be operated from9:00 to 17:00 hours every day i.e. T; is 9:00 hour

and Ty is 17:00 hour every day.

Type4: because delivery is due at 17:00 hour of theday shown in table 2, all 5 orders must beproduced before the 41st hour. Furthermore, orders

a e : roportions Iy weIR' tLubricant Base Oil AdditiveA AdditiveB AdditiveC

Ll 80% 10% 10%L2 80% 15% 5%L3 75% 10% 10% 5%

a e : ro uction tareetOrder Product Amount Delivery

(tonnes) time1 Ll-bottles 80 Day 1,17hr2 L2-drums 50 Day I, I7hr3 L2·bottles 70 Day2,17hr4 Ll-bottles 80 Day2,17hr5 L3-drums 79 Day2,17hr

2. Class Declaration Section:In this section, classes are declared to handle theinputted information. The following classes aredeclared:• Machine class

a unary resource type with constraints on thename and capacity.

• Material required classa discrete resource type with constraints on thename and quantity.

• Activity classan interval activity type requiring resources suchas machines and materials. In this class, linksare made between an activity and the resources itrequires such as machine and material.

4. MainProgram Section:In this section, the ILOG library functions areinitialised and called to satisfy the constraints. If theproblem is solvable then the results are displayed.Otherwise, the message "No solution" is given.

3. Constraint Declaration Section:In this section, the problem description is used rtomodify various variables and value ranges andconstraints are declared based on the constraint model.

CASE STUDY AND RESULT DISCUSSIONThe system has been tested using several case studieswith very good results. One of these case studies ispresented below.Thelubricants manufacturing process:1. Blend base oil (BO) with a mixture of additives for

2 hours.

The Software System For SchedulingThe scheduling system was developed in C++. It readsin the problem. description and generates constraintsbased on the constraint model described earlier. It thencalls ILOG Scheduler/Solver library functions to satisfythe constraints and to generate a schedule. The systemruns on SUN workstations under UNIX. A briefoverview of the four main sections of the system isgiven below.1. Problem Definition Section:A data structure for storing the the information fromproblem description generated by the user interface isset up in this section. Global variables are defined tostore the information from the first part and a class isdeclared to store the information from the second.part.Specific information for the final product is stored inan instance of this class.

information. The general information is used to imposeconstraints on the whole production process and thespecific information is used to impose constraints onprocessing time, activities and required resources forspecific final products. The user interface produces aproblem description file for the scheduling software.

Page 4: Scheduling of multistage multiproduct chemical batch plants using a constraint-based approach

S514 Computers and Chemical Engineering Supplement (/999) S5JJ-S514

1 and 2 must be manufactured before the 17thhour. Types constraint is used twice here and Tisassigned the value of 41 in the first instance and17 in the second respectively.

TypeS: blender and tank are unary resources whichcan only be used by one activity at anyone time.

Type6: base oil and additives A, B and C are discreteresources, so at any time the total required quantityof these materials can not exceed the availablequantity.

Table 3: Output of Scheduling for case studyTime origin =0 and Time horizon =48Total number ofjobs = 35Total CPU time since IlcInit =150.02Criterion of Scheduling: Minimize the sum of durationsof all jobs.

Notation:DrumLine =DrummingLineBottLine =Boulingl.ine

The output generated by the system for this case studyis shown in table 3. It shows that both time andresources are allocated properly and all tile imposedconstraints are met. The total CPU time is 150 seconds.CST do not necessarily provide optimal solutions. Theconstraint-based system searches for a solution thatsatisfies all constraints, but the solution may not beoptimal. However, the user can set optimisation criteriaas constraints so that some or all aspects of tile solutionare optimised. For example, in this case study acriterion of minimizing the sum of durations of all jobs(i.e, minimizing tile sum of tile working time) was setand the solution satisfied this constraint.

order cycle job

11111111

222222

3333333

44444444

555555

11112222

111222

1. 1

11222

11112222

111222

BlendingLlSettleLlBottlingLlBoltlingLlBlendingLISettleLlBottlingLlBottlingLl

BlendingL2SettleL2DrummingL2BlendingL2SettleL2DrummingL2

BlendingL2SettIeL2BottlingL2BottlingL2BlendingL2SettIeL2BottlingL2

BlendingLlSeltleLlBottlingLlBottlingLlBlendingLlSeltleLlBottlingLlBottlingLl

BlendingL3SettIeL3DrummingL3BlendingL3SettIeL3DrummingL3

time

[2 --> 4][4 --> 9][9 --> 10][10 -->11][7 --> 9][9 --> 14][14 --> 15][15 --> 16]

[0 --> 2][2 --> 7][7 --> 8][6 --> 8][8 --> 13][13 --> 14]

[4 -->6][6 --> 11][11 --> 12][12 --> 13][9 --> 11][11 --> 16][16 --> 17]

[26 --> 28][28--> 33][33 --> 34][34 --> 35][31 -->33][33 --> 38][38 --> 39][39 -->40]

[14 -->16][16 -->21][21 --> 22][19 --> 21][21 --> 26][26 --> 27]

machine

Blender!Tank3Bottl.ineBottLineBlender2Tank3BottLineBottl.ine

Blender!Tank2DrumLineBlender!Tank2DrumLine

Blender!TanklBottLineBottLineBlender!TanklBottLine

Blender!TanklBottLineBottLineBlender!Tank1BottLineBottLine

Blender!TanklDrumLineBlender!Tank1DrumLine

CONCLUSIONSThis study demonstrates that tile proposed constraint­based scheduling approach for multistage multiproductchem ical batch plant is feasible. The main contributionof this paper is that a constraint-based model wascreated to represent a common class of batch plantscheduling problems and a working computer system isimplemented based on this model. This approach willneed to be further improved to solve more complicatedproblems by extending the constraint model to includeconstraints such as limited storage capacity andvariable batchsizes.

REFERENCESKondili ,E., Pantelides, C.C. and Sargent, R.W.H.,1993, A General Algorithm for Short-Term Schedulingof Batch Operations - 1. MILP Formulation, ComputersChern. Engng, Vol 17, No.2, pp . 211-277.

Shah,N., Pantelides,C.C. and Sargent,R.W.H., 1993,Optimal periodic scheduling of multipurpose batchplants, Annals of Operations Research..42(1993)193­228.

Wang,H. and Liao.L; Aug.1997, Framework ofconstraint-based modelling for cooperative decisionsystems , knowledge-Based Systems, VoI.lO, No.2, pp111-120.

ACKNOWLEDGEMENTThe authors would like to acknowledge tile contributionof Dr. B.P.Das and Dr. N.Shah, of the Centre forProcess Systems Engineering, Imperial College,London, who provided tile example which was used inthe case study of this paper.

The authors would also like to acknoledge tilecontribution of Dr. W.A.Gruver, of tile School ofEngineering Science, Simon Fraser University,Canada, who provided comments and advice on thispaper.