You are on page 1of 223

CHAPTER INDEX

Sr No. Topic Faculty


1 Optimisation & Scheduling of Batch Dr. M. S. Rao, Professor, Department
Process Plants of Chemical Engineering, DDU
2 Introduction to Batch Scheduling - 1 Dr. M. S. Rao, Professor, Department
of Chemical Engineering, DDU
3 Introduction to Batch Scheduling - 2 Dr. M. S. Rao, Professor, Department
of Chemical Engineering, DDU
4 Overview of Planning and Scheduling Dr. Munawar A. Shaik, Assistant
: Short term Scheduling for Batch Professor Department of Chemical
Plants – Discrete Time Model Engineering, IIT, Delhi
5 Short term Scheduling for Batch Dr. Munawar A. Shaik, Assistant
Plants : Slot based and Global -event Professor Department of Chemical
based Continuous – time Models Engineering, IIT, Delhi
6 Short term Scheduling for Batch Dr. Munawar A. Shaik, Assistant
Plants : Unit-Specific Event-based Professor Department of Chemical
Continuous – time Models Engineering, IIT, Delhi
7 Short term Scheduling of Continuous Dr. Munawar A. Shaik, Assistant
Plants : Industrial Case Study of Professor Department of Chemical
FMCG. Engineering, IIT, Delhi
8 Cyclic Scheduling of Continuous Dr. Munawar A. Shaik, Assistant
Plants Professor Department of Chemical
Engineering, IIT, Delhi
9 Advance Scheduling of Pulp and Dr. Munawar A. Shaik, Assistant
Paper Plant Professor Department of Chemical
Engineering, IIT, Delhi
This is page i
Printer: Opaque this

Optimization and Scheduling of Batch


Process Plants

Dr. M.Srinivasarao

16/06/2010
ii

ABSTRACT This book contains information necessary to introduce con-


cept of optimisation to the biginers. Advanced optimisation techniques nec-
essary for the practicing engineering with a special emphasis of MINLP is
discussed. Discussion on schduling of batch plants and recent advences in
the area of schduling of batch plants are also presented. Dynamic optimi-
sation and global optimisation techniques are also introduced in this book.
This is page iii
Printer: Opaque this

Contents

1 Introduction 1
1.1 Applications of Optimisation problems . . . . . . . . . . . . 1
1.2 Types of Optimization and Optimisation Problems . . . . . 3
1.2.1 Static Optimization . . . . . . . . . . . . . . . . . . 3
1.2.2 Dynamic Optimization . . . . . . . . . . . . . . . . . 4

2 Conventional optimisation techniques 7


2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.2 Search Methods . . . . . . . . . . . . . . . . . . . . . . . . . 7
2.2.1 Method of Uniform search . . . . . . . . . . . . . . . 7
2.2.2 Method of Uniform dichotomous search . . . . . . . 9
2.2.3 Method of sequential dichotomos search . . . . . . . 9
2.2.4 Fibonacci search Technique . . . . . . . . . . . . . . 11
2.3 UNCONSTRAINED OPTIMIZATION . . . . . . . . . . . . 12
2.3.1 Golden Search Method . . . . . . . . . . . . . . . . . 12
2.3.2 Quadratic Approximation Method . . . . . . . . . . 13
2.3.3 Steepest Descent Method . . . . . . . . . . . . . . . 15
2.3.4 Newton Method . . . . . . . . . . . . . . . . . . . . 16
2.4 CONSTRAINED OPTIMIZATION . . . . . . . . . . . . . . 17
2.4.1 Lagrange Multiplier Method . . . . . . . . . . . . . . 17
2.4.2 Penalty Function Method . . . . . . . . . . . . . . . 18
2.5 MATLAB BUILT-IN ROUTINES FOR OPTIMIZATION . 19
iv Contents

3 Linear Programming 21
3.1 The Simplex Method . . . . . . . . . . . . . . . . . . . . . . 23
3.2 Infeasible Solution . . . . . . . . . . . . . . . . . . . . . . . 27
3.3 Unbounded Solution . . . . . . . . . . . . . . . . . . . . . . 29
3.4 Multiple Solutions . . . . . . . . . . . . . . . . . . . . . . . 30
3.4.1 Matlab code for Linear Programming (LP) . . . . . 30

4 Nonlinear Programming 33
4.1 Convex and Concave Functions . . . . . . . . . . . . . . . . 36

5 Discrete Optimization 39
5.1 Tree and Network Representation . . . . . . . . . . . . . . . 41
5.2 Branch-and-Bound for IP . . . . . . . . . . . . . . . . . . . 42

6 Integrated Planning and Scheduling of processes 47


6.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
6.2 Plant optimization hierarchy . . . . . . . . . . . . . . . . . 47
6.3 Planning . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50
6.4 Scheduling . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51
6.5 Plantwide Management and Optimization . . . . . . . . . . 56
6.6 Resent trends in scheduling . . . . . . . . . . . . . . . . . . 58

6.6.1 State-Task Network (STN): . . . . . . . . . . . . . . 60


6.6.2 Resource –Task Network (RTN): . . . . . . . . . . . 62
6.6.3 Optimum batch schedules and problem formulations
(MILP),MINLP B&B: . . . . . . . . . . . . . . . . . 63
6.6.4 Multi-product batch plants: . . . . . . . . . . . . . . 65
6.6.5 Waste water minimization (Equalization tank super
structure): . . . . . . . . . . . . . . . . . . . . . . . . 66
6.6.6 Selection of suitable equalization tanks for controlled
‡ow: . . . . . . . . . . . . . . . . . . . . . . . . . . . 68

7 Dynamic Optimization 71
7.1 Dynamic programming . . . . . . . . . . . . . . . . . . . . . 73

8 Global Optimisation Techniques 75


8.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 75

8.2 Simulated Annealing . . . . . . . . . . . . . . . . . . . . . . 75


8.2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . 75
8.3 GA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 77
8.3.1 Introduction . . . . . . . . . . . . . . . . . . . . . . 77
8.3.2 De…nition . . . . . . . . . . . . . . . . . . . . . . . . 78
8.3.3 Coding . . . . . . . . . . . . . . . . . . . . . . . . . 78
8.3.4 Fitness . . . . . . . . . . . . . . . . . . . . . . . . . . 79
8.3.5 Operators in GA . . . . . . . . . . . . . . . . . . . . 79
Contents v

8.4 Di¤erential Evolution . . . . . . . . . . . . . . . . . . . . . 81


8.4.1 Introduction . . . . . . . . . . . . . . . . . . . . . . 81
8.4.2 DE at a Glance . . . . . . . . . . . . . . . . . . . . . 82
8.4.3 Applications of DE . . . . . . . . . . . . . . . . . . . 85
8.5 Interval Mathematics . . . . . . . . . . . . . . . . . . . . . . 86
8.5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . 86
8.5.2 Interval Analysis . . . . . . . . . . . . . . . . . . . . 87
8.5.3 Real examples . . . . . . . . . . . . . . . . . . . . . 87
8.5.4 Interval numbers and arithmetic . . . . . . . . . . . 90
8.5.5 Global optimization techniques . . . . . . . . . . . . 91
8.5.6 Constrained optimization . . . . . . . . . . . . . . . 95
8.5.7 References . . . . . . . . . . . . . . . . . . . . . . . . 95

9 A GAMS Tutorial 99
9.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . 99
9.2 Structure of a GAMS Model . . . . . . . . . . . . . . . . . . 102
9.3 Sets . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103
9.4 Data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 105
9.4.1 Data Entry by Lists . . . . . . . . . . . . . . . . . . 105
9.4.2 Data Entry by Tables . . . . . . . . . . . . . . . . . 106
9.4.3 Data Entry by Direct Assignment . . . . . . . . . . 107
9.5 Variables . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
9.6 Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108
9.6.1 Equation Declaration . . . . . . . . . . . . . . . . . 109
9.6.2 GAMS Summation (and Product) Notation . . . . . 109
9.6.3 Equation De…nition . . . . . . . . . . . . . . . . . . 109

9.7 Objective Function . . . . . . . . . . . . . . . . . . . . . . . 111


9.8 Model and Solve Statements . . . . . . . . . . . . . . . . . . 111
9.9 Display Statements . . . . . . . . . . . . . . . . . . . . . . . 112
9.9.1 The ’.lo, .l, .up, .m’Database . . . . . . . . . . . . . 112
9.9.2 Assignment of Variable Bounds and/or Initial Values 113
9.9.3 Transformation and Display of Optimal Values . . . 113
9.10 GAMS Output . . . . . . . . . . . . . . . . . . . . . . . . . 114
9.10.1 Echo Prints . . . . . . . . . . . . . . . . . . . . . . . 115
9.11 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . 116

A The First Appendix 119


vi Contents
This is page vii
Printer: Opaque this

Preface

Optimization has pervaded all spheres of human endeavor and process in-
dustris are not an expection. Impact of optimisation has increased in last
…ve decades. Modern society lives not only in an environment of intense
competition but is also constrained to plan its growth in a sustainable
manner with due concern for conservation of resources. Thus, it has be-
come imperative to plan, design, operate, and manage resources and assets
in an optimal manner. Early approaches have been to optimize individual
activities in a standalone manner, however, the current trend is towards an
integrated approach: integrating synthesis and design, design and control,
production planning, scheduling, and control. The functioning of a system
may be governed by multiple performance objectives. Optimization of such
systems will call for special strategies for handling the multiple objectives
to provide solutions closer to the systems requirement.
Optimization theory had evolved initially to provide generic solutions to
optimization problems in linear, nonlinear, unconstrained, and constrained
domains. These optimization problems were often called mathematical pro-
gramming problems with two distinctive classi…cations, namely linear and
nonlinear programming problems. Although the early generation of pro-
gramming problems were based on continuous variables, various classes
of assignment and design problems required handling of both integer and
continuous variables leading to mixed integer linear and nonlinear pro-
gramming problems (MILP and MINLP). The quest to seek global optima
has prompted researchers to develop new optimization approaches which
do not get stuck at a local optimum, a failing of many of the mathemat-
ical programming methods. Genetic algorithms derived from biology and
viii Preface

simulated annealing inspired by optimality of the annealing process are


two such potent methods which have emerged in recent years. The devel-
opments in computing technology have placed at the disposal of the user
a wide array of optimization codes with varying degrees of rigor and so-
phistication. The challenges to the user are manyfold. How to set up an
optimization problem? What is the most suitable optimization method to
use? How to perform sensitivity analysis? An intrepid user may also want
to extend the capabilities of an existing optimization method or integrate
the features of two or more optimization methods to come up with more
e¢ cient optimization methodologies.
Substantial progress was made in the 1950s and 1960s with the develop-
ment of algorithms and computer codes to solve large mathematical pro-
gramming problems. The number of applications of these tools in the 1970s
was less then expected, however, because the solution procedures formed
only a small part of the overall modeling e¤ort. A large part of the time
required to develop a model involved data preparation and transformation
and report preparation. Each model required many hours of analyst and
programming time to organize the data and write the programs that would
transform the data into the form required by the mathematical program-
ming optimizers. Furthermore, it was di¢ cult to detect and eliminate errors
because the programs that performed the data operations were only acces-
sible to the specialist who wrote them and not to the analysts in charge of
the project.
GAMS was developed to improve on this situation by: â) Providing a
high-level language for the compact representation of large and complex
models b) Allowing changes to be made in model speci…cations simply
and safely c) â Allowing unambiguous statements of algebraic relation-
ships. d)Permitting model descriptions that are independent of solution
algorithms. This learning matrial gives a brief introduction to this pro-
gramming language by providing an introductory chapter.
Here is a detailed summary of the contents of the course material.
Chapter 1, Introduction chapter introduces the concept of optimisation
to the …rst times to this subject. It also discribes various optimisation
techniques and their classi…cation. Various optimisation problems are also
discussed in this chapter.
Chapter 2, Conventional optimisation techniques are presented in this
chapter. Search methods is presented …rst followed by discussoin on con-
trained and unconstrained optimisation techniques.
Chapter 3, This chapter will introduce one of the widely used technique
that is linear programming. A special emphais is given to simplex method
in this chapter.
Chapter 4, A brief review of nonlinear programming is presented in this
chapter.functions of convex and concave functions and concept of convexi-
…cation is given in this chapter.
Preface ix

Chapter 5, Discre optimisation which is extremly important from this


course view point is presented in this chapter.Net work representation and
Barnach and Bound methods are discussed in detail with suitable examples
in this chapter.
Chapter 6, Integrated planning and scheduling of the process are pre-
sented in this chapter. Resent advances in the area of scheduling and opti-
misatio with respct to batch process plants is presented in brief.
Chapter 7,Dynamic optimisation as a concept is indroduced in this chap-
ter. Suitable demonstration exples are presented during the course.
Chapter 8, Various global optimisation techniques are introduced here
in this chapter. A special emphais is given to Gnetic algorthms, simulated
annealing and Di¤arential evaluation. A detailed introduction discussion is
presented on the topic of interval Mathematics.
Capter 9, A tutorial on A GAMS Tutorial presented in the …nal chapter
of this book.
x Preface
This is page 1
Printer: Opaque this

1
Introduction

Optimization involves …nding the minimum/maximum of an objective func-


tion f (x) subject to some constraint x b S. If there is no constraint for
x to satisfy or, equivalently, S is the universe— then it is called an uncon-
strained optimization; otherwise, it is a constrained optimization. In this
chapter, we will cover several unconstrained optimization techniques such
as the golden search method, the quadratic approximation method, the
Nelder–Mead method, the steepest descent method, the Newton method,
the simulated-annealing (SA) method, and the genetic algorithm (GA). As
for constrained optimization, we will only introduce the MATLAB built-in
routines together with the routines for unconstrained optimization. Note
that we don’t have to distinguish maximization and minimization because
maximizing f (x) is equivalent to minimizing -f (x) and so, without loss of
generality, we deal only with the minimization problems.

1.1 Applications of Optimisation problems


Optimization problems arise in almost all …elds where numerical informa-
tion is processed (science, engineering, mathematics, economics, commerce,
etc.). In science, optimization problems arise in data …tting, variational
principles, solution of di¤erential and integral equations by expansion meth-
ods, etc. Engineering applications are in design problems, which usually
have constraints in the sense
2 1. Introduction

that variables cannot take arbitrary values. For example, while design-
ing a bridge, an engineer will be interested in minimizing the cost, while
maintaining a certain minimum strength for the structure. Optimizing the
surface area for a given volume of a reactor is another example of con-
strained optimization. While most formulations of optimization problems
require the global minimum to be found, mosi of the methods are only able
to …nd a local minimum. A function has a local minimum, at a point where
it assumes the lowest value in a small neighbourhood of the point, which
is not at the boundary of that neighbourhood.
To …nd a global minimum we normally try a heuristic approach where
several local minima are found by repeated trials with di¤erent starting
values or by using di¤erent techniques. The di¤erent starting values may
be obtained by perturbing the local minimizers by appropriate amounts.
The smallest of all known local minima is then assumed to be the global
minimum. This procedure is obviously unreliable, since it is impossible to
ensure that all local minima have been found. There is always the possi-
bility that at some unknown local minimum, the function assumes an even
smaller value. Further, there is no way of verifying that the point so ob-
tained is indeed a global minimum, unless the value of the function at the
global minimum is known independently. On the other hand, if a point i
s claimed to be the solution of a system of non-linear equations, then it
can, in principle, be veri…ed by substituting in equations to check whether
all the equations are satis…ed or not. Of course, in practice, the round-o¤
error introduces some uncertainty, but that can be overcome.
Owing to these reasons, minimization techniques are inherently unreli-
able and should be avoided if the problem can be reformulated to avoid
optimization. However, there are problems for which no alternative solu-
tion method is known and we have to use these techniques. The following
are some examples.
1. Not much can be said about the existence and uniqueness of either
the
2. It is possible that no minimum of either type exists, when the function
is
3. Even if the function is bounded from below, the minimum may not
exist
4. Even if a minimum exists, it may not be unique; for exarnple,Xx) =
sin x global or the local minimum of a function of several variables.
not bounded from below [e.g.,Ax) = XI. [e.g.,Ax) = e"]. has an in…nite
number of both local and global minima.
5. Further, in…nite number of local minimum may exist, even when there
is no global minimum [e.g.,Ax) = x + 2 sin x].
6. If the function or its derivative is not continuous, then the situation
could be even more complicated. For example,Ax) = & has a global mini-
mum at x = 0, which is not a local minimum [i.e.,Ax) = 01.
1.2 Types of Optimization and Optimisation Problems 3

Optimization in chemical process industries infers the selection of equip-


ment and operating conditions for the production of a given material so
that the pro…t will be maximum. This could be interpreted as meaning
the maximum output of a particular substance for a given capital outlay,
or the minimum investment for a speci…ed production rate. The former
is a mathematical problem of evaluating the appropriate values of a set
of variables to maximize a dependent variable, whereas the latter may be
considered to be one of locating a minimum value. However, in terms of
pro…t, both types of problems are maximization problems, and the solu-
tion of both is generally accomplished by means of an economic balance
(trade-@ between the capital and operating costs. Such a balance can be
represented as shown in Fig.(??), in which the capital, the operating cost,
and the total cost are plotted againstf, which is some function of the size
of the equipment. It could be the actual size of the equipment; the num-
ber of pieces of equipment, such as the number of stirred tank reactors in
a reactor battery; the frames in a …lter press; some parameter related to
the size of the equipment, such as the re‡ux ratio in a distillation unit; or
the solvent-to-feed ratio in a solvent extraction process. Husain and Gan-
giah (1976) reported some of the optimization techniques that are used for
chemical engineering applications.

1.2 Types of Optimization and Optimisation


Problems

Optimization in the chemical …eld can be divided into two classes:


1. Static optimization
2. Dynamic optimization

1.2.1 Static Optimization


Static optimization is the establishment of the most suitable steady-state
operation conditions of a process. These include the optimum size of equip-
ment and production levels, in addition to temperatures, pressures, and ‡ow
rates. These can be established by setting up the best possible mathemat-
ical model of the process, which is maximized by some suitable technique
to give the most favourable operating conditions. These conditions would
be nominal conditions and would not take into account the ‡uctuations in
the process about these nominal conditions.
With steady-state optimization (static Optimization), as its name im-
plies, the process is assumed to be under steady-state conditions, and
may instantaneously be moved to a new steady state, if changes in load
conditions demand so, with the aid of a conventional or an optimization
4 1. Introduction

computer. Steady-state optimization is applicable to continuous processes,


which attain a new steady state after a change in manipulated inputs within
an acceptable time interval. The goal of static optimization is to develop
and realize an optimum modelfor the process in question.

1.2.2 Dynamic Optimization


Dynamic optimization the establishment of the best procedure for correct-
ing the ‡uctuations in a process used in the static optimization analysis.
It requires knowledge of the dynamic characteristics of the equipment and
also necessitates predicting the best way in which a change in the process
conditions can be corrected. In reality, it is an extension of the automatic
control analysis of a process.
As mentioned earlier, static optimization is applicable to continuous
processes which attain a new steady state after a change in manipulated
inputs within an acceptable time interval. With unsteady-state (dynamic)
optimization, the objective is not only to maintain a process at an optimum
level under steady-state conditions, but also to seek the best path for its
transition from one steady state to another. The optimality function then
becomes a time function, and the objective is to maximize or minimize the
time-averaged performance criterion. Although similar to steadystate opti-
mization in some respects, dynamic optimization is more elaborate because
it involves a time-averaged function rather than individual quantities. The
goal of control in this case is to select at any instant of time a set of ma-
nipulated variablesthat will cause the controlled system to behave in an
optimum manner in the face of any set of disturbances.
Optimum behaviour is de…ned as a set of output variables ensuring the
maximization of a certain objective or return function, or a change in the
output variables over a de…nite time interval such that a predetermined
functional value of these output variables is maximized or minimized.
As mentioned earlier, the goal of static optimization is to develop and
realize an optimum model for the process in question, whereas dynamic
optimization seeks to develop and realize an optimum control system for
the process. In other words, static optimization is an optimum model for
the process, whereas dynamic optimization is the optimum control system
for the process.
Optimization is categorized into the following …ve groups:
1)Analytical methods
(a) Direct search (without constraints)
(b) Lagrangian multipliers (with constraints)
(c) Calculus of variations (examples include the solution of the Euler
equation, optimum temperature conditions for reversible exothermic reac-
tions in plug-‡ow beds, optimum temperature conditions for chemical reac-
tors in the case of constraints on temperature range, Multilayer adiabatic
reactors, etc.)
1.2 Types of Optimization and Optimisation Problems 5

(d) Pontryagin’s maximum principle (automatic control)


2. Mathematical programming:
(a) Geometric programming (algebraic functions)
(b) Linear programming (applications include the manufacture of prod-
ucts for maximum return from di¤erent raw materials, optimum
utilization of equipment, transportation problems, etc.)
(c) Dynamic programming (multistage processes such as distillation, ex-
traction, absorption, cascade reactors, multistage adiabatic beds, interact-
ing chain of reactors, etc.; Markov processes, etc.)
3. Gradient methods:
(a) Method of steepest descent (ascent)
(b) Sequential simplex method (applications include all forms of prob-
lems such as optimization of linear and non-linear functions
with and without linear and non-linear constraints, complex chemical
engineering processes, single and cascaded interacting reactors)
4. Computer control and model adaptation:
5. Statistical optimization: All forms (complex chemical engineering sys-
tems)
(a) Regression analysis (non-deterministic systems)
(b) Correlation analysis (experimental optimization and designs: Bran-
don Though, for completeness, all the methods of optimization are listed
above, let us restrict our discussion to some of the most important and
widely used methods of optimization.

Optimization problems can be divided into the following broad cate-


gories depending on the type of decision variables, objective function(s),
and constraints.
Linear programming (LP): The objective function and constraints are
linear. The decision variables involved are scalar and continuous.
Nonlinear programming (NLP): The objective function and/or con-
straints are nonlinear. The decision variables are scalar and continuous.
Integer programming (IP): The decision variables are scalars and inte-
gers.
Mixed integer linear programming (MILP): The objective function and
constraints are linear. The decision variables are scalar; some of them are
integers whereas others are continuous variables.
Mixed integer nonlinear programming (MINLP): A nonlinear program-
ming problem involving integer as well as continuous decision variables.
Discrete optimization: Problems involving discrete (integer) decision
variables. This includes IP, MILP, and MINLPs.
Optimal control: The decision variables are vectors.
Stochastic programming or stochastic optimization: Also termed op-
timization under uncertainty. In these problems, the objective function
and/or the constraints have uncertain (random) variables. Often involves
the above categories as subcategories.
6 1. Introduction

Multiobjective optimization: Problems involving more than one objec-


tive. Often involves the above categories as subcategories.
This is page 7
Printer: Opaque this

2
Conventional optimisation techniques

2.1 Introduction
In this chapter, we will introduce you some of the very well known con-
ventional optimisation techniques. A very brief review of search methods
followed by gradient based methods are presented. The compilation is no
way exhaustive. Matlab programs for some of the optimisation techniques
are also presented in this chapter.

2.2 Search Methods


Many a times the mathematical model for evaluation of the objective func-
tion is not available. To evaluate the value of the objective funciton an
experimental run has to be conducted. Search procedures are used to de-
termine the optimal value of the variable decision variable.

2.2.1 Method of Uniform search


Let us assume that we want to optimise the yield y and only four exper-
iments are allowed due to certain plant conditions. An unimodel function
can be represented as shown in the …gure where the peak is at 4.5. This
maximum is what we are going to …nd. The question is how close we can
react to this optimum by systematic experimentation.
8 2. Conventional optimisation techniques

Optimum
Is in this
area

0 2 4 6 8 10
FIGURE 2.1. Method of uniform search
2.2 Search Methods 9

The most obvious way is to place the four experiments equidistance over
the interval that is at 2,4,6 and 8. We can see from the …gure that the value
at 4 is higher than the value of y at 2. Since we are dealing with a unimodel
function the optimal value can not lie between x=0 and x=2. By similar
reasoning the area between x=8 and 10 can be eleminated as well as that
between 6 and 8. the area remaining is area between 2 and 6.
If we take the original interval as L and the F as fraction of original
interval left after performing N experiments then N experiments devide
the interval into N+1 intervals. Width of each interval is NL+1 OPtimum
can be speci…ed in two of these intervals.That leaves 40% area in the given
example

2L 1 2
F = =
N +1 L N +1
2
= = 0:4
4+1

2.2.2 Method of Uniform dichotomous search


The experiments are performed in pairs and these pairs are spaced evenly
over the entire intervel. For the problem these pairs are speci…ed as 3.33
and 6.66. From the …gure it can be seen that function around 3.33 it can be
observed that the optimum does not lie between 0 and 3.33 and similarly
it does not lie between 6.66 and 10. The total area left is between 3.33 and
6.66. The original region is devided into N2 + 1 intervals of the width NL+1
2
The optimum is location in the width of one interval There fore

L 1 2
F = N
=
2 +1 L N +2
2
= = 0:33
4+2

2.2.3 Method of sequential dichotomos search


The sequential search is one where the investigator uses the information
availble from the previous experiments before performing the next exper-
iment. Inour exaple perform the search around the middle of the search
space. From the infromation available discard the region between 5 and 10.
Then perform experiment between 2.5 and discard the region between 0
and 2.5 the region lect out is between 2.5 and 5 only. This way the fraction
left out after each set of experiments become half that of the region left
out. it implies that
10 2. Conventional optimisation techniques

Optimum
Is in this
area

0 2 4 6 8 10

Optimum
Is in this
area

0 2 4 6 8 10
2.2 Search Methods 11

1
F = N
22
1
= = 0:25
22

2.2.4 Fibonacci search Technique


A more e¢ cient sequential search technique is Fibonacci techniquie. The
Fibonacci series is considered as Note that the nuber in the sequence is
sum of previous two numbers.

xn = xn 1 + xn 2
n 2

The series is 1 2 3 5 8 10 ... To perform the search a pair of experiments


are performed equidistance from each end of the interval. The distance d1
is determined from the follwing expression.

FN 2
d1 = L
FN 1

Where N is number of experiments and L is total length. IN our problem


L is 10, N is 4 and FN 2 is 2 and FN =5 . First two experiments are run 4
units away from each end. From the result the area between 6 and 10 can
be eliminated.

2
d1 = 10 = 4
5
The area remaining is between 0 and 6 the new length will be 6 and new
value of d2 is obtained by substituting N-1 for N

FN 3 F1 1
d2 = L= L= 6=2
FN 1 F3 3
The next pair of experiments are performed around 2 and the experi-
ment at 4 need not be performed as we have allready done it. This is the
advantage of Fibonacci search the remaining experiment can be performed
as dicocomos search to identify the optimal reagion around 4. This terns
out to be the region between 4 and 6. The fraction left out is

1 1 1
F = = = = 0:2
FN F4 5
12 2. Conventional optimisation techniques

2.3 UNCONSTRAINED OPTIMIZATION


2.3.1 Golden Search Method
This method is applicable to an unconstrained minimization problem such
that the solution interval [a, b] is known and the objective function f (x) is
unimodal within the interval; that is, the sign of its derivative f (x) changes
at most once in [a, b] so that f (x) decreases/increases monotonically for
[a, xo]/[xo, b], where xo is the solution that we are looking for. The so-
called golden search procedure is summarized below and is cast into the
routine “opt_gs()”.We made a MATLAB program “nm711.m”, which uses
this routine to …nd the minimum point of the
objective function

(x2 4)2
f (x) = 1 (2.1)
8
GOLDEN SEARCH PROCEDURE
Step 1. Pick up the two points p c = a + (1 - r)h and d = a + rh inside
the interval [a, b], where r = ( 5 - 1)/2 and h = b - a.
Step 2. If the values of f (x) at the two points are almost equal [i.e., f (a)
f (b)] and the width of the interval is su¢ ciently small (i.e., h 0), then
stop the iteration to exit the loop and declare xo = c or xo = d depending
on whether f (c) < f(d) or not. Otherwise, go to Step 3.
Step 3. If f (c) < f(d), let the new upper bound of the interval b to d;
otherwise, let the new lower bound of the interval a to c. Then, go to Step
1.
function [xo,fo] = opt_gs(f,a,b,r,TolX,TolFun,k)
h = b - a; rh = r*h; c = b - rh; d = a + rh;
fc = feval(f,c); fd = feval(f,d);
if k <= 0 j (abs(h) < TolX & abs(fc - fd) < TolFun)
if fc <= fd, xo = c; fo = fc;
else xo = d; fo = fd;
end
if k == 0, fprintf(’Just the best in given # of iterations’), end
else
if fc < fd, [xo,fo] = opt_gs(f,a,d,r,TolX,TolFun,k - 1);
else [xo,fo] = opt_gs(f,c,b,r,TolX,TolFun,k - 1);
end
end
%nm711.m to perform the golden search method
f711 = inline(’(x.*x-4).^2/8-1’,’x’);
a = 0; b = 3; r =(sqrt(5)-1)/2; TolX = 1e-4; TolFun = 1e-4;
MaxIter = 100;
[xo,fo] = opt_gs(f711,a,b,r,TolX,TolFun,MaxIter)
Note the following points about the golden search procedure.
2.3 UNCONSTRAINED OPTIMIZATION 13

At every iteration, the new interval width is

b c=b (a + (1 r)(b a)) = rhord a = a + rh a = rh

so that it becomes r times the old interval width (b - a = h).


The golden ratio r is …xed so that a point c1 = b1 - rh1 = b - r2h in the
new interval [c, b] conforms with d = a + rh = b - (1 - r)h, that is,

r2 = 1 r; r2 + r 1 = 0; (2.2)
p p
1+ 1+4 1+ 5
r = = (2.3)
2 2

2.3.2 Quadratic Approximation Method


The idea of this method is to (a) approximate the objective function f
(x) by a quadratic function p2(x) matching the previous three (estimated
solution) points and (b) keep updating the three points by replacing one
of them with the minimum point of p2(x). More speci…cally, for the three
points
{(x0, f0), (x1, f1), (x2, f2)} with x0 < x1 < x2
we …nd the interpolation polynomial p2(x) of degree 2 to …t them and
replace one of them with the zero of the derivative— that is, the root of p’2
(x) = 0 :

fo x21 x22 + f1 x22 x20 + f2 x20 x21


x = x3 = (2.4)
2 [o (x1 x2 ) + f1 (x2 x0 ) + f2 (x0 x1 )]
In particular, if the previous estimated solution points are equidistant
with an equal distance h (i.e., x2 - x1 = x1 - x0 = h), then this formula
becomes

fo x21 x22 + f1 x22 x20 + f2 x20 x21


x = x3 = j x1=x+h (2.5)
2 [o (x1 x2 ) + f1 (x2 x0 ) + f2 (x0 x1 )] x2=x1+h

We keep updating the three points this way until jx2 - x0j 0 and/or
jf (x2) - f (x0)j 0, when we stop the iteration and declare x3 as the
minimum point. The rule for updating the three points is as follows.
1. In case x0 < x3 < x1, we take {x0, x3, x1} or {x3, x1, x2} as the new
set of three points depending on whether f (x3) < f(x1) or not.
2. In case x1 < x3 < x2, we take {x1, x3, x2} or {x0, x1, x3} as the new
set of three points depending on whether f (x3) f (x1) or not.
This procedure, called the quadratic approximation method, is cast into
the MATLAB routine “opt_quad()”, which has the nested (recursive call)
structure. We made the MATLAB program “nm712.m”, which uses this
14 2. Conventional optimisation techniques

routine to …nd the minimum point of the objective function (7.1.1) and
also uses the MATLAB built-in routine “fminbnd()” to …nd it for cross-
check.
(cf) The MATLAB built-in routine “fminbnd()”corresponds to “fmin()”
in the MATLAB of version.5.x.
function [xo,fo] = opt_quad(f,x0,TolX,TolFun,MaxIter)
%search for the minimum of f(x) by quadratic approximation
method
if length(x0) > 2, x012 = x0(1:3);
else
if length(x0) == 2, a = x0(1); b = x0(2);
else a = x0 - 10; b = x0 + 10;
end
x012 = [a (a + b)/2 b];
end
f012 = f(x012);
[xo,fo] = opt_quad0(f,x012,f012,TolX,TolFun,MaxIter);
function [xo,fo] = opt_quad0(f,x012,f012,TolX,TolFun,k)
x0 = x012(1); x1 = x012(2); x2 = x012(3);
f0 = f012(1); f1 = f012(2); f2 = f012(3);
nd = [f0 - f2 f1 - f0 f2 - f1]*[x1*x1 x2*x2 x0*x0; x1 x2 x0]’;
x3 = nd(1)/2/nd(2); f3 = feval(f,x3); %Eq.(7.1.4)
if k <= 0 j abs(x3 - x1) < TolX j abs(f3 - f1) < TolFun
xo = x3; fo = f3;
if k == 0, fprintf(’Just the best in given # of iterations’), end
else
if x3 < x1
if f3 < f1, x012 = [x0 x3 x1]; f012 = [f0 f3 f1];
else x012 = [x3 x1 x2]; f012 = [f3 f1 f2];
end
else
if f3 <= f1, x012 = [x1 x3 x2]; f012 = [f1 f3 f2];
else x012 = [x0 x1 x3]; f012 = [f0 f1 f3];
end
end
[xo,fo] = opt_quad0(f,x012,f012,TolX,TolFun,k - 1);
end
%nm712.m to perform the quadratic approximation method
clear, clf
f711 = inline(’(x.*x - 4).^2/8-1’, ’x’);
a = 0; b = 3; TolX = 1e-5; TolFun = 1e-8; MaxIter = 100;
[xoq,foq] = opt_quad(f711,[a b],TolX,TolFun,MaxIter)
%minimum point and its function value
[xob,fob] = fminbnd(f711,a,b) %MATLAB built-in function
2.3 UNCONSTRAINED OPTIMIZATION 15

2.3.3 Steepest Descent Method


This method searches for the minimum of an N-dimensional objective func-
tion in the direction of a negative gradient
T
@f (x) @f (x) @f (x)
g(x) = rf (x) = :::: (2.6)
@x1 @x2 @xN
with the step-size k (at iteration k) adjusted so that the function value
is minimized along the direction by a (one-dimensional) line search tech-
nique like the quadratic approximation method. The algorithm of the steep-
est descent method is summarized in the following box and cast into the
MATLAB routine “opt_steep()”.
We made the MATLAB program “nm714.m” to minimize the objective
function (7.1.6) by using the steepest descent method.
STEEPEST DESCENT ALGORITHM
Step 0. With the iteration number k = 0, …nd the function value f0 = f
(x0) for the initial point x0.
Step 1. Increment the iteration number k by one, …nd the step-size k 1
along the direction of the negative gradient -gk-1 by a (one-dimensional)
line search like the quadratic approximation method.
gk 1
k 1 = ArgM in f (xk 1 ) (2.7)
jjgk 1jj
Step 2. Move the approximate minimum by the step-size k-1 along the
direction of the negative gradient -gk-1 to get the next point

xk = xk 1 k 1gk 1=jjgk 1jj


Step 3. If xk xk-1 and f (xk) f (xk-1), then declare xk to be the
minimum and terminate the procedure. Otherwise, go back to step 1.
function [xo,fo] = opt_steep(f,x0,TolX,TolFun,alpha0,MaxIter)

% minimize the ftn f by the steepest descent method.


%input: f = ftn to be given as a string ’f ’
% x0 = the initial guess of the solution
%output: x0 = the minimum point reached
% f0 = f(x(0))
if nargin < 6, MaxIter = 100; end %maximum # of iteration
if nargin < 5, alpha0 = 10; end %initial step size
if nargin < 4, TolFun = 1e-8; end %jf(x)j < TolFun wanted
if nargin < 3, TolX = 1e-6; end %jx(k)- x(k - 1)j<TolX wanted
x = x0; fx0 = feval(f,x0); fx = fx0;
alpha = alpha0; kmax1 = 25;
warning = 0; %the # of vain wanderings to …nd the optimum
step size
16 2. Conventional optimisation techniques

for k = 1: MaxIter
g = grad(f,x); g = g/norm(g); %gradient as a row vector
alpha = alpha*2; %for trial move in negative gradient direction
fx1 = feval(f,x - alpha*2*g);
for k1 = 1:kmax1 %…nd the optimum step size(alpha) by line
search
fx2 = fx1; fx1 = feval(f,x-alpha*g);
if fx0 > fx1+TolFun & fx1 < fx2 - TolFun %fx0 > fx1 < fx2
den = 4*fx1 - 2*fx0 - 2*fx2; num = den - fx0 + fx2; %Eq.(7.1.5)
alpha = alpha*num/den;
x = x - alpha*g; fx = feval(f,x); %Eq.(7.1.9)
break;
else alpha = alpha/2;
end
end
if k1 >= kmax1, warning = warning + 1; %failed to …nd opti-
mum step size
else warning = 0;
end
if warning >= 2j(norm(x - x0) < TolX&abs(fx - fx0) < TolFun),
break; end
x0 = x; fx0 = fx;
end
xo = x; fo = fx;
if k == MaxIter, fprintf(’Just best in %d iterations’,MaxIter),
end
%nm714
f713 = inline(’x(1)*(x(1) - 4 - x(2)) + x(2)*(x(2)- 1)’,’x’);
x0 = [0 0], TolX = 1e-4; TolFun = 1e-9; alpha0 = 1; MaxIter
= 100;
[xo,fo] = opt_steep(f713,x0,TolX,TolFun,alpha0,MaxIter)

2.3.4 Newton Method


Like the steepest descent method, this method also uses the gradient to
search for the minimum point of an objective function. Such gradient-based
optimization methods are supposed to reach a point at which the gradient
is (close to) zero. In this context, the optimization of an objective function
f (x) is equivalent to …nding a zero of its gradient g(x), which in general is a
vector-valued function of a vector-valued independent variable x. Therefore,
if we have the gradient function g(x) of the objective function f (x), we can
solve the system of nonlinear equations g(x) = 0 to get the minimum of f
(x) by using the Newton method.
The matlabcode for the same is provided below
xo = [3.0000 2.0000], ans = -7
2.4 CONSTRAINED OPTIMIZATION 17

%nm715 to minimize an objective ftn f(x) by the Newton method.


clear, clf
f713 = inline(’x(1).^2 - 4*x(1) - x(1).*x(2) + x(2).^2 - x(2)’,’x’);
g713 = inline(’[2*x(1) - x(2) - 4 2*x(2) - x(1) - 1]’,’x’);
x0 = [0 0], TolX = 1e-4; TolFun = 1e-6; MaxIter = 50;
[xo,go,xx] = newtons(g713,x0,TolX,MaxIter);
xo, f713(xo) %an extremum point reached and its function
value
The Newton method is usually more e¢ cient than the steepest descent
method if only it works as illustrated above, but it is not guaranteed to
reach the minimum point. The decisive weak point of the Newton method
is that it may approach one of the extrema having zero gradient, which is
not necessarily a (local) minimum, but possibly a maximum or a saddle
point.

2.4 CONSTRAINED OPTIMIZATION


In this section, only the concept of constrained optimization is introduced.

2.4.1 Lagrange Multiplier Method


A class of common optimization problems subject to equality constraints
may be nicely handled by the Lagrange multiplier method. Consider an
optimization problem with M equality constraints.

M inf (x) (2.8)

h1 (x)
h2 (x)
h(x) = h3 (x) = 0
:
h4 (x)
According to the Lagrange multiplier method, this problem can be con-
verted to the following unconstrained optimization problem:
M
X
T
M inl(x; ) = f (x) + h(x) = f (x) + m hjm (x)
m=1

The solution of this problem, if it exists, can be obtained by setting the


derivatives of this new objective function l(x, ) with respect to x and to
zero: Note that the solutions for this system of equations are the extrema of
the objective function. We may know if they are minima/maxima, from the
18 2. Conventional optimisation techniques

positive/negative- de…niteness of the second derivative (Hessian matrix) of


l(x, ) with respect to x.
Inequality Constraints with the Lagrange Multiplier Method. Even though
the optimization problem involves inequality constraints like gj (x) 0, we
can convert them to equality constraints by introducing the (nonnegative)
slack variables y2j

gj (x) + yj2 = 0 (2.9)


Then, we can use the Lagrange multiplier method to handle it like an
equalityconstrained problem.

2.4.2 Penalty Function Method


This method is practically very useful for dealing with the general con-
strained optimization problems involving equality/inequality constraints.
It is really attractive for optimization problems with fuzzy or loose con-
straints that are not so strict with zero tolerance.
The penalty function method consists of two steps. The …rst step is to
construct a new objective function by including the constraint terms in such
a way that violating the constraints would be penalized through the large
value of the constraint terms in the objective function, while satisfying the
constraints would not a¤ect the objective function.
The second step is to minimize the new objective function with no con-
straints by using the method that is applicable to unconstrained optimiza-
tion problems, but a non-gradient-based approach like the Nelder method.
Why don’t we use a gradient-based optimization method? Because the in-
equality constraint terms vm m(gm(x)) attached to the objective function
are often determined to be zero as long as x stays inside the (permissible)
region satisfying the corresponding constraint (gm(x) 0) and to increase
very steeply (like m(gm(x)) = exp(emgm(x)) as x goes out of the region;
consequently, the gradient of the new objective function may not carry use-
ful information about the direction along which the value of the objective
function decreases.
From an application point of view, it might be a good feature of this
method that we can make the weighting coe¢ cient (wm,vm, and em) on
each penalizing constraint term either large or small depending on how
strictly it should be satis…ed.
The Matlab code for this method is given below
%nm722 for Ex.7.3
% to solve a constrained optimization problem by penalty ftn
method.
clear, clf
f =’f722p’;
x0=[0.4 0.5]
2.5 MATLAB BUILT-IN ROUTINES FOR OPTIMIZATION 19

TolX = 1e-4; TolFun = 1e-9; alpha0 = 1;


[xo_Nelder,fo_Nelder] = opt_Nelder(f,x0) %Nelder method
[fc_Nelder,fo_Nelder,co_Nelder] = f722p(xo_Nelder) %its re-
sults
[xo_s,fo_s] = fminsearch(f,x0) %MATLAB built-in fminsearch()
[fc_s,fo_s,co_s] = f722p(xo_s) %its results
% including how the constraints are satis…ed or violated
xo_steep = opt_steep(f,x0,TolX,TolFun,alpha0) %steepest de-
scent method
[fc_steep,fo_steep,co_steep] = f722p(xo_steep) %its results
[xo_u,fo_u] = fminunc(f,x0); % MATLAB built-in fminunc()
[fc_u,fo_u,co_u] = f722p(xo_u) %its results
function [fc,f,c] = f722p(x)
f=((x(1)+ 1.5)^2 + 5*(x(2)- 1.7)^2)*((x(1)- 1.4)^2 + .6*(x(2)-
.5)^2);
c=[-x(1); -x(2); 3*x(1) - x(1)*x(2) + 4*x(2) - 7;
2*x(1)+ x(2) - 3; 3*x(1) - 4*x(2)^2 - 4*x(2)]; %constraint vec-
tor
v=[1 1 1 1 1]; e = [1 1 1 1 1]’; %weighting coe¢ cient vector
fc = f +v*((c > 0).*exp(e.*c)); %new objective function

2.5 MATLAB BUILT-IN ROUTINES FOR

OPTIMIZATION
In this section, we introduce some MATLAB built-in unconstrained op-
timization routinesincluding “fminsearch()” and “fminunc()” to the same
problem, expecting that their nuances will be clari…ed. Our intention is
not to compare or evaluate the performances of these sophisticated rou-
tines, but rather to give the readers some feelings for their functional
di¤erences.We also introduce the routine “linprog()”implementing Linear
Programming (LP) scheme and “fmincon()” designed for attacking the
(most challenging) constrained optimization problems. Interested readers
are encouraged to run the tutorial routines “optdemo”or “tutdemo”, which
demonstrate the usages and performances of the representative built-in op-
timization routines such as “fminunc()” and “fmincon()”.
%nm731_1
% to minimize an objective function f(x) by various methods.
clear, clf
% An objective function and its gradient function
f = inline(’(x(1) - 0.5).^2.*(x(1) + 1).^2 + (x(2)+1).^2.*(x(2)
- 1).^2’,’x’);
g0 = ’[2*(x(1)- 0.5)*(x(1)+ 1)*(2*x(1)+ 0.5) 4*(x(2)^2 - 1).*x(2)]’;
20 2. Conventional optimisation techniques

g = inline(g0,’x’);
x0 = [0 0.5] %initial guess
[xon,fon] = opt_Nelder(f,x0) %min point, its ftn value by opt_Nelder
[xos,fos] = fminsearch(f,x0) %min point, its ftn value by fmin-
search()
[xost,fost] = opt_steep(f,x0) %min point, its ftn value by opt_steep()
TolX = 1e-4; MaxIter = 100;
xont = Newtons(g,x0,TolX,MaxIter);
xont,f(xont) %minimum point and its function value by New-
tons()
[xocg,focg] = opt_conjg(f,x0) %min point, its ftn value by
opt_conjg()
[xou,fou] = fminunc(f,x0) %min point, its ftn value by fmin-
unc()
For constraint optimisation
%nm732_1 to solve a constrained optimization problem by
fmincon()
clear, clf
ftn=’((x(1) + 1.5)^2 + 5*(x(2) - 1.7)^2)*((x(1)-1.4)^2 + .6*(x(2)-
.5)^2)’;
f722o = inline(ftn,’x’);
x0 = [0 0.5] %initial guess
A = []; B = []; Aeq = []; Beq = []; %no linear constraints
l = -inf*ones(size(x0)); u = inf*ones(size(x0)); % no lower/upperbound
options = optimset(’LargeScale’,’o¤’); %just [] is OK.
[xo_con,fo_con] = fmincon(f722o,x0,A,B,Aeq,Beq,l,u,’f722c’,options)
[co,ceqo] = f722c(xo_con) % to see how constraints are.
This is page 21
Printer: Opaque this

3
Linear Programming

Linear programming (LP) problems involve linear objective function and


linear constraints, as shown below in Example below.
Example: Solvents are extensively used as process materials (e.g., extrac-
tive agents) or process ‡uids (e.g., CFC) in chemical process industries.
Cost is a main consideration in selecting solvents. A chemical manufacturer
is accustomed to a raw material X1 as the solvent in his plant. Suddenly,
he found out that he can e¤ectively use a blend of X1 and X2 for the same
purpose. X1 can be purchased at $4 per ton, however, X2 is an environ-
mentally toxic material which can be obtained from other manufacturers.
With the current environmental policy, this results in a credit of $1 per ton
of X2 consumed.
He buys the material a day in advance and stores it. The daily availability
of these two materials is restricted by two constraints: (1) the combined
storage (intermediate) capacity for X1 and X2 is 8 tons per day. The daily
availability for X1 is twice the required amount. X2 is generally purchased
as needed. (2) The maximum availability of X2 is 5 tons per day. Safety
conditions demand that the amount of X1 cannot exceed the amount of X2
by more than 4 tons. The manufacturer wants to determine the amount of
each raw material required to reduce the cost of solvents to a minimum.
Formulate the problem as an optimization problem. Solution: Let x1 be the
amount of X1 and x2 be the amount of X2 required per day in the plant.
Then, the problem can be formulated as a linear programming problem as
given below.
22 3. Linear Programming

FIGURE 3.1. Linear progamming Graphical representation

min 4x1 x2 (3.1)


x1 ;x2

Subject to

2x1 + x2 8 storage constraint (3.2)


x2 5Availability constraint (3.3)
x1 x2 4 Safety constraint (3.4)
x1 0 (3.5)
x2 0 (3.6)

As shown above, the problem is a two-variable LP problem, which can be


easily represented in a graphical form. Figure 2.1 shows constraints (2.2)
through (2.4), plotted as three lines by considering the three constraints
as equality constraints. Therefore, these lines represent the boundaries of
the inequality constraints. In the …gure, the inequality is represented by
the points on the other side of the hatched lines. The objective function
lines are represented as dashed lines (isocost lines). It can be seen that the
optimal solution is at the point x1 = 0; x2 = 5, a point at the intersection
of constraint (2.3) and one of the isocost lines. All isocost lines intersect
constraints either once or twice. The LP optimum lies at a vertex of the
feasible region, which forms the basis of the simplex method. The simplex
method is a numerical optimization method for solving linear programming
problems developed by George Dantzig in 1947.
3.1 The Simplex Method 23

3.1 The Simplex Method


The graphical method shown above can be used for two-dimensional prob-
lems; however, real-life LPs consist of many variables, and to solve these
linear programming problems, one has to resort to a numerical optimiza-
tion method such as the simplex method. The generalized form of an LP
can be written as follows.

n
X
Optimize Z = Ci xi (3.7)
i=1

Subject to

n
X
Ci xi bj (3.8)
i=1
j = 1; 2; 3; :::::; m (3.9)
xj 2 R (3.10)

a numerical optimization method involves an iterative procedure. The


simplex method involves moving from one extreme point
on the boundary (vertex) of the feasible region to another along the edges
of the boundary iteratively. This involves identifying the constraints (lines)
on which the solution will lie. In simplex, a slack variable is incorporated
in every constraint to make the constraint an equality. Now, the aim is to
solve the linear equations (equalities) for the decision variables x, and the
slack variables s. The active constraints are then identi…ed based on the
fact that, for these constraints, the corresponding slack variables are zero.
The simplex method is based on the Gauss elimination procedure of
solving linear equations. However, some complicating factors enter in this
procedure: (1) all variables are required to be nonnegative because this
ensures that the feasible solution can be obtained easily by a simple ratio
test (Step 4 of the iterative procedure described below); and (2) we are
optimizing the linear objective function, so at each step we want ensure
that there is an improvement in the value of the objective function (Step
3 of the iterative procedure given below).
The simplex method uses the following steps iteratively.
Convert the LP into the standard LP form.
Standard LP
All the constraints are equations with a nonnegative right-hand side.
All variables are nonnegative.
– Convert all negative variables x to nonnegative variables using two
variables (e.g., x = x+-x-); this is equivalent to saying if x = -5
then -5 = 5 - 10, x+ = 5, and x- = 10.
24 3. Linear Programming

FIGURE 3.2. Feasible reagion and slack variables

–Convert all inequalities into equalities by adding slack variables (non-


negative) for less than or equal to constraints ( ) and by
subtracting surplus variables for greater than or equal to constraints ( ).
The objective function must be minimization or maximization.
The standard LP involving m equations and n unknowns has m basic
variables and n-m nonbasic or zero variables. This is explained below using
Example
Consider Example in the standard LP form with slack variables, as given
below.
Standard LP:

M T inimize Z (3.11)
Subject to

Z + 4x1 x2 = 0 (3.12)
2x1 + x2 + s1 = 8 (3.13)
x2 + s2 = 5 (3.14)
x1 x2 + s3 = 4 (3.15)
x1 0; x2 0 (3.16)
s1 0; s2 0; s3 0 (3.17)

The feasible region for this problem is represented by the region ABCD
in Figure . Table shows all the vertices of this region and the corresponding
slack variables calculated using the constraints given by Equations (note
that the nonnegativity constraint on the variables is not included).
It can be seen from Table that at each extreme point of the feasible
region, there are n - m = 2 variables that are zero and m = 3 variables that
are nonnegative. An extreme point of the linear program is characterized
by these m basic variables.
In simplex the feasible region shown in Table gets transformed into a
tableau
3.1 The Simplex Method 25

FIGURE 3.3. Simplex tablau

Determine the starting feasible solution. A basic solution is obtained by


setting n - m variables equal to zero and solving for the values of there-
maining m variables.
3. Select an entering variable (in the list of nonbasic variables) using the
optimality (de…ned as better than the current solution) condition; that is,
choose the next operation so that it will improve the objective function.
Stop if there is no entering variable.
Optimality Condition:
Entering variable: The nonbasic variable that would increase the objec-
tive function (for maximization). This corresponds to the nonbasic variable
having the most negative coe¢ cient in the objective function equation or
the row zero of the simplex tableau. In many implementations of simplex,
instead of wasting the computation time in …nding the most negative co-
e¢ cient, any negative coe¢ cientin the objective function equation is used.
4. Select a leaving variable using the feasibility condition.
Feasibility Condition:
Leaving variable: The basic variable that is leaving the list of basic
variables and becoming nonbasic. The variable corresponding to the small-
est nonnegative ratio (the right-hand side of the constraint divided by the
constraint coe¢ cient of the entering variable).
5. Determine the new basic solution by using the appropriate Gauss–
Jordan
Row Operation.
Gauss–Jordon Row Operation:
Pivot Column: Associated with the row operation.
Pivot Row: Associated with the leaving variable.
Pivot Element: Intersection of Pivot row and Pivot Column.
ROW OPERATION
Pivot Row = Current Pivot Row P ivotElement:
All other rows: New Row = Current Row - (its Pivot Column Coe¢ -
cients x New Pivot Row).
6. Go to Step 2.
To solve the problem discussed above using simplex method Convert
the LP into the standard LP form. For simplicity, we are converting this
minimization problem to a maximization problem with -Z as the objective
26 3. Linear Programming

FIGURE 3.4. Initial tableau for simplex example

function. Furthermore, nonnegative slack variables s1, s2, and s3 are added
to each constraint.

M T inimize Z (3.18)

Subject to

Z + 4x1 x2 = 0 (3.19)
2x1 + x2 + s1 = 8 (3.20)
x2 + s2 = 5 (3.21)
x1 x2 + s3 = 4 (3.22)
x1 0; x2 0 (3.23)
s1 0; s2 0; s3 0 (3.24)

The standard LP is shown in Table 2.3 below where x1 and x2 are nonba-
sic or zero variables and s1, s2, and s3 are the basic variables. The starting
solution is x1 = 0; x2 = 0; s1 = 8; s2 = 5; s3 = 4 obtained from the RHS
column.
Determine the entering and leaving variables. Is the starting solution
optimum? No, because Row 0 representing the objective function equation
contains nonbasic variables with negative coe¢ cients.
This can also be seen from Figure. In this …gure, the current basic solu-
tion is shown to be increasing in the direction of the arrow.
Entering Variable: The most negative coe¢ cient in Row 0 is x2. There-
fore, the entering variable is x2. This variable must now increase in the
direction of the arrow. How far can this increase the objective function?
Remember
that the solution has to be in the feasible region. Figure shows that the
maximum increase in x2 in the feasible region is given by point D, which
is on constraint (2.3). This is also the intercept of this constraint with the
y-axis, representing x2. Algebraically, these intercepts are the ratios of the
right-hand side of the equations to the corresponding constraint coe¢ cient
of x2. We are interested only in the nonnegative ratios, as they represent
3.2 Infeasible Solution 27

FIGURE 3.5. Basic solution for simplex example

the direction of increase in x2. This concept is used to decide the leaving
variable.
Leaving Variable: The variable corresponding to the smallest nonnegative
ratio (5 here) is s2. Hence, the leaving variable is s2.
So, the Pivot Row is Row 2 and Pivot Column is x2.
The two steps of the Gauss–Jordon Row Operation are given below.
The pivot element is underlined in the Table and is 1.
Row Operation:
Pivot: (0, 0, 1, 0, 1, 0, 5)
Row 0: (1, 4,-1, 0, 0, 0, 0)- (-1)(0, 0, 1, 0, 1, 0, 5) = (1, 4, 0, 0, 1, 0, 5)
Row 1: (0, 2, 1, 1, 0, 0, 8)- (1)(0, 0, 1, 0, 1, 0, 5) = (0, 2, 0, 1,-1, 0, 3)
Row 3: (0, 1,-1, 0, 0, 1, 4)- (-1)(0, 0, 1, 0, 1, 0, 5) = (0, 1, 0, 0, 1, 1, 9)
These steps result in the following table (Table).
There is no new entering variable because there are no nonbasic variables
with a negative coe¢ cient in row 0. Therefore, we can assume that the
solution is reached, which is given by (from the RHS of each row) x1 = 0;
x2 = 5; s1 = 3; s2 = 0; s3 = 9; Z = -5.
Note that at an optimum, all basic variables (x2, s1, s3) have a zero
coe¢ cient in Row 0.

3.2 Infeasible Solution


Now consider the same example, and change the right-hand side of Equation2-
8 instead of 8. We know that constraint (2) represents the storage capacity
and physics tells us that the storage capacity cannot be negative. However,
let us see what we get mathematically.
28 3. Linear Programming

FIGURE 3.6. Infeasible LP

FIGURE 3.7. Initial tableau for infeasible problem

From Figure 2.3, it is seen that the solution is infeasible for this problem.
Applying the simplex Method results in Table 2.5 for the …rst step.

Z + 4x1 x2 = 0 (3.25)
2x1 + x2 + s1 = 8 Sorage Constraint (3.26)
x2 + s2 = 5 Availability Constraint (3.27)
x1 x2 + s3 = 4 Safety Constraint (3.28)
x1 0; x2 0 (3.29)

Standard LP
3.3 Unbounded Solution 29

FIGURE 3.8. Second iteration tableau for infesible problem

FIGURE 3.9. Simplex tableau for unbounded solution

Z + 4x1 x2 = 0 (3.30)
2x1 + x2 + s1 = 8 Sorage Constraint (3.31)
x2 + s2 = 5 Availability Constraint (3.32)
x1 x2 + s3 = 4 Safety Constraint (3.33)

The solution to this problem is the same as before: x1 = 0; x2 = 5.


However, this solution is not a feasible solution because the slack variable
(arti…cialvariable de…ned to be always positive) s1 is negative.

3.3 Unbounded Solution


If constraints on storage and availability are removed in the above example,
the solution is unbounded, as can be seen in Figure 2.4. This means there
are points in the feasible region with arbitrarily large objective function
values (for maximization).

M inimizex1;x2 Z = 4x1 x2 (3.34)


x1 x2 + s3 = 4 Safety Constraint (3.35)
x1 0; x2 0 (3.36)

The entering variable is x2 as it has the most negative coe¢ cient in


row 0. However, there is no leaving variable corresponding to the binding
constraint (the smallest nonnegative ratio or intercept). That means x2
30 3. Linear Programming

FIGURE 3.10. Simplex problem for unbounded solution

can take as high a value as possible. This is also apparent in the graphical
solution shown in Figure The LP is unbounded when (for a maximization
problem) a nonbasic variable with a negative coe¢ cient in row 0 has a
nonpositive coe¢ cient in each constraint, as shown in the table

3.4 Multiple Solutions


In the following example, the cost of X1 is assumed to be negligible as
compared to the credit of X2. This LP has in…nite solutions given by the
isocost line (x2 = 5) . The simplex method generally …nds one solution
at a time. Special methods such as goal programming or multiobjective
optimization can be used to …nd these solutions.

3.4.1 Matlab code for Linear Programming (LP)


The linear programming (LP) scheme implemented by the MATLAB built-
in routine
"[xo,fo] = linprog(f,A,b,Aeq,Beq,l,u,x0,options)"
is designed to solve an LP problem, which is a constrained minimization
problem as follows.

M inf (x) = f T x (3.37)


3.4 Multiple Solutions 31

subject to
Ax b; Aeqx = beq; andl x u (3.38)
%nm733 to solve a Linear Programming problem.
% Min f*x=-3*x(1)-2*x(2) s.t. Ax <= b, Aeq = beq and l <=
x <= u
x0 = [0 0]; %initial point
f = [-3 -2]; %the coe¢ cient vector of the objective function
A = [3 4; 2 1]; b = [7; 3]; %the inequality constraint Ax <= b
Aeq = [-3 2]; beq = 2; %the equality constraint Aeq*x = beq
l = [0 0]; u = [10 10]; %lower/upper bound l <= x <= u
[xo_lp,fo_lp] = linprog(f,A,b,Aeq,beq,l,u)
cons_satis…ed = [A; Aeq]*xo_lp-[b; beq] %how constraints are
satis…ed
f733o=inline(’-3*x(1)-2*x(2)’, ’x’);
[xo_con,fo_con] = fmincon(f733o,x0,A,b,Aeq,beq,l,u)
It produces the solution (column) vector xo and the minimized value
of the objective function f (xo) as its …rst and second output arguments
xo and fo, where the objective function and the constraints excluding the
constant term are linear in terms of the independent (decision) variables.
It works for such linear optimization problems more e¢ ciently than the
general constrained optimization routine “fmincon()”.
32 3. Linear Programming
This is page 33
Printer: Opaque this

4
Nonlinear Programming

In nonlinear programming (NLP) problems, either the objective function,


the constraints, or both the objective and the constraints are nonlinear, as
shown below in Example.
Consider a simple isoperimetric problem described in Chapter
1. Given the perimeter (16 cm) of a rectangle, construct the rectangle
with maximum area. To be consistent with the LP formulations of the
inequalities seen earlier, assume that the perimeter of 16 cm is an upper
bound to the real perimeter.
Solution: Let x1 and x2 be the two sides of this rectangle. Then the
problem can be formulated as a nonlinear programming problem with the
nonlinear objective function and the linear inequality constraints given be-
low:
Maximize Z = x1 x x2
x1, x2
subject to
2x1 + 2x2 16 Perimeter Constraint
x1 0; x2 0
Let us start plotting the constraints and the iso-objective (equal-area)
contours in Figure 3.1. As stated earlier in the …gure, the three inequalities
are represented by the region on the other side of the hatched lines. The
objective function lines are represented as dashed contours. The optimal
solution is at x1 = 4 cm; x2 = 4 cm. Unlike LP, the NLP solution is not
lying at the vertex of the feasible region, which is the basis of the simplex
method.
34 4. Nonlinear Programming

FIGURE 4.1. Nonlinear programming contour plot

The above example demonstrates that NLP problems are di¤erent from
LP problems because:
An NLP solution need not be a corner point.
An NLP solution need not be on the boundary (although in this ex-
ample it is on the boundary) of the feasible region. It is obvious that one
cannot use the simplex for solving an NLP. For an NLP solution, it is nec-
essary to look at the relationship of the objective function to each decision
variable. Consider the previous example. Let us convert the problem into a
onedimensional problem by assuming constraint (isoperimetric constraint)
as an equality. One can eliminate x2 by substituting the value of x2 in
terms of x1 using constraint.

min Z = 8x1 x21 (4.1)


x1;x2

x1 0 (4.2)
Figure shows the graph of the objective function versus the single deci-
sion variable x1. In Figure , the objective function has the highest value
(maximum) at x1 = 4. At this point in the …gure, the x-axis is tangent to
the objective
function curve, and the slope dZ/dx1 is zero. This is the …rst condition
that is used in deciding the extremum point of a function in an NLP setting.
Is this a minimum or a maximum? Let us see what happens if we convert
this maximization problem into a minimization problem with -Z as the
objective function.

min Z = 8x1 x21 (4.3)


x1
4. Nonlinear Programming 35

FIGURE 4.2. Nonlinear program graphical representation

x1 0 (4.4)

Figure shows that -Z has the lowest value at the same point, x1 = 4. At
this point in both …gures, the x-axis is tangent to the objective function
curve, and slope dZ/dx1 is zero. It is obvious that for both the maximum
and minimum points, the necessary condition is the same. What di¤eren-
tiates a minimum from a maximum is whether the slope is increasing or
decreasing around the extremum point. In Figure 3.2, the slope is decreas-
ing as you move away from x1 = 4, showing that the solution is a maximum.
On the other hand, in Figure 3.3 the slope is increasing, resulting in a min-
imum.
Whether the slope is increasing or decreasing (sign of the second deriv-
ative) provides a su¢ cient condition for the optimal solution to an NLP.
Many times there will be more than one minia existing. For the case
shown in the …gure the number of minim are two more over one being
better than the other.This is another case in which an NLP di¤ers from an
LP, as
In LP, a local optimum (the point is better than any “adjacent”point)
is a global (best of all the feasible points) optimum. With NLP, a solution
can be a local minimum.
For some problems, one can obtain a global optimum. For example, –
Figure shows a global maximum of a concave function.
– Figure presents a global minimum of a convex function. What is the
relation between the convexity or concavity of a function and
its optimum point? The following section describes convex and concave
functions and their relation to the NLP solution.
36 4. Nonlinear Programming

FIGURE 4.3. Nonlinear programming minimum

4.1 Convex and Concave Functions


A set of points S is a convex set if the line segment joining any two points
in the space S is wholly contained in S. In Figure 3.5, a and b are convex
sets, but c is not a convex set.
Mathematically, S is a convex set if, for any two vectors x1 and x2 in
S, the vector x = x1 +(1- )x2 is also in S for any number between 0
and 1. Therefore, a function f(x) is said to be strictly convex if, for any two
distinct points x1 and x2, the following equation applies.
f( x1 + (1 - )x2) < f(x1) + (1 - )f(x2) (3.7)
Figure 3.6a describes Equation (3.7), which de…nes a convex function.
This convex function (Figure 3.6a) has a single minimum, whereas the
nonconvex function can have multiple minima. Conversely, a function f(x)
is strictly concave if -f(x) is strictly convex.
As stated earlier, concave function has a single maximum.
Therefore, to obtain a global optimum in NLP, the following conditions
apply.
Maximization: The objective function should be concave and the solu-
tion space should be a convex set .
Minimization: The objective function should be convex and the solution
space should be a convex set .
Note that every global optimum is a local optimum, but the converse is
not true. The set of all feasible solutions to a linear programming problem
is a convex set. Therefore, a linear programming optimum is a global opti-
mum. It is clear that the NLP solution depends on the objective function
and the solution space de…ned by the constraints. The following sections
describe the unconstrained and constrained NLP, and the necessary and
su¢ cient conditions for obtaining the optimum for these problems.
4.1 Convex and Concave Functions 37

FIGURE 4.4. Nonlinear programming multiple minimum

FIGURE 4.5. Examples of convex and nonconvex sets


38 4. Nonlinear Programming
This is page 39
Printer: Opaque this

5
Discrete Optimization

Discrete optimization problems involve discrete decision variables as shown


below in Example Consider the isoperimetric problem solved to be an NLP.
This problem is stated in terms of a rectangle. Suppose we have a choice
among a rectangle, a hexagon, and an ellipse, as shown in Figure
Draw the feasible space when the perimeter is …xed at 16 cm and the
objective is to maximize the area.
Solution: The decision space in this case is represented by the points
corresponding to di¤erent shapes and sizes as shown Discrete optimization
problems can be classi…ed as integer programming (IP) problems, mixed
integer linear programming (MILP), and mixed integer
nonlinear programming (MINLP) problems. Now let us look at the deci-
sion variables associated with this isoperimetric problem. We need to decide
which shape and what dimensions to choose. As seen earlier, the dimen-

FIGURE 5.1. Isoperimetric problem discrete decisions


40 5. Discrete Optimization

FIGURE 5.2. Feasible space for discrete isoperimetric problem

sions of a particular …gure represent continuous decisions in a real domain,


whereas
selecting a shape is a discrete decision. This is an MINLP as it contains
both continuous (e.g., length) and discrete decision variables (e.g., shape),
and the objective function (area) is nonlinear. For representing discrete de-
cisions associated with each shape, one can assign an integer for each shape
or a binary variable having values of 0 and 1 (1 corresponding to yes and
0 to no). The binary variable representation is used in traditional math-
ematical programming algorithms for solving problems involving discrete
decision variables.
However, probabilistic methods such as simulated annealing and genetic
algorithms which are based on analogies to a physical process such as the
annealing of metals or to a natural process such as genetic evolution, may
prefer to use di¤erent integers assigned to di¤erent decisions.
Representation of the discrete decision space plays an important role in
selecting a particular algorithm to solve the discrete optimization problem.
The following section presents the two di¤erent representations commonly
used in discrete optimization.
5.1 Tree and Network Representation 41

FIGURE 5.3. Cost of seperations 1000 Rs/year

5.1 Tree and Network Representation


Discrete decisions can be represented using a tree representation or a net-
work representation. Network representation avoids duplication and each
node corresponds to a unique decision. This representation is useful when
one is using methods like discrete dynamic programming. Another advan-
tage of the network representation is that an IP problem that can be rep-
resented.
appropriately using the network framework can be solved as an LP. Ex-
amples of network models include transportation of supply to
satisfy a demand, ‡ow of wealth, assigning jobs to machines, and project
management. The tree representation shows clear paths to …nal decisions;
however, it involves duplication. The tree representation is suitable when
the discrete decisions are represented separately, as in the Branch-and-
bound method.
This method is more popular for IP than the discrete dynamic program-
ming method in the mathematical programming literature due to its easy
implementation and generalizability. The following example from Hendry
and Hughes (1972) illustrates the two representations.

Example 1 Given a mixture of four chemicals A, B, C, D for which dif-


ferenttechnologies are used to separate the mixture of pure components. The
costof each technology is given in Table 4.1 below. Formulate the problem
as an optimization problem with tree and network representations.

Solution: Figure 4.3 shows the decision tree for this problem. In this
representation, we have multiple representations of some of the separation
options. For example, the binary separators A/B, B/C, C/D appear twice
in the terminal nodes. We can avoid this duplication by using the network
42 5. Discrete Optimization

FIGURE 5.4. Tree representation

representation shown in Figure . In this representation, we have combined


the branches that lead to the same binary separators. The network rep-
resentation has 10 nodes, and the tree representation has 13 nodes. The
optimization problem is to …nd the path that will separate the mixture into
pure components for a minimum cost. From the two representations, it is
very clear that the decisions involved here are all discrete decisions. This
is a pure integer programming problem. The mathematical programming
method commonly used to solve this problem is the Branch-and-bound
method. This method is described in the next section.

5.2 Branch-and-Bound for IP


Having developed the representation, the question is how to search for the
optimum. One can go through the complete enumeration, but that would
involve evaluating each node of the tree. The intelligent way is to reduce the
search space by implicit enumeration and evaluate as few nodes as possible.
Consider the above example of separation sequencing. The objective is to
minimize the cost of separation. If one looks at the nodes for each branch,
there are an initial node, intermediate nodes, and a terminal node. Each
node is the sum of the costs of all earlier nodes in that branch. Because
this cost increases monotonically as we progress through the initial, inter-
mediate, and …nal nodes, we can de…ne the upper bound and lower bounds
for each branch.
5.2 Branch-and-Bound for IP 43

FIGURE 5.5. Network representation

The cost accumulated at any intermediate node is a lower bound to


the cost of any successor nodes, as the successor node is bound to incur
additional cost.
For a terminal node, the total cost provides an upper bound to the
original problem because a terminal node represents a solution that may or
may not be optimal. The above two heuristics allow us to prune the tree for
cost minimization. If the cost at the current node is greater than or equal
to the upper bound de…ned earlier either from one of the prior branches
or known to us from experience, then we don’t need to go further in that
branch. These are the two common ways to prune the tree based on the
order in which the nodes are enumerated:
Depth-…rst: Here, we successively perform one branching on the most
recently created node. When no nodes can be expanded, we backtrack to
a node whose successor nodes have not been examined.
Breadth-…rst: Here, we select the node with the lowest cost and expand
all its successor nodes. The following example illustrates these two strate-
gies for the problem speci…ed in Example previously. Find the lowest cost
separation sequence for the problem speci…ed in PreviousExample using
the depth-…rst and breadth-…rst Branch-and-bound strategies.
Solution: Consider the tree representation shown in Figure for this prob-
lem. First, let’s examine the depth-…rst strategy, as shown in Figure and
enumerated below.
Branch from Root Node to Node 1: Sequence Cost = 50.
44 5. Discrete Optimization

FIGURE 5.6. Tree representation and cost diagram

Branch from Node 1 to Node 2: Sequence Cost = 50 + 228 = 278.


Branch from Node 2 to Node 3: Sequence Cost = 278 + 329 = 607.
–Because Node 3 is terminal, current upper bound = 607.
–Current best sequence is (1, 2, 3).
Backtrack to Node 2.
Backtrack to Node 1
Branch from Node 1 to Node 4: Sequence Cost = 50 + 40 = 90 < 607.
Branch from Node 4 to Node 5: Sequence Cost = 90 + 50 = 140 <
607.
– Because Node 5 is terminal and 140 < 607, current upper bound =
140.
–Current best sequence is (1, 4, 5).
Backtrack to Node 4.
Backtrack to Node 1.
Backtrack to Root Node.
Branch from Root Node to Node 6: Sequence Cost = 170.
–Because 170 > 140, prune Node 6.
–Current best sequence is still (1, 4, 5).
Backtrack to Root Node.
Branch from Root Node to Node 9: Sequence Cost = 110.
–Branch from Node 9 to Node 10: Sequence Cost = 110 + 40 = 150.
–Branch from Node 9 to Node 12: Sequence Cost = 110 + 69 = 179.
–Because 150 > 140, prune Node 10.
5.2 Branch-and-Bound for IP 45

FIGURE 5.7. Deapth …rst enumeration

–Because 179 > 140, prune Node 12.


–Current best sequence is still (1, 4, 5).
Backtrack to Root Node.
Because all the branches from the Root Node have been examined,
stop.
Optimal sequence (1, 4, 5), Minimum Cost = 140.
Note that with the depth-…rst strategy, we examined 9 nodes out of 13
that we have in the tree. If the separator costs had been a function of
continuous decision variables, then we would have had to solve either an
LP or an NLP at each node, depending on the problem type. This is the
principle behind the depth-…rst Branch-and-bound strategy. The breadth-
…rst strategy enumeration is shown in Figure . The steps are elaborated
below.
Branch from root node to:
–Node 1: Sequence cost = 50.
–Node 6: Sequence cost = 170.
–Node 9: Sequence cost = 110.
Select Node 1 because it has the lowest cost.
Branch Node 1 to:
–Node 2: Sequence Cost = 50 + 228 = 278.
–Node 4: Sequence Cost = 50 + 40 = 90.
Select Node 4 because it has the lowest cost among 6, 9, 2, 4.
Branch Node 4 to:
46 5. Discrete Optimization

FIGURE 5.8. Breadth …rst enumeration

–Node 5: Sequence Cost = 90 + 50 = 140.


Because Node 5 is terminal, current best upper bound = 140 with the
current best sequence (1, 4, 5).
Select Node 9 because it has the lowest cost among 6, 9, 2, 5.
Branch Node 9 to:
–Node 10: Sequence Cost = 110 + 40 = 150.
–Node 12: Sequence Cost = 110 + 69 = 179.
From all the available nodes 6, 2, 5, 10, and 12, Node 5 has the lowest
cost, so stop.
Optimal Sequence (1, 4, 5), Minimum Cost = 140. Note that with the
breadth-…rst strategy, we only had to examine 8 nodes
out of 13 nodes in the tree, one node less than the depth-…rst strategy. In
general, the breadth-…rst strategy requires the examination of fewer nodes
and no backtracking. However, depth-…rst requires less storage of nodes
because the maximum number of nodes to be stored at any point is the
number of levels in the tree. For this reason, the depth-…rst strategy is
commonly used. Also, this strategy has a tendency to …nd the optimal
solution earlier than the breadth-…rst strategy. For example, in Example,
we had reached the optimal solution in the …rst few steps using the depth-
…rst strategy (seventh step, with …ve nodes examined)
This is page 47
Printer: Opaque this

6
Integrated Planning and Scheduling
of processes

6.1 Introduction
In this chapter, we address each part of the manufacturing business hier-
archy, and explain how optimization and modeling are key tools that help
link the components together. Also introduce the concept of scheduling and
resent developments related to schduling of batch process.

6.2 Plant optimization hierarchy


Figure (??)shows the relevant levels for the process industries in the op-
timization hierarchy for business manufacturing. At all levels the use of
optimization techniques can be pervasive although speci…c techniques are
not explicitly listed in the speci…c activities shown in the …gure. In Figure
(??)the key information sources for the plant decision hierarchy for opera-
tions are the enterprise data, consisting of ’commercial and …nancial infor-
mation, and plant data, usually containing the values of a large number of
process variables. The critical linkage between models and optimization in
all of the …ve levels is illustrated in Figure(??). The …rst level (planning) sets
production goals that meet supply and logistics constraints, and scheduling
(layer 2) addresses time-varying capacity and sta¢ ng utilization decisions.
The term supply chain refers to the links in a web of relationships involv-
ing materials acquisition, retailing (sales), distribution, transportation, and
manufacturing with suppliers. Planning and scheduling usually take place
48 6. Integrated Planning and Scheduling of processes

over relatively long time frames and tend to be loosely coupled to the in-
formation ‡ow and analysis that occur at lower levels in the hierarchy. The
time scale for decision making at the highest level (planning) may be on
the order of months, whereas at the lowest level (e.g., process monitoring)
the interaction with the process may be in fractions of a second.
Plantwide management and optimization at level 3 coordinates the net-
work of process units and provides cost-e¤ective setpoints via real-time op-
timization. The unit management and control level includes process control
[e.g., optimal tuning of proportional-integral-derivative (PID) controllers],
emergency response, and diagnosis, whereas level 5 (process monitoring
and analysis) provides data acquisition and online angysis and reconcilia-
tion functions as well as fault detection. Ideally, bidirectional communica-
tion occurs between levels, with higher levels setting goals for lower levels
and the lower levels communicating constraints and performance informa-
tion to the higher levels. Data are collected directly at all levels in the
enterprise. In practice the decision ‡ow tends to be top down, invariably
resulting in mismatches between goals and their realization and the con-
sequent accumulation of inventory. Other more deleterious e¤ects include
reduction of processing capacity, o¤-speci…cation products, and failure to
meet scheduled deliveries.
Over the past 30 years, business automation systems and plant automa-
tion systems have developed along di¤erent paths, particularly in the way
data are acquired, managed, and stored. Process management and con-
trol systems normally use the same databases obtained from various online
measurements of the state of the plant. Each level in Figure (??p1) may
have its own manually entered database, however, some of which are very
large, but web-based data interchange will facilitate standard practices in
the future.
Table (??p1) lists the kinds of models and objective functions used in
the computer-integrated manufacturing (CIM) hierarchy. These models are
used to make decisions that reduce product costs, improve product quality,
or reduce time to market (or cycle time). Note that models employed can
be classi…ed as steady state or dynamic, discrete or continuous, physical
or empirical, linear or nonlinear, and with single or multiple periods. The
models used at di¤erent levels are not normally derived from a single model
source, and as a result inconsistencies in the model can arise. The chemi-
cal processing industry is, however, moving in the direction of unifying the
modeling approaches so that the models employed are consistent and ro-
bust, as implied in Figure (??p1). Objective functions can be economically
based or noneconomic, such as least squares.
Planning and Scheduling
Bryant (1993) states that planning is concerned with broad classes of
products and the provision of adequate manufacturing capacity. In con-
trast, scheduling focuses on details of material ‡ow, manufacturing, and
production, but still may be concerned with o- ine planning. Reactive
6.2 Plant optimization hierarchy 49

scheduling refers to real-time scheduling and the handling of unplanned


changes in demands or resources. The term enterprise resource planning
(ERP) is used today, replacing the term manufacturing resources planning
(MRP); ERP may or may not explicitly include planning and scheduling,
depending on the industry. Planning and scheduling are viewed as distinct
levels in the manufacturing hierarchy as shown in Figure (??p1), but often
a fair amount of overlap exists in the two problem statements, as discussed
later on. The time scale can often be the determining factor in whether a
given problem is a planning or scheduling one: planning is typi…ed by a time
horizon of months or weeks, whereas scheduling tends to be of shorter du-
ration, that is, weeks, days, or hours, depending on the cycle time from raw
materials to …nal product. Bryant distinguishes among system operations
planning, plant operations planning, and plant scheduling, using the tasks
listed in Table (??t2). At the systems operations planning level traditional
multiperiod, multilocation linear programming problems must be solved,
whereas at the plant operations level, nonlinear multiperiod models may
be used, with variable time lengths that can be optimized as well (Lasdon
and Baker, 1986).
Baker (1993) outlined the planning and scheduling activities in a re…nery
as follows:
1. The corporate operations planning model sets target levels and prices
for interre…nery transfers, crude and product allocations to each re…n-
ery, production targets, and inventory targets for the end of each re…nery
model’s time horizon.
2. In plant operations planning each re…nery model produces target op-
erating conditions, stream allocations, and blends across the whole re…nery,
which determines.
(a) optimal operating conditions, ‡ows, blend recipes, and inventories;
and (b) costs, cost limits, and marginal values to the scheduling and real-
time optimization (RTO) models.
3. The scheduling models for each re…nery convert the preceding infor-
mation into detailed unit-level directives that provide day-by-day operating
conditions or-set points.
Supply chain management poses di¢ cult decision-making problems be-
cause of its wide ranging temporal and geographical scales, and it calls
for greater responsiveness because of changing market factors, customer
requirements, and plant availability. Successful supply chain management
must anticipate customer requirements, commit to customer orders, pro-
cure new materials, allocate production
capacity, schedule production, and schedule delivery. According to Bryant
(1993), the costs associated with supply chain issues represent about 10 per-
cent of the sales value of domestically delivered products, and as much as
40 percent internationally.
50 6. Integrated Planning and Scheduling of processes

Managing the supply chain e¤ectively involves not only the manufac-
turers, but also their trading partners: customers, suppliers, warehousers,
terminal operators, and transportation carriers (air, rail, water, land).
In most supply chains each warehouse is typically controlled according to
some local law such as a safety stock level or replenishment rule. This local
control can cause buildup of inventory at a speci…c point in the system and
thus propagate disturbances over the time frame of days to months (which
is analogous to disturbances in the range of minutes or hours that occur at
the production control level). Short-term changes that can upset the system
include those that are "sel…n‡icted" (price changes, promotions, etc.) or
e¤ects of weather or other cyclical consumer patterns. Accurate demand
forecasting is critical to keeping the supply chain network functioning close
to its optimum when the produce-to-inventory approach is used.

6.3 Planning
A simpli…ed and idealized version of the components involved in the plan-
ning step, that is, the components of the supply chain incorporates. S possi-
ble suppliers provide raw materials to each of the M manufacturing plants.
These plants manufacture a given product that may be stored or ware-
housed in W facilities (or may not be stored at all), and these in turn are
delivered to C di¤erent customers. The nature of the problem depends on
whether the products are made to order or made to inventory; made to or-
der ful…lls a speci…c customer order, whereas made to inventory is oriented
to the requirements of the general market demand., with material balance
conditions satis…ed between suppliers, factories, warehouses, and customers
(equality constraints). Inequality constraints would include individual line
capacities in each manufacturing plant, total factory capacity, warehouse
storage limits, supplier limits, and customer demand. Cost factors include
variable manufacturing costs, cost of warehousing, supplier prices, trans-
portation costs (between each sector), and variable customer pricing, which
may be volume and quality-dependent. A practical problem may involve
as many as 100,000 variables and can be solved using mixed-integer linear
programming (MILP).
Most international oil companies that operate multiple re…neries analyze
the re…nery optimization problem over several time periods (e.g., 3 months).
This is because many crudes must be purchased at least 3 months in ad-
vance due to transportation requirements (e.g., the need to use tankers
to transport oil from the Middle East). These crudes also have di¤erent
grades and properties, which must be factored into the product slate for
the re…nery. So the multitime period consideration is driven more by sup-
ply and demand than by inventory limits (which are typically less than 5
days). The LP models may be run on a weekly basis to handle such items
6.4 Scheduling 51

as equipment changes and maintenance, short-term supply issues (and de-


lays in shipments due to weather problems or unloading di¢ culties), and
changes in demand (4 weeks within a 1-month period). Product proper-
ties such as the Reid vapor pressure must be changed between summer
and winter months to meet environmental restrictions on gasoline proper-
ties. See Pike (1986) for a detailed LP re…nery example that treats quality
speci…cations and physical properties by using product blending, a dimen-
sion that is relevant for companies with varied crude supplies and product
requirements.

6.4 Scheduling
Information processing in production scheduling is essentially the same
as in planning. Both plants and individual process equipment take orders
and make products. or a plant, the customer is usually external, but for
a process (or "work cell" in discrete manufacturing parlance), the order
comes from inside the plant or factory. In a plant, the …nal product can
be sold to an external customer; for a process, the product delivered is an
intermediate or partially …nished product that goes on to the next stage of
processing (internal customer).
Two philosophies are used to solve production scheduling problems (Puig-
janer and Espura, 1998):
1. The top-down approach, which de…nes appropriate hierarchical co-
ordination mechanisms between the’di¤erent decision levels and decision
structures at each level. These structures force constraints on lower op-
erating levels and require heuristic decision rules for each task. Although
this approach reduces the size and complexity of scheduling problems, it
potentially introduces coordination problems.
2. The bottom-up approach, which develops detailed plant simulation
and optimization models, optimizes them, and translates the results from
the simulations and optimization into practical operating heuristics. This
approach often leads to large models with many variables and equations
that are di¢ cult to solve quickly using rigorous optimization algorithms.
Table (??t3) categorizes the typical problem statement for the manu-
facturing scheduling and planning problem. In a batch campaign or run,
comprising smaller runs called lots, several batches of product may be pro-
duced using the same recipe. To optimize the production process, you need
to determine
1. The recipe that satis…es product quality requirements.
2. The production rates needed to ful…ll the timing requirements, includ-
ing any precedence constraints.
3. Operating variables for plant equipment that are subject to con-
straints.
52 6. Integrated Planning and Scheduling of processes

4. Availability of raw material inventories.


5. Availability of product storage.
6. The run schedule.
7. Penalties on completing a production step too soon or too late.

Example 2 MULTIPRODUCT BATCH PLANT SCHEDULING: Batch


operations such as drying, mixing, distillation, and reaction are widely used
in producing food, pharmaceuticals, and specialty products (e.g., polymers).
Scheduling of operations as described in Table 16.3 is crucial in such plants.
A principal feature of batch plants (Ku and Karimi, 1987) is the production
of multiple products using the same set of equipment. Good industrial case
studies of plant scheduling include those by Bunch et al. (1998), McDonald
(1998), and Schulz et al. (1998). For example, Schulz et al. described a
polymer plant that involved four process steps (preparation, reaction, mix-
ing, and …nishing) using di¤ erent equipment in each step. When products
are similar in nature, they require the same processing steps and hence pass
through the same series of processing units; often the batches are produced
sequentially. Such plants are called multiproduct plants. Because of di¤ er-
ent processing time requirements, the total time required to produce a set of
batches (also called the makespan or cycle time) depends on the sequence in
whidh they are produced. To maximize plant productivity, the batches should
be produced in a sequence that minimizes the makespan. The plant schedule
corresponding to such a sequence can then be represented graphically in the
form of a Gantt chart (see the following discussion and Figure E16.2b).
The Gantt chart provides a timetable of plant operations showing which
products are produced by which units and at what times. In this example
we consider four products @I, p2, p3, p4) that are to be produced as a series
of batches in a multiproduct plant consisting of three batch reactors in series
(Ku and Karirni, 1992); . The processing times for each batch reactor and
each product are given in Table E16.2. Assume that no intermediate storage
is available between the processing units. If a product …nishes its processing
on unit k and unit k + 1 is not free because it is still processing a previous
product, then the completed product must be kept in unit k, until unit k + 1
becomes free. As an example, product pl must be held in unit 1 until unit 2
…nishes processing p3. When a product …nishes processing on the last unit,
it is sent immediately to product storage. Assume that the times required
to transfer products from one unit to another are negligible compared with
the processing times. The problem for this example is to determine the time
sequence for producing the four products so as to minimize the makespan.
Assume that all the units are initiallyempty (initialized) at time zero and
the manufacture of any product can be delayed an arbitrary amount of time
by holding it in the previous unit.

Solution 3 Let N be the number of products and M be the number of units


in the plant.Let q„(called completion time) be the "clock time at which the
6.4 Scheduling 53

jth product in the sequence leaves unit k after completion of its processing,
and let rLkb e the time required to process the jth product in the sequence
on unit k (See Table E16.2). The …rst product goes into unit 1 at time
zero, so ClYo= 0. The index j in T ~an,d~C jrk denotes the position of a
product in the sequence. Hence CN„ is the time at which the last product
leaves the last unit and is the makespan to be minimized. Next, we derive
the set of constraints (Ku and Karimi, 1988; 1990) that interrelate the
Cj,k. First, the jth product in the sequence cannot leave unit k until it is
processed, and in order to be processed on unit k, it must have left unit k
- 1. Therefore the clock time at which it leaves unit k (i.e., q,+) m ust be
equal to or after the time at which it leaves unit k - 1 plus the processing
time in k. Thus the …rst set of constraints in the formulation is Similarly,
the jth product cannot leave unit k until product ( j - 1) has been processed
and transferred: Set C„= 0. Finally the jth product in the sequence cannot
leave unit k until the downsbeam unit k + 1 is free [i.e., product ( j - 1)
has left]. Therefore Although Equations (a)-(c) represent the complete set
of constraints, some of them are redundant. From Equation (a) Cj„r Cj,k-
+ T ~fo,r~k 1 2 . But from Equation (c), Cj,k-l 2 Cj- l,k, hence Cj,k
1 Cj- l,k + ri,k for k = 2, M. In essence, Equations (a) and (c) imply
Equations (b) for k = 2, M, so Equations (b) for k = 2, M are redundant.
Having derived the constraints for completion times, we next determine the
sequence of operations. In contrast to the CjPkt, he decision variables here
are discrete (binary). De…ne Xij as follows. Xi,. = 1 if product i (product
with label pi) is in slot j of the sequence, otherwise it is zero. So X3„ = 1
means that product p3 is second in the production sequence, and X3, = 0
means that it is not in the second position. The overall integer constraint
is Similarly every product should occupy only one slot in the sequence: The
Xij that satisfy Equations (d) and (e) always give a meaningful sequence.
Now we must determine the clock times ti„ for any given set of Xi,j. If
product pi is in slot j, then tj,km~~tbe7i,kandX= i1,j a ndXi,l = Xi„ = . .
. = Xi ,.~- 1 = X~.. +=l . . . = xi,N= 0, therefore we can use XiFj to pick
the right processing time representing $„ by imposing the constraint. To
reduce the number of constraints, we substitute rjtkfr om Equation (f ) into
Equations(a) and (b) to obtain the following formulation (Ku and Karimi,
1988).
Minimize: CNM
Subject to: Equations (c), (d), (e) and
C„, r 0 and Xi„binary Because the preceding formulation involves binary
(XiJ) as well as continuous variables(Ci„) and has no nonlinear functions,
it is a mixed-integer linear programming(MILP) problem and can be solved
using the GAMS MIP solver. Solving for the optimal sequence using Table
E16.2, we obtain XI„= X2,4 = X3„= X„, = 1. This means that pl is in the
…rst position in the optimal production sequence, p2 in the fourth, p3 in the
second, and p4 in the third. In other words, the optimal sequence is in the
order pl-p3-p4-p2. In contrast to the XiJ, we must be careful in interpreting
54 6. Integrated Planning and Scheduling of processes

FIGURE 6.1. Gantt chart for the optimal multiproduct plant schedule

the Ci,f,ro m the GAMS output, because C„, really means the time at which
the jth product in the sequence (and not product pi) leaves unit k. Therefore
C2„ = 23.3 means that the second product (i.e., p3) leaves unit 3 at 23.3
h. Interpreting the others in this way, the schedule corresponding to this
production sequence is conveniently displayed in form of a Gantt chart in
Figure E16.2b, which shows the status of the units at di¤ erent times. For
instance, unit 1 is processing pl during [0, 3.51 h. When pl leaves unit 1
at t = 3.5 h, it starts processing p3. It processes p3 during [3.5,7] h. But
as seen from the chart, it is unable to dischargep3 to unit 2, because unit
2 is still processing pl. So unit 1 holds p3 during [7,7.8] h. When unit 2
discharges p3
to unit 3 at 16.5 h, unit 1 is still processingp4, therefore unit 2 remains
idle during [16.5, 19.81 h. It is common in batch plants to have units blocked
due to busy downstream units or units waiting for upstream units to …nish.
This happens because the processing times vary from unit to unit and from
product to product, reducing the time utilization of units in a batch plant.
The …nished batches of pl, p3, p4, and p2 are completed at times 16.5 h,
23.3 h, 3 1.3 h, and 34.8 h. The minimum makespan in 34.8 h.
This problem can also be solved by a search method . Because the or-
der of products cannot be changed once they start through the sequence of
units, we need only determine the order in which the products are processed.
Let be a permutation or sequence in which to process the jobs, where p(j)
is the index of the product in position j of the sequence. To evaluate the
makespan of a sequence, we proceed as in Equations (a)-(c) of the mixed-
integer programming version of the problem. Let Ci, be the completion time
of product p(j) on unit k. If product p(j) does not have to wat for product
p(j - 1) to …nish its processing on unit k, then If it does have to wait, then
Hence Cj,k is the larger of these two values: This equation is solved …rst
6.4 Scheduling 55

for Cl,kf or k = 1, . . . ,M , then for C,& for k = 1,2, . . . , M, and so on.


The objective function is simply the completion time of the last job: In a
four-product problem, there are only 4! = 24 possible sequences, so you can
easily write a simple FORTRAN or C program to evaluate the makespan
for an arbitrary sequence, and then call it 24 times and choose the sequence
with the smallest makespan. For larger values of N, one can apply the tabu
search algorithm . Other search procedures (e.g . , evolutionary algorithms
or simulated annealing), can also be developed for this problem. Of course,
these algorithms do not guarantee that an optimal solution will be found.
On the other hand, the time required to solve the mixed-integer program-
ming h u l a t i o n grows rapidly with N, so that approach eventually
becomes impractical. This illustrates that you may be able to develop a sim-
ple but e¤ ective search method yourself, and eliminate the need for MILP
optimization software.

The classical solution to a scheduling problem assumes that the required


information is known at the time the schedule is generated and that this a
priori scheduling remains …xed for a planning period and is implemented on
the plant equipment. Although this methodology does not compensate for
the many external disturbances and internal disruptions that occur in a real
plant, it is still the strategy most commonly found in industrial practice.
Demand ‡uctuations, process devia tions, and equipment failure all result
in schedule infeasibilities that become apparent during the implementation
of the schedule. To remedy this situation, frequent rescheduling becomes
necessary.
In the rolling horizon rescheduling approach (Baker, 1993), a multiperiod
solution is obtained, but only the …rst period is implemented. After one
period has elapsed, we observe the existing inventories, create new demand
forecasts, and solve a new multiperiod problem. This procedure tries to
compensate for the …xed nature of the planning model. However, as has
been pointed out by Pekny and Reklaitis (1998), schedules generated in
this fashion generally result in frequent resequencing and reassignment of
equipment and resources, which may induce further changes in successive
schedules rather than smoothing out the production output.
An alternative approach uses a master schedule for planning followed
by a reactive scheduling strategy to accommodate changes by readjusting
the master schedule in a least cost or least change way. The terms able to
promise or available to promise (ATP) indicate whether a given customer,
product, volume, date, or time request can be met for a potential order.
ATP requests might be …lled from inventory, unallocated planned produc-
tion, or spare capacity (assuming additional production). When the pro-
duction scheduler is content with the current plan, made up of …rm orders
and forecast orders, the forecast orders are removed but the planned pro-
duction is left intact. This produces inventory pro…les in the model that
56 6. Integrated Planning and Scheduling of processes

represent ATP from inventory and from unallocated planned production


(Baker, 1993; Smith, 1998).
An important simulation tool used in solving production planning and
scheduling problems is the discrete event dynamic system (DEDS), which
gives a detailed picture of the material ‡ows through the production process.
Software for simulating such systems are called discrete event simulators. In
many cases, rules or expert systems are used to incorporate the experience
of scheduling and planning personnel in lieu of a purely optimization-based
approach to scheduling (Bryant, 1993). Expert systems are valuable to as-
sess the e¤ects of changes in suppliers, to locate bottlenecks in the system,
and to ascertain when and where to introduce new orders. These expert sys-
tems are used in reactive scheduling when fast decisions need to be made,
and there is no time to generate another optimized production schedule.

6.5 Plantwide Management and Optimization


At the plantwide management and optimization level, engineers strive for
enhancements in the operation of the equipment once it is installed in or-
der to realize the most production, the greatest pro…t, the minimum cost,
the least energy usage, and so on. In plant operations, bene…ts arise from
improved plant performance, such as improved yields of valuable prod-
ucts (or reduced yields of contaminants), better product quality, reduced
energy consumption, higher processing rates, and longer times between
shut downs. Optimization can also lead to reduced maintenance costs, less
equipment wear, and better sta¤ utilization. Optimization can take place
plantwide or in combinations of units.
The application of real-time optimization (RTO) in chemical plants has
been carried out since the 1960s. Originally a large mainframe computer
was used to optimize process setpoints, which were then sent to analog
controllers for implementation.
In the 1970s this approach, called supervisory control, was incorporated
into computer control systems with a distributed microprocessor architec-
ture called a distributed control system, or DCS (Seborg et al., 1989). In the
DCS both supervisory control and regulatory (feedback) control were im-
plemented using digital computers. Because computer power has increased
by a factor of lo6 over the past 30 years, it is now feasible to solve meaning-
ful optimization problems using advanced tools such as linear or nonlinear
programming in real time, meaning faster than the time between setpoint
changes.
In RTO (level 3), the setpoints for the process operating conditions are
optimized daily, hourly, or even every minute, depending on the time scale
of the process and the economic incentives to make changes. Optimization
of plant operations determines the setpoints for each unit at the tempera-
6.5 Plantwide Management and Optimization 57

tures, pressures, and ‡ow rates that are the best in some sense. For example,
the selection of the percentage
of excess air in a process heater is quite critical and involves a balance
on the fuel-air ratio to ensure complete combustion and at the same time
maximize use of the heating potential of the fuel. Examples of periodic op-
timization in a plant are minimizing steam consumption or cooling water
consumption, optimizing the re‡ux ratio in a distillation column, blending
of re…nery products to achieve desirable physical properties, or economi-
cally allocating raw materials. Many plant maintenance systems have links
to plant databases to enable them to track the operating status of the
production equipment and to schedule calibration and maintenance. Real-
time data from the plant also may be collected by management information
systems for various business functions.
The objective function in an economic model in RTQ involves the costs
of raw materials, values of products, and costs of production as functions of
operating conditions, projected sales or interdepartmental transfer prices,
and so on. Both the operating and economic models typically include con-
straints on
(a) Operating Conditions: Temperatures and pressures must be within
certain limits.
(b) Feed and Production Rates: A feed pump has a …xed capacity; sales
are limited by market projections.
(c) Storage and Warehousing Capacities: Storage tanks cannot be over-
…lled ’during periods of low demand.
(d) Product Impurities: A product may contain no more than the maxi-
mum amount of some contaminant or impurity.
In addition, safety or environmental constraints might be added, such
as a temperature limit or an upper limit on a toxic species. Several steps
are necessary for implementation of RTO, including determining the plant
steady-state operating conditions, gathering and validating data, updating
of model parameters (if necessary) to match current operations, calculating
the new (optimized) setpoints, and implementing these setpoints. An RTO
system completes all data transfer, optimization calculations, and setpoint
implementations before unit conditions change and require a new optimum
to be calculated.
Some of the RTO problems characteristic of level 3 are
1. Re‡ux ratio in distillation .
2. Ole…n manufacture .
3. Ammonia synthesis .
4. Hydrocarbon refrigeration .
The last example is particularly noteworthy because it represents the
current state of the art in utilizing fundamental process models in RTO.
Another activity in RTO is determining the values of certain empirical pa-
rameters in process models from the process data after ensuring that the
process is at steady state. Measured variables including ‡ow rates, temper-
58 6. Integrated Planning and Scheduling of processes

atures, compositions, and pressures can be used to estimate model para-


meters such as heat transfer coe¢ cients, reaction rate coe¢ cients, catalyst
activity, and heat exchanger fouling factors.
Usually only a few such parameters are estimated online, and then opti-
mization is carried out using the updated parameters in the model. Marlin
and Hrymak (1997) and Forbes et al. (1994) recommend that the updated
parameters be observable, represent actual changes in the plant, and sig-
ni…cantly in‡uence the location of the optimum; also the optimum of the
model should be coincident with that of the true process. One factor in
modeling that requires close attention is the accurate representation of the
process constraints, because the optimum operating conditions usually lie
at the intersection of several constraints. When RTO is combined with
model predictive regulatory control (see Section 16.4), then correct (opti-
mal) moves of the manipulated variables can be determined using models
with accurate constraints.
Marlin and Hrymak (1997) reviewed a number of industrial applications
of RTO, mostly in the petrochemical area. They reported that in prac-
tice a maximum change in plant operating variables is allowable with each
RTO step. If the computed optimum falls outside these limits, you must
implement any changes over several steps, each one using an RTO cycle.
Typically, more manipulated variables than controlled variables exist, so
some degrees of freedom exist to carry out both economic optimization as
well as establish priorities in adjusting manipulated variables while simul-
taneously carrying out feedback control.

6.6 Resent trends in scheduling

Batch process industries in general are consisting of several products pro-


duced in more than one plant in the same premises. Specialty chemicals
and pharmaceutical products are typically produced in batch processes.
The production demand is not …xed; it will change as per the market de-
mand. In these industries the production is decided by the market demand.
These industries produce two or more products in one plant in same equip-
ment. Batch process has reduced inventories and/ or shortened response
time compare to continuous processes 15.
2.2 Scheduling of batch processes and representation of the process (RTN,
STN):
Scheduling is a decision-making process that concerns the allocation
of limited resources to competing tasks over time with the goal of optimizing
one or more objectives. The general scheduling problem can be posed as
follows:
Production facility data; e.g., processing unit and storage vessel
capacities, utility availability, unit connectivity.
6.6 Resent trends in scheduling 59

Detailed production recipes; e.g., stoichiometric coe¢ cients, process-


ing times, processing rates, utility requirements.
Production costs; e.g., raw materials, utilities, cleaning, etc.
Production targets or orders with due dates.
The goal of scheduling is to determine
o The allocation of resources to processing tasks.
o The sequencing and timing of tasks on processing units.
The objectives functions include the minimization of make span, lateness
and earliness, as well as the minimization of total cost. Scheduling formu-
lations can be broadly classi…ed in to discrete-time models and continuous
time models 16.
Early attempts in modeling the process scheduling problems relied
on the discrete- time approach, in which the time horizon is divided in
to a number of time intervals of uniform durations and events such as
the beginning and ending of a task are associated with the boundaries
of these time intervals. To achieve a suitable approximation of the original
problem, it is usually needed to use a time interval that is su¢ ciently small,
for example, the greatest common factor (GCF) of the processing times.
This usually leads to very large combinatorial problems of intractable size,
especially for real-world problems, and hence limits its applications. The
basic concept of the discrete-time approach is illustrated in Fig (2.1).
Continuous-time models events are potentially allowed to take place at
any point in the continuous domain of time. Modeling of this ‡exibility is
accomplished by introducing the concepts of variable event times, which
can be de…ned globally or for each unit. Variables are required to deter-
mine the timings of events. The basic idea of the continuous-time approach
is also illustrated in Fig (2.2). Because of the possibility of eliminating
a major fraction of the inactive event-time interval assignments with the
continuous-time approach, the resulting mathematical programming prob-
lems are usually of much smaller sizes and require less computational e¤orts
for their solution. However, due to the variable nature of the timings of the
events, it becomes more challenging to model the scheduling process and
the continuous-time approach may lead to mathematical models with more
complicated structures compared to their discrete-time counterparts.
Network represented processes are involve in most scheduling problems.
When the production recipes become more complex and/or di¤erent prod-
ucts have low recipe similarities, processing networks are used to represent
the production sequences. This corresponds to a more general case in which
batches can merge and/or split and material balances are required to be
60 6. Integrated Planning and Scheduling of processes

FIGURE 6.2. Recipe networks

taken in to account explicitly. The state-task network and resource-task


network are generally used in scheduling problems 17.
Model -based batch scheduling methodologies can be grouped into two
types: monolithic and sequential approaches Monolithic approaches are
those which simultaneously determine the set of tasks to be scheduled, the
allocation of manufacturing resources to tasks and the sequence of tasks at
any equipment unit. Monolithic scheduling models are quite general; they
are more oriented towards the treatment of arbitrary network processes
involving complex product recipes. They are based on either the state-task
network (STN) or the resource-task network (RTN) concepts to describe
production recipes 18.

6.6.1 State-Task Network (STN):


The established representation of batch processes is in terms of “recipe
networks”4. These are similar to the ‡ow sheet representation of continuous
plants but are intended to describe the process itself rather than a speci…c
plant. Each node on a recipe network corresponds a task, with directed
arcs between nodes representing task precedence. Although recipe networks
are certainly adequate for serial processing structures, they often involve
ambiguities when applied to more complex ones. Consider, for instance, the
network of …ve tasks shown in Fig (2.3).
It is not clear from this representation whether task 1 produces two
di¤erent products, forming the inputs of tasks 2 and 3 respectively, or
6.6 Resent trends in scheduling 61

FIGURE 6.3. STN representation

whether it has only one type of product which is then shared between 2 and
3. Similarly, it is also impossible to determine from Fig (2.3) whether task 4
requires two di¤erent types of feed stocks, respectively produced by tasks 2
and 5, or whether it only needs one type of feedstock which can be produced
by either 2 or 5. Both interpretations are equally plausible. The former
could be the case if, say, task 4 is a catalytic reaction requiring a main
feedstock produced by task 2, and a catalyst which is then recovered from
the reaction products by the separation task 5. The latter case could arise
if task 4 were an ordinary reaction task with a single feedstock produced by
2, with task 5 separating the product from the unreacted material which
is then recycled to 4.
The distinctive characteristic of the STN is that it has two types of
nodes; namely, the state nodes, representing the feeds, intermediate and
…nal products and the task nodes, representing the processing operations
which transform material from one or more input states to one or more
output states. State and task nodes are denoted by circles and rectangles,
respectively.
State-task networks are free from the ambiguities associated with recipe
networks. Figure (2.4) shows two di¤erent STNs, both of which correspond
to the recipe network of Fig (2.3). In the process represented by the STN
of Fig (2.4a), task 1 has only one product which is then shared by tasks
2 and 3. Also, task 4 only requires one feedstock, which is produced by
both 2 and 5. On the other hand, in the process shown in Fig (2.4b), task 1
has two di¤erent products forming the inputs to tasks 2 and 3, respectively.
62 6. Integrated Planning and Scheduling of processes

Furthermore, task 4 also has two di¤erent feedstocks, respectively produced


by tasks 2 and 5.
Bhattacharya et.al. (2009) proposes a mathematical model based on
State Task Network representation for generating optimal schedule for a se-
quence of n continuous processing units responsible for processing m prod-
ucts. Each product line has …xed capacity storage tanks before and after
every unit. Each unit can process only one product line at any point of time.
However, the inputs for all the product lines arrive simultaneously at the in-
put side of the …rst unit, thus giving rise to the possibility of spillage. There
can be multiple intermediate upliftments of the …nished products. An opti-
mal schedule of the units attempts to balance among spillage, changeover
and upliftment failures. They develop an MINLP model for the problem
19.
Ierapetritou et.al. (2004) proposed a new cyclic scheduling approach is
based on the state-task network (STN) representation of the plant and a
continuous-time formulation. Assuming that product demands and prices
are not ‡uctuating along the time horizon under consideration, the pro-
posed formulation determines the optimal cycle length as well as the timing
and sequencing of tasks within a cycle. This formulation corresponds to a
non-convex mixed integer nonlinear programming (MINLP) problem, for
which local and global optimization algorithms are used and the results are
illustrated for various case studies 7.

6.6.2 Resource – Task Network (RTN):


RTN-based mathematical formulations can either be discrete-time or continuous-
time formulations. The original is a discrete-time formulation, where the
time horizon of interest is discretized into a …xed number (T) of uniform
time intervals. The RTN regards all processes as bipartite graphs com-
prising two types of nodes: Resources and Tasks. A task is an operation
that transforms a certain set of resources into another set. The concept
of 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.), utilities
(operators, steam, etc.) as well as equipment conditions (clean, dirty).
The simple motivating example involving a multipurpose batch plant
that requires one raw material and produces two intermediates and one
…nal product. The RTN for this example is presented by Shaik et.al. (2008)
shown in Fig (2.5). The raw material is processed in three sequential tasks,
where the …rst task is suitable in two units (J1 and J2), the second task
is suitable in one unit (J3), and the third task is suitable in two units (J4
and J5). The equipment resources (units) are shown using double arrow
connectors, indicating that the task consumes this resource at the beginning
of the event and produces the same resource at the end of the event point.
A task which can be performed in di¤erent units is considered as multiple,
6.6 Resent trends in scheduling 63

FIGURE 6.4. RTN representation

separate tasks, thus leading to …ve separate tasks (i=1, . . ., 5), each suitable
in one unit 3.
Shaik et.al. (2008) propose a new model to investigate the RTN represen-
tation for unit-speci…c event-based models. For handling dedicated …nite
storage, a novel formulation is proposed without the need for considering
storage as a separate task. The performance of the proposed model is eval-
uated along with several other continuous-time models from the literature
based on the STN and RTN process representations 3.
Grossmann et.al. (2009) consider the solution methods for mixed-integer
linear fractional programming (MILFP) models, which arise in cyclic process
scheduling problems. Dinkelbach’s algorithm is introduced as an e¢ cient
method for solving large-scale MILFP problems for which its optimality
and convergence properties are established. Extensive computational exam-
ples are presented to compare Dinkelbach’s algorithm with various MINLP
methods. To illustrate the applications of this algorithm, we consider in-
dustrial cyclic scheduling problems for a reaction–separation network and a
tissue paper mill with byproduct recycling. These problems are formulated
as MILFP models based on the continuous time Resource-Task Network
(RTN) 21.

6.6.3 Optimum batch schedules and problem formulations


(MILP),MINLP B&B:
Grossmann et.al. (2006) presents a multiple time grid continuous time
MILP model for the short-term scheduling of single stage, multi product
batch plants. It can handle both release and due dates and the objective
can be either the minimization of total cost or total earliness. This formu-
lation is compared to other mixed-integer linear programming approaches,
to a constraint programming model, and to a hybrid mixed-integer lin-
ear/constraint programming algorithm. The results show that the proposed
formulation is signi…cantly more e¢ cient than the MILP and CP models
and comparable to the hybrid model 22.
Mixed Integer Linear Programming (MILP) model is used for the so-
lution of N-dimensional allocation problems. Westerlund et.al. (2007), use
64 6. Integrated Planning and Scheduling of processes

Mixed Integer Linear Programming (MILP) model and solve the one-dimensional
scheduling problems, two-dimensional cutting problems, as well as plant
layout problems and three-dimensional packing problems. Additionally,
some problems in four dimensions are solved using the considered model
23.
Magatao et.al. (2004), present the problem of developing an optimisation
structure to aid the operational decision-making of scheduling activities in
a real-world pipeline scenario. The pipeline connects an inland re…nery to
a harbour, conveying di¤erent types of oil derivatives. The optimisation
structure is developed based on mixed integer linear programming (MILP)
with uniform time discretisation, but the MILP well-known computational
burden is avoided by the proposed decomposition strategy, which relies on
an auxiliary routine to determine temporal constraints, two MILP models,
and a database 24.
A new mixed-integer programming (MIP) formulation is presented for
the production planning of single-stage multi-product processes. The prob-
lem is formulated as a multi-item capacitated lot-sizing problem in which
(a) multiple items can be produced in each planning period, (b) sequence-
independent set-ups can carry over from previous periods, (c) set-ups can
cross over planning period boundaries, and (d) set-ups can be longer than
one period. The formulation is extended to model time periods of non-
uniform length, idle time, parallel units, families of products, backlogged
demand, and lost sales 25.
Bedenik et.al. (2004) describes an integrated strategy for a hierarchi-
cal multilevel mixed-integer nonlinear programming (MINLP) synthesis of
overall process schemes using a combined synthesis/analysis approach. The
synthesis is carried out by multilevel-hierarchical MINLP optimization of
the ‡exible superstructure, whilst the analysis is performed in the economic
attainable region (EAR). The role of the MINLP synthesis step is to obtain
a feasible and optimal solution of the multi-D process problem, and the role
of the subsequent EAR analysis step is to verify the MINLP solution and
in the feedback loop to propose any pro…table superstructure modi…cations
for the next MINLP. The main objective of the integrated synthesis is to
exploit the interactions between the reactor network, separator network
and the remaining part of the heat/energy integrated process scheme 26.
Grossmann et.al. (2009) consider the solution methods for mixed-integer
linear fractional programming (MILFP) models, which arise in cyclic process
scheduling problems. They …rst discuss convexity properties of MILFP
problems, and then investigate the capability of solving MILFP problems
with MINLP methods. Dinkelbach’s algorithm is introduced as an e¢ cient
method for solving large-scale MILFP problems for which its optimality
and convergence properties are established. Extensive computational exam-
ples are presented to compare Dinkelbach’s algorithm with various MINLP
methods 21.
6.6 Resent trends in scheduling 65

Cyclic scheduling is commonly utilized to address short-term scheduling


problems for multi product batch plants under the assumption of relatively
stable operations and product demands. It requires the determination of op-
timal cyclic schedule, thus greatly reducing the size of the overall scheduling
problems with large time horizon. The proposed formulation determines the
optimal cycle length as well as the timing and sequencing of tasks within a
cycle. This formulation corresponds to a non-convex mixed integer nonlin-
ear programming (MINLP) problem, for which local and global optimiza-
tion algorithms 7. Floudas et.al. (1998a) presents a novel mathematical
formulation for the short-term scheduling of batch plants. The proposed
formulation is based on a continuous time representation and results in a
mixed integer linear programming (MILP) problem 27.
Reklaitis et.al. (1999) proposed a MINLP formulation using the state-
task network (STN) representation. They proposed a Bayesian heuristic ap-
proach to solve the resulting non convex model 4. Grossmann et.al. (1991)
presented a reformulation of the multi-period based MILP model based on
lot-sizing. The main strength of this formulation is that it provides a tighter
LP relaxation leading to better solutions than the earlier MILP formulation
28.
Kondili et.al. (1993) studied the problem of planning a multi product
energy-intensive continuous cement milling plant. They utilized a hybrid
discrete-continuous time formulation considering discrete time periods and
time slots of varying duration. The resulting mixed integer linear program-
ming (MILP) problem was solved with conventional MILP solvers based
on branch and bound (B&B) principles. Towards developing e¢ cient math-
ematical models to address the short-term scheduling problem, attention
has been given to continuous-time representations 29. Floudas et.al. (1998a,
1998b) developed a continuous-time formulation for the short-term schedul-
ing problem that requires less number of variables and constraints 27, 30.

6.6.4 Multi-product batch plants:


Multistage, multi-product batch plants with parallel units in one or more
stages abound in the batch chemical industry. In such plants, scheduling of
operations is an essential, critical, and routine activity to improve equip-
ment utilization, enhance on-time customer delivery, reduce setups and
waste, and reduce inventory costs. The most research on batch process
scheduling has focused on serial multi product batch plants or single-stage
non continuous plants, scheduling of multistage, multi product batch plants
has received limited attention in the literature in spite of the industrial sig-
ni…cance of these plants 7. Multi product batch plants, in which every
product follows the same sequence through all the process steps, or as
multi-purpose batch plants, in which each product follows its own distinct
processing sequence by using the available equipment in a product-speci…c
layout 1.
66 6. Integrated Planning and Scheduling of processes

Kondili et.al. (1993) studied the problem of planning a multi product


energy-intensive continuous cement milling plant. They utilized a hybrid
discrete-continuous time formulation considering discrete time periods and
time slots of varying duration [29].
The cyclic scheduling of cleaning and production operations in multi
product multistage plants with performance decay. A mixed-integer nonlin-
ear programming (MINLP) model based on continuous time representation
is proposed that can simultaneously optimize the production and cleaning
scheduling. The resulting mathematical model has a linear objective func-
tion to be maximized over a convex solution space thus allowing globally
optimal solutions to be obtained with an outer approximation algorithm
7. Majozi et.al. (2009) presents a methodology for wastewater minimisa-
tion in multipurpose batch plants characterized by multiple contaminant
streams. The methodology is based on an existing scheduling framework
which then makes it possible to generate the required schedule to realize
the absolute minimum wastewater generation for a problem. The method-
ology involves a two step solution procedure. In the …rst step the resulting
MINLP problem is linearized and solved to provide a starting point for the
exact MINLP problems 31.
.

6.6.5 Waste water minimization (Equalization tank super


structure):
Wastewater minimization in batch plants is gaining importance as the need
for industry to produce the least amount of e- uent becomes greater. This
is due to increasingly stringent environmental legislation and the general
reduction in the amount of available freshwater sources. Wastewater mini-
mization in batch plants has not been given su¢ cient attention in the past.
Smith et.al. (1995) proposed one of the …rst methodologies for wastewater
minimization in batch processes 32. Smith et.al. (1994) proposed method-
ology was an extension of their graphical water pinch method. This method
dealt with single contaminant wastewater minimization, where it was as-
sumed that the optimal process schedule was known a priori. The method
employed a number of water storage vessels to overcome the discontinuous
nature of the operation 33.
Mazozi et.al. (2005a) proposed a mathematical methodology where the
corresponding plant schedule is determined that achieves the wastewater
target. In doing this the true minimum wastewater target can be identi…ed
34. This methodology was latter extended to include multiple contaminants
with multiple storage vessels by Majozi et.al. (2008) 35. The methodology
presented by Majozi et.al. (2009) explores the usage idle processing units as
inherent storage for wastewater. The methodology is derived for the single
contaminant case and can deal with two types of problems. In the …rst type
6.6 Resent trends in scheduling 67

of problem the minimum wastewater target and corresponding minimum


wastewater storage vessel is determined considering inherent storage. The
second problem is centred on the determination of the minimum wastewater
target where the size of the central storage vessel is …xed and inherent
storage is available. In the second type of problem the size of the central
storage limits wastewater reuse 31.
Most of the studies published in literature have dealt with the issue of
minimizing waste using processes separately from the design of e- uent
treatment systems. A conceptual approach has been used to minimize the
wastewater generation in process industries 33. Graphical techniques have
been presented to set targets for the minimum ‡ow rate in a distributed
e- uent system and to design such systems 36, 37.
Shoaib et.al. (2008) addresses the problem of synthesising cost-e¤ective
batch water networks where a number of process sources along with fresh
water are mixed, stored, and assigned to process sinks. In order to address
the complexity of the problem, a three-stage hierarchical approach is pro-
posed. In the …rst stage, global targets are identi…ed by formulating and
solving a linear transportation problem for minimum water usage, maxi-
mum water recycle, and minimum wastewater discharge. These targets are
determined a priori and without commitment to the network con…guration
38.
Manan et al., (2004) has proved its validity in identifying correct water
network targets that include the minimum fresh water and wastewater
‡ow rate targets, the global pinch location and water allocation targets.
A key assumption in that work is that water sources of di¤erent impurity
concentrations are not allowed to mix in the same water storage tank. This
is a limitation that may lead to an excessive number of storage tanks. A
water stream chart which can identify the possibility for direct water reuse
was built. This model included tank capacity, stream concentration upper
bounds and time constraints 39.
Chang et.al. (2006) proposed a general mathematical programming model
is developed to design the optimal bu¤er system for equalizing the ‡ow-
rates and contaminant concentrations of its outputs. The demands for heat-
ing/cooling utilities in a batch plant arise intermittently and their quanti-
ties vary drastically with time, the generation rates of the resulting spent
waters must also be time dependent. A bu¤er tank can thus be used at the
entrance of each utility system to maintain a steady throughput. The cap-
ital cost of a wastewater treatment operation is usually proportional to its
capacity. Thus, for economic reasons, ‡ow equalization is needed to reduce
the maximum ‡ow-rate of wastewater entering the treatment system 10.
A bu¤er system may also be installed to equalize the wastewater ‡ow-
rates and pollutant concentrations simultaneously. The inputs of this equal-
ization system can be the spent utility waters or wastewaters generated
from various batch operations, and the outputs can be considered to be
68 6. Integrated Planning and Scheduling of processes

FIGURE 6.5. Super structure of equilisation tanks

the feeds to di¤erent utility-producing equipments, wastewater-treatment


units and/or discharge points 10.
Li et.al. (2002a,b) adopted both a conceptual design approach and also a
mathematical programming model to eliminate the possibility of producing
an unnecessarily large combined water ‡ow at any instance by using a bu¤er
tank and by rescheduling the batch recipe 13, 14. Later, Li et.al. (2003) used
a two-tank con…guration to remove peaks in the pro…le of total wastewater
‡ow-rate and also in that of one pollutant concentration [40.
A proper design of the water equalization system includes at least
the following speci…cations:
(1) The needed size of each bu¤er tank,
(2) The network con…guration, and
(3) The time pro…les of the ‡ow-rate and pollutant concentrations of the
water stream in every branch of the equalization network.
Super structure of Equalization system presented by Chang et.al. (2006):

6.6.6 Selection of suitable equalization tanks for controlled


‡ow:
The e- uent generated from batch plant is treated in a continuous oper-
ated e- uent treatment plant. Discharge of the e- uent generated from each
one of these plant is discontinuous in nature. Quality and quantity of the
e- uent generated depend on the products produced and their quantities.
In such case selection of suitable equalization tanks plays major role. Se-
lect a equalization tank in such a way that the over‡ow will not occur
and the contaminant concentration will not to high in the discharge of this
equalization tank under the following conditions.
If the production quantities are drastically increase
If the batch failure will occur.
6.6 Resent trends in scheduling 69

If the sudden shout down has taken place


The equalization tank design in such a way that the contaminant con-
centrations will high then the concentration of e- uent will be equalize. In
some cases two equalization tanks are needed, one is lower concentration
and another is higher concentration. So that the e- uent discharge from
the equalization tank has equalized concentration and suitable ‡ow rate
are going to e- uent treatment plant and decrease the shock load of ETP.
70 6. Integrated Planning and Scheduling of processes
This is page 71
Printer: Opaque this

7
Dynamic Optimization

Interest in dynamic simulation and optimization of chemical processes has


increased signi…cantly in process industries over the past two decades. This
is because process industries are driven by strongly competitive markets
and have to face ever-tighter performance speci…cations and regulatory
limits. The transient behavior of chemical processes is typically modeled
by ordinary di¤erential equations (ODEs), di¤erential/algebraic equations
(DAEs), or partial di¤erential/algebraic equations (PDAEs). These equa-
tions describe mass, energy, and momentum balances and thus ensure phys-
ical and thermodynamic consistency. Due to the now widespread industrial
use of dynamic process modeling, dynamic models are increasingly devel-
oped and applied. It is then natural to ask what other applications might
exploit the resources invested in the development of such models. Dynamic
optimization is a natural extension of these dynamic simulation tools be-
cause it automates many of the decisions required for engineering studies.
It consists of determining values for input/control pro…les, initial condi-
tions, and/or boundary conditions of a dynamic system that optimize its
performance over some period of time. Examples of dynamic optimization
tasks include: determination of optimal control pro…les for batch processes;
determination of optimal changeover policies in continuous processes, op-
timizing feeding strategies of various substrates in semi batch fermenters
to maximize the productivity, and …tting of chemical reaction kinetic pa-
rameters to data.
A general formulation of the dynamic optimization problem can be stated
as,
72 7. Dynamic Optimization

Z
min J = G(x(tf ); y(tf ); u(tf ) + L(x(t)); y(t); u(t); t); t 2 [to ; tf ] (7.1)
u(t);tf

h : s:t:x = f (x; u) (7.2)


y(t) = l(x; u) (7.3)

x(to) : xo (7.4)

g : ymin y(t) ymax (7.5)


u min u(t) umax (7.6)

where t0 and tf denote the initial and …nal transition times and vec-
tors x(t), y(t) and u(t) represent the state, output and input trajectories.
Vector functions h and g are used to denote all equality and inequality con-
straints, respectively. Equations 1b,c represent the process model, whereas
equation 1d represents the process and safety constraints. The solution of
the above problem yields dynamic pro…les of manipulated variables u(t) as
well as the grade changeover time, tf –t0. Equation 1 may be solved with
a standard NLP solver through use of CVP, where manipulated variables
are parameterized and approximated by a series of trial functions . Thus,
for the ith manipulated variable,
na
X
ui (t) = aij ij (t tij ) (7.7)
j=1

where tij is the jth switching time of the ith manipulated variable, na is
the number of switching intervals, and aij represents the amplitude of the
ith manipulated variable at the switching time tij.
necessary steps that integrate CVP with the model equations and the
NLP solver are summarized below,
Step 1. Discretize manipulated variables by selecting an appropriate trial
function (see equation 2)
Step 2. Integrate the process model (Equation 1b,c) and the ODE sensi-
tivities (Equations 3) if using a gradient-based solver and the manipulated
variables as inputs
Step 3. Compute the objective function (Equation 1a) and gradients if
necessary
7.1 Dynamic programming 73

Step 4. Provide this information to the NLP solver and iterate starting
with step 2 until an optimal solution is found
Step 5. Construct the optimal recipes using the optimal amplitude and
switching intervals obtained by the NLP solver.
An alternative strategy eliminates Step 2 by discretizing the continuous
process model by simultaneously treating both, the state variables and the
parameterized manipulated variables as decision variables.
In this workshop, we will focus on problem formulation, solution ap-
proach, and demonstrating its application to a polymerization reactor for
optimal product grade transition. We shall use MATLAB tool for solving
a dynamic optimization problem solution.

7.1 Dynamic programming


Dynamic programming is based on Bellman’s principle of optimality, as
described below.
An optimal policy has the property that whatever the initial state and
initial decision are the remaining decisions must constitute an optimal pol-
icy with
regard to the state resulting from the …rst decision.
In short, the principle of optimality states that the minimum or maxi-
mum value (of a function) is a function of the initial state and the initial
time.
In the calculus of variations, we locate a curve as a locus of points ,
whereas dynamic programming considers a curve to be an envelope of tan-
gents. In that sense, the two theories are dual to each other. However, the
duality and equivalence remain valid only for deterministic processes.
Dynamic programming is best suited for multistage processes, where
these processes can be decomposed into n stages as shown in Figure .
However, application of the dynamic programming technique to a continu-
ously operating system leads to nonlinear partial di¤erential equations, the
Hamilton–Jacobi–Bellman (H-J-B) equation that can be tedious to solve.
A brief derivation of the H-J-B equation is given below. For details, please
refer to Bellman (1957), Aris (1961), and Kirk (1970).
The advantage of dynamic programming over the other methods is that
it is possible to use dynamic programming when the constraints are sto-
chastic, as is discussed in the next section. However, dynamic programming
formulation leads to a solution of partial di¤erential equations that can be
tedious to solve. Recently, a …rst version of the stochastic maximum prin-
ciple was presented using the analogy between dynamic programming and
the maximum principle. Interested readers are referred to Rico-Ramirez
and Diwekar(2004). In the last section of this chapter, we present a real-
74 7. Dynamic Optimization

FIGURE 7.1. Calculus of variations and dynamic programming

world case study where we show that a problem solution can be simpli…ed
when one uses a combination of these methods.
This is page 75
Printer: Opaque this

8
Global Optimisation Techniques

8.1 Introduction

Tradictional optimisation techniques have the limitation of getting traped


in the local optimum. To over come this problem some optimisation tech-
niques based on the natural phenomena are proposed. Some stocastic op-
timisation techniques which are popular are presented in the following sec-
tions

8.2 Simulated Annealing


8.2.1 Introduction
This optimization technique resembles the cooling process of molten metals
through annealing. The atoms in molten metal can move freely with respect
to each other at high temperatures. But the movement of the atoms gets
restricted as the temperature is reduced. The atoms start to get ordered
and …nally form crystals having the minimum possible energy. However, the
formation of crystals mostly depends on the cooling rate. If the temperature
is reduced at a very fast rate, the crystalline state may not be achieved
at all, instead, the system may end up in a polycrystalline state, which
may have a higher energy than the crystalline state. Therefore, in order to
achieve the absolute minimum energy state, the temperature needs to be
76 8. Global Optimisation Techniques

reduced at a slow rate. The process of slow cooling is known as annealing


in metallurgical parlance.
The simulated annealing procedure simulates this process of slow cooling
of molten metal to achieve the minimum value of a function in a mini-
mization problem. The cooling phenomenon is simulated by controlling a
temperature-like parameter introduced with the concept of the Boltzmann
probability distribution. According to the Boltzmann probability distribu-
tion, a system in thermal equilibrium at a temperature T has its energy
distributed probabilistically according to P(E) = exp (-EAT), where k is
the Boltzmann constant. This expression suggests that a system at high
temperature has almost uniform probability of being in any energy state,
but at low temperature it has a small probability of being in a high energy
state.
Therefore, by controlling the temperature T and assuming that the search
process follows the Boltzmann probability distribution, the convergence of
an algorithm can be controlled. Metropolis et al. (1953) suggested a way to
implement the Boltzmann probability distribution in simulated thermody-
namic systems. This can also be used in the function minimization context.
Let us say, at any instant the current point is x”) and the function value
at that point is E(t) =f(x(’)). Using the Metropolis algorithm, we can say
that the probability of the next point being at
x" + ’) depends on the di¤erence in the function values at these two
points or on AE = E(f + 1) -E(f) and is calculated using the Boltzmann
probability distribution: If cnE I 0, this probability is 1 and the point x(’
+ ’) is always accepted. In the function minimization context, this makes
sense because if the function value at x" + ’) is better than that at x(’), the
point x(’+ ’) must be accepted. An interesting sjtuation results when AE
> 0, which implies that the function value at x(’ + ’) is worse than that
at x(’). According to many traditional algorithms, the point x’" ’) must
not be chosen in this situation. But according to the Metropolis algorithm,
there is some …nite probability of selecting the point x(’+ even though it is
worse than the point x(’). However, this probability is not the same in all
situations. This probability depends on the relative magnitude of AE and
T values. If the parameter T is large, this probability is more or less high
for points with largely disparate function values. Thus, any point is almost
acceptable for a large value of T. On the other hand, if the parameter T is
small, the probability of accepting an arbitrary point is small. Thus, for
small values of T, the points with only a small deviation in the function
value are accepted.
Simulated annealing (Laarhoven & Aarts 1987) is a point-by-point method.
The algorithm begins with an initial point and a high temperature T. A
second point is created at random in the vicinity of the initial point and
the di¤erence in the function values (AE) at these two points is calculated.
If the second point has a smaller function value, the point is accepted; oth-
erwise the point is accepted with probability exp (-AE/T). This completes
8.3 GA 77

one iteration of the simulated annealing procedure. In the next generation,


another point is created at random in the neighbourhood of the current
point and the Metropolis algorithm is used to accept or reject the point. In
order to simulate the thermal equilibrium at every temperature, a number
of points (n) are usually tested at a particular temperature before reduc-
ing the temperature. The algorithm is terminated when a su¢ ciently small
temperature is obtained or a small enough change in function values is
found.
Step 1 Choose an initial point X(’), a termination criterion E. Set T
su¢ ciently high, number of iterations to be performed at a particular tem-
perature n, and set t = 0.
Step 2 Calculate a neighbouring point x"’’) = N(x(’)). Usually, a random
point in the neighbourhood is created.
Step 3 If AE = E(x(’ + ") - E(x(’)) c 0, set t = t + 1 ; else create a
random number r in the range (0,l). If r 5 exp (-AE/T), set t = t + 1; else
go to step 2.
Step 4 If Ix(’+ - x(’)l c E and T is small, terminate; else if (t mod n) = 0,
then lower T according to a cooling schedule. Go to step 2; else go to step
2. The initial temperature T and the number of iterations (n) performed at
a particular temperature are two important parameters which govern the
successful working of the simulated annealing procedure. If a large initial
T is chosen, it takes a number of iterations for convergence. On the other
hand, if a small initial T is chosen, the search is not adequate to thoroughly
investigate the search space before converging to the true optimum. A large
value of n is recommended in order to achieve a quasi-equilibrium state at
each temperature, but the computation time is more.
Unfortunately, there are no unique values of the initial temperature and
n that work for every problem. However, an estimate of the initial tem-
perature can be obtained by calculating the average of the function values
at a number of random points in the search space. A suitable value of n
can be chosen (usually between 20 and 100) depending on the available
computing resources and the solution time. Nevertheless, the choice of the
initial temperature and the subsequent cooling schedule still remain an art
and usually require some trial-and-error e¤orts.

8.3 GA
8.3.1 Introduction
Genetic algorithms (GAS) are used primarily for optimization purposes.
They belong to the goup of optimization methods known as non-traditional
optimization methods.
Non-traditional optimization methods also include optimization tech-
niques such as neural networks (simulated annealing, in particular). Simu-
78 8. Global Optimisation Techniques

lated annealing is an optimization method that mimics the cooling of hot


metals, which is a natural phenomenon. Through this mode of simulation,
this method is utilized in optimization problems.
Just like simulated annealing, GAS try to imitate natural genetics and
natural selection, which are natural phenomena. The main philosophy be-
hind GA is ’survival of the …ttest’. As a result of this, GAS are primarily
used for maximization problems in optimization.
GAS do not su¤er from the basic setbacks of traditional optimization
methods, such as getting stuck in local minima. This is because GAS work
on the principle of natural genetics, which incorporates large amounts of
randomness and does not allow stagnation.

8.3.2 De…nition
Genetic algorithms are computerized search and optimization algorithms
based on the mechanics of natural genetics and natural selection. Consider
a maximization problem Maximize f ( x ) x;l) 5 xi 5 xi(u) i = 1, 2, ..., N
This is an unconstrained optimization problem. Our aim is to …nd the
maximum of this function by using GAS. For the implementation of GAS,
there are certain well-de…ned steps.

8.3.3 Coding
Coding is the method by which the variables xi are coded into string struc-
tures. This is necessary because we need to translate the range of the func-
tion in a way that is understood by a computer. Therefore, binary coding
is used. This essentially means that a certain number of initial guesses are
made within the range of the function and these are transformed into a bi-
nary format. It is evident that for each guess there might be some required
accuracy. The length of the binary coding is generally chosen with respect
to the required accuracy.
For example, if we use an eight-digit binary code. (0000 0000) would
represent the minimum value possible and (1 11 1 11 11) would represent
the maximum value possible.
A linear mapping rule is used for the purpose of coding:(/) x y - x!/) xi
= xi + (decoded value) 2Il - 1
The decoded value (of si, the binary digit in the coding) is given by the
rule / - I .I ~ Decoded value = C2’si i=O
where
s; E (0, 1) (10.4)
For example, for a binary code (01 1 1), the decoded value will be (0111)
= (112~+ (112~+ (1p2+ (012~= 7
It is also evident that for a code of length 1, there are 2’combinations or
codes possible. As already mentioned, the length of the code depends upon
the required accuracy for that variable. So, it is imperative that there be a
8.3 GA 79

method to calculate the required string length for the given problem. So,
in general, Eq. is used for this purpose.
So, adhering to the above-mentioned rules, it is possible to generate a
umber of guesses or, in other words, an initial population of coded points
that lie in the given range of the function. Then, we move on to the next
step, that is, calculation of the …tness.

8.3.4 Fitness
As has already been mentioned, GAS work on the principle of ‘survival
of the …ttest’. This in e¤ect means that the ‘good points’ or the points
that yield maximum values for the function are allowed to continue in
the next generation, while the less pro…table points are discarded from our
calculations. GAS maximize a given function, so it is necessary to transform
a minimization problem to a maximization problem before we can proceed
with our computations.
Depending upon whether the initial objective function needs to be max-
imized or minimized, the …tness function is hence de…ned in the following
ways: for a minimization problem It should be noted that this transforma-
tion does not alter the location of the minimum value. The …tness function
value for a particular coded string is known as the string’s …tness. This
…tness value is used to decide whether a particular string carries on to the
next generation or not.
GA operation begins with a population of random strings. These strings
are selected from a given range of the function and represent the design or
decision variables. To implement our optimization routine, three operations
are carried out:
F(x) =Ax) for a maximization problem - 1 1 + f(x>
1. Reproduction
2. Crossover
3. Mutation

8.3.5 Operators in GA
Reproduction
The reproduction operator is also called the selection operator. This is
because it is this operator that decides the strings to be selected for the next
generation. This is the …rst operator to be applied in genetic algorithms.
The end result of this operation is the formation of a ‘mating pool’, where
the above average strings are copied in a probabilistic manner. The rule can
be represented as a (…tness of string) Probability of selection into mating
pool The probability of selection of the ith string into the mating pool is
given by where Fi is the …tness of the ith string. Fj is the …tness of thejth
string, and n is the population size.
80 8. Global Optimisation Techniques

The average …tness of all the strings is calculated by summing the …tness
of individual strings and dividing by the population size, and is represented
by the symbol F: - i=l F = - n
It is obvious that the string with the maximum …tness will have the most
number of copies in the mating pool. This is implemented using ‘roulette
wheel selection’. The algorithm of this procedure is as follows. Roulette
wheel selection
Step I Using Fi calculate pi.
Step 2 Calculate the cumulative probability Pi.
Step 3 Generate n random numbers (between 0 and 1).
Step 4 Copy the string that represents the chosen random number in the
cumulative probability range into the mating pool. A string with higher
…tness will have a larger range in the cumulative probability and so has
more probability of getting copied into the mating pool.
At the end of this implementation, all the strings that are …t enough
would have been copied into the mating pool and this marks the end of the
reproduction operation.

Crossover
After the selection operator has been implemented, there is a need to in-
troduce some amount of randomness into the population in order to avoid
getting trapped in local searches. To achieve this, we perform the crossover
operation. In the crossover operation, new strings are formed by exchange
of information among strings of the mating pool. For example,
oo/ooo - 00~111
Crossover point
lljlll
Parents Children
Strings are chosen at random and a random crossover point is decided,
and crossover is performed in the method shown above. It is evident that,
using this method, better strings or worse strings may be formed. If worse
strings are formed, then they will not survive for long, since reproduction
will eliminate them. But what if majority of the new strings formed are
worse? This undermines the purpose of reproduction. To avoid this situ-
ation, we do not select all the strings in a population for crossover. We
introduce a crossover probability (p,). Therefore, (loop,)% of the strings
are used in crossover. ( 1 - p,)% of the strings is not used in crossover.
Through this we have ensured that some of the good strings from the
mating pool remain unchanged. The procedure can be summarized as fol-
lows: Step I Select (loop,)% of the strings out of the mating pool at random.
Step 2 Select pairs of strings at random (generate random numbers that
map the string numbers and select accordingly).
Step 3 Decide a crossover point in each pair of strings (again, this is
done by a random number generation over the length of the string and
8.4 Di¤erential Evolution 81

the appropriate position is decided according to the value of the random


number).
Step 4 Perform the crossover on the pairs of strings by exchanging the
appropriate bits.

Mutation
Mutation involves making changes in the population members directly, that
is, by ‡ipping randomly selected bits in certain strings. The aim of mutation
is to change the population members by a small amount to promote local
searches when the optimum is nearby. Mutation is performed by deciding
a mutation probability pm and selecting strings, on which mutation is to
be performed, at random. The procedure can be summarized as follows:
Step 1 Calculate the approximate number of mutations to be performed
by Approx no. of mutations = nlp, (10.11)
Step 2 Generate random numbers to decide whether mutation is to be
performed on a particular population member or not. This is decided by
a ‘coin toss’. That is, select a random number range to represent true and
one to represent false. If the outcome is true, perform mutation, if false, do
not.
Step 3 If the outcome found in step 2 is true for a particular population
member, then generate another random number to decide the mutation
point over the length of the string. Once decided, ‡ip the bit corresponding
to the mutation point. With the end of mutation, the strings obtained
represent the next generation. The same operations are carried out on this
generation until the optimum value is encountered.

8.4 Di¤erential Evolution


8.4.1 Introduction
Di¤erential evolution (DE) is a generic name for a group of algorithms that
are based on the principles of GA but have some inherent advantages over
GA.
DE algorithms are very robust and e¢ cient in that they are able to …nd
the global optimum of a function with ease and accuracy. DE algorithms
are faster than GAS.
GAS evaluate the …tness of a point to search for the optimum. In other
words, GAS evaluate a vector’s suitability. In DE, this vector’s suitability is
called its cost or pro…t depending on whether the problem is a minimization
or a maximization problem.
In GAS only integers are used and the coding is done in binary format;
in DE, no coding is involved and ‡oating-point numbers are directly used.
82 8. Global Optimisation Techniques

If GAS are to be made to handle negative integers, then the coding


becomes complicated since a separate signed bit has to be used; in DE,
this problem does not arise at all.
XOR Versus Add
In GAS when mutation is performed, bits are ‡ipped at random with
some mutation probability. This is essentially an XOR operation. In DE,
direct addition is used.For example, In GA, 16 = 10,000 and 15 = 01111
(after mutation). In DE, 15 As is evident, the computation time for ‡ipping
four bits and encoding and decoding the numbers in GAS is far more than
the simple addition operationperformed in the case of DE. The question
that remains is how to decide how much to add? This is the main philosophy
behind DE. = 16 + (-1).

8.4.2 DE at a Glance
As already stated, DE in principle is similar to GA. So, as in GA, we use a
population of points in our search for the optimum. The population size is
denoted by NP. The dimension of each vector is denoted by D. The main
operation is the NP number of competitions that are to be carried out to
decide the next generation.
To start with, we have a population of NP vectors within the range of
the objective function. We select one of these NP vectors as our target
vector. We then randomly select two vectors from the population and …nd
the di¤erence between them (vector subtraction). This di¤erence is multi-
plied by a factor F (speci…ed at the start) and added to a third randomly
selected vector. The result is called the noisy random vector. Subsequently,
crossover is performed between the target vector and the noisy random
vector to produce the trial vector. Then, a competition between the trial
vector and the target vector is performed and the winner is replaced into
the population. The same procedure is carried out NP times to decide the
next generation of vectors. This sequence is continued till some convergence
criterion is met.
This summarizes the basic procedure carried out in di¤erential evolution.
The details of this procedure are described below.Assume that the objective
function is of D dimensions and that it has to be minimized. The weighting
constant F and the crossover constant CR are speci…ed. Refer to Fig. for
the schematic diagram of di¤erential evolution.
Step 1 Generate NP random vectors as the initial population: Generate
(NP x D) random numbers and linearize the range between 0 and 1 to cover
the entire range of the function. From these (NP x 0)ra ndom numbers,
generate NP random vectors, each of dimension D, by mapping the random
numbers over the range of the function.
Step 2 Choose a target vector from the population of size NP: First
generate a random number between 0 and 1. From the value of the random
8.4 Di¤erential Evolution 83

FIGURE 8.1. Schematic diagram of DE


84 8. Global Optimisation Techniques

number decide which population member is to be selected as the target


vector (Xi) (a linear mapping rule can be used).
Step 3 Choose two vectors at random from the population and …nd the
weighted di¤erence: Generate two random numbers. Decide which two pop-
ulation members are to be selected (X„ Xb). Find the vector di¤erence
between the two vectors (X, - Xb). Multiply this di¤erence by F to obtain
the weighted di¤erence.
Weighted di¤erence = F(X, - Xb)
Step 4 Find the noisy random vector: Generate a random number. Choose
a third random vector from the population (X,).A dd this vector to the
weighted di¤erence to obtain the noisy random vector (Xf).
Noisy random vector (Xf) = X, + F(X, - Xb)
Step 5 Perform crossover between Xi and Xi to …nd X„the trial vector:
Generate D random numbers. For each of the D dimensions, if the random
number is greater than CR, copy the value from Xii nto the trial vector; if
the random number is less than CR, copy the value from Xf into the trial
vector.
Step 6 Calculate the cost of the trial vector and the target vector: For a
minimization problem, calculate the function value directly and this is the
cost. For a maximization problem, transform the objective function Ax)
using the rule, F(x) = 1/[ 1 +Ax)] and calculate the value of the cost.
Alternatively, directly calculate the value ofAx) and this yields the pro…t.
In case cost is calculated, the vector that yields the lesser cost replaces the
population member in the initial population. In case pro…t is calculated,
the vector with the greater pro…t replaces the population member in the
initial population.
Steps 1-6 are continued till some stopping criterion is met. This may
be of two kinds. One may be some convergence criterion that states that
the error in the minimum or maximum between two previous generations
should be less than some speci…ed value. The other may be an upper bound
on the number of generations. The stopping criterion may be a combination
of the two. Either way, once the stopping criterion is met, the computations
are terminated. Choice of DE Key Parameters (NP, F, and CR) NP should
be 5-10 times the value of D, that is, the dimension of the problem. Choose
F = 0.5 initially. If this leads to premature convergence, then increase F.
The range of values of F is 0 c F c 1.2, but the optimal range is 0.4 c F
c 1.0. Values of F c 0.4 and F > 1.0 are seldom e¤ective. CR = 0.9 is a
good …rst guess. Try CR = 0.9 …rst and then try CR = 0.1. Judging by the
speed, choose a value of CR between 0 and 1.
Several strategies have been proposed in DE. A list of them is as follows:
(a) DE/ best/l/exp, (b) DE/best/2/exp, (c) DE/best/l/bin, (d) DE/best/2/bin,
(e) DE/randtobest/l/exp, (0 DE/rand-to-best/l/bin, (g) DE/rand/l/bin,
(h) DE/rand/2/bin,
(i) DE/rand/l/exp, and Q) DE/rand/2/exp.
8.4 Di¤erential Evolution 85

The notations that have been used in the above strategies have distinct
meanings.The notation after the …rst ’/’, i.e., best, rand-to-best, and rand,
denotes the choice of the vector X,. ‘Best’means that X, corresponds to the
vector in the population that has the minimum cost or maximum pro…t.
‘Rand-to-best’means that the weighted di¤erence between the best vector
and another randomly chosen vector is taken as
X,. ‘Rand’means X, corresponds to a randomly chosen vector from the
population. The notation after the second ‘/’, i.e., 1 or 2, denotes the
number of sets of random vectors that are chosen from the population
for the computation of the weighted di¤erence. Thus ‘2’ means the value
of X; is computed using the following expression:
where Xal, xbl, Xa2, and xb2 are random vectors. The notation after the
third ‘/’, i.e., exp or bin, denotes the methodology of crossover that has been
used. ‘Exp’ denotes that the selection technique used is exponential and
‘bin’denotes that the method used is binomial. What has been described
in the preceding discussion is the binomial technique where the random
number for each dimension is compared with CR to decide from where
the value should be copied into the trial vector. But, in the exponential
method, the instant a random number becomes greater than CR, the rest
of the values are copied from the target vector.
Apart from the above-mentioned strategies, there are some more inno-
vative strategies that are being worked upon by the author’s group and
implemented on some application.
x: = xc + F(Xal - x b l ) + F(Xa2 - xb2,)
Innovations on DE
The following additional strategies are proposed by the author and his as-
sociates, in addition to the ten strategies listed before: (k) DE/best/3/exp,
(1) DE/best/3/bin, (m) DE/rand/3/exp, and (n) DE/rand/3/bin. Very re-
cently, a new concept of ‘nested DE’has been successfully implemented for
the optimal design of an auto-thermal ammonia synthesis reactor (Babu
et al. 2002). This concept uses DE within DE wherein an outer loop takes
care of optimization of key parameters (NP is the population size, CR is
the crossover constant, and F is the scaling factor) with the objective of
minimizing the number of generations required, while an inner loop takes
care of optimizing the problem variables. Yet, the complex objective is
the one that takes care of minimizing the number of generations/function
evaluations and the standard deviation in the set of solutions at the last
generatiodfunction evaluation, and trying to maximize the robustness of
the algorithm.

8.4.3 Applications of DE
DE is catching up fast and is being applied to a wide range of complex
problems. Some of the applications of DE include the following: digital
…lter design (Storn 1995), fuzzy-decision-making problems of fuel ethanol
86 8. Global Optimisation Techniques

production (Wang et al. 1998), design of a fuzzy logic controller (Sastry


et al. 1998), batch fermentation process (Chiou & Wang 1999; Wang &
Cheng 1999), dynamic optimization of a continuous polymer reactor (Lee
et al. 1999), estimation of heat-transfer Parameters in a trickle bed re-
actor (Babu & Sastry 1999), optimal design of heat exchangers (Babu &
Munawar 2000; 2001), Optimization and synthesis of heat integrated distil-
lation systems (Babu & Singh 2000), optimization of an alkylation reaction
(Babu & Chaturvedi 2000), optimization of non-linear functions (Babu &
Angira 2001a), optimization of thermal cracker operation (Babu & An-
gira 2001b), scenariointegrated optimization of dynamic systems (Babu &
Gautam 2001), optimal design of an auto-thermal ammonia synthesis re-
actor (Babu et al. 2002), global optimization of mixed integer non-linear
programming (MINLP) problems (Babu & Angira 2002a), optimization of
non-linear chemical engineering processes (Babu & Angira 2002b; Angira
& Babu 2003), etc. A detailed bibliography on DE covering the applica-
tions on various engineering and other disciplines is available in literature
(Lampinen 2003).

8.5 Interval Mathematics


8.5.1 Introduction
The study of computing with real numbers, i.e. numerical analysis considers
exact numbers and exact analysis. Getting an exact representation these
exact ‡oating point numbers in a …xed length binary number has been a
challenge since inception of computers. With advancement of microproces-
sor technology and high speed computers, it is now possible to work with
higher precision numbers than ever before. In spite of that rounding er-
rors generally occur and approximations are made. There are several other
types of mathematical computational errors that can as well a¤ect results
obtained using computers. The purpose of interval analysis is to provide
upper and lower bounds on the e¤ect all such errors and uncertainties have
on a computed quantity.
The scope/ purpose of this section of the workshop are to introduce in-
terval arithmetic concepts and to study algorithms that use interval arith-
metic to solve global nonlinear optimization problems. It has been shown
that interval global optimization techniques discussed here are guaranteed
to produce numerically correct bounds on global optimum value and global
optimal point. Even if there are multiple solutions, these algorithms guar-
antee …nding all solutions. It is also guaranteed that solutions obtained are
global and not just local.
8.5 Interval Mathematics 87

8.5.2 Interval Analysis


Interval analysis began as a tool for bounding rounding errors (Hansen,
2004). However, it is believed that rounding errors can be detected in an-
other way also. One needs to compute a given result using single precision
and double precision, and if the two results agree to some digits then the
results obtained are believed to be correct. This argument is however not
necessarily valid. Let us look at some examples to understand this in a
better way.
Rump’s example
Using IEEE-754 computers, the following form (from Loh and Walster
(2002)) of Rump’s expression with x0 = 77617 and y0 = 33096 replicates
his original IBM S/370 results.
f (x, y) =(333.75 - x2)y6 + x2(11x2y2 - 121y4 - 2) + 5.5y8 + x/(2y)
With round-to-nearest (the usual default) IEEE-754 arithmetic, the ex-
pression produces:
32-bit: f (x0, y0) = 1.172604
64-bit: f (x0, y0) = 1.1726039400531786
128-bit: f (x0, y0) = 1.1726039400531786318588349045201838
All three results agree in the …rst seven decimal digits and thirteen digits
agree in the last two results. This may make us think that these results
are accurate; nevertheless, they are all completely incorrect. One will be
surprised to know that even their sign is wrong. The correct answer is
f (x0, y0) = -0.827396059946821368141165095479816
The reason for such error is probably rounding error and some catastrophic
cancellation. The example we have seen here is fabricated and may lead us
to think this may not happen in practice. Let us look at some real-life
examples where rounding or computational errors caused a disaster.

8.5.3 Real examples


One famous real life example is that of Ariane disaster that happened after
just 39 seconds of its launch on 4th June, 1996. Due to an error in the
software design (inadequate protection from integer over‡ow), the rocket
veered o¤ its ‡ight path 37 seconds after launch and was destroyed by its
automated self-destruct system when high aerodynamic forces caused the
core of the vehicle to disintegrate. It is one of the most infamous computer
bugs in history.
The European Space Agency’s rocket family had an excellent success
record, set by the high success rate of the Ariane 4 model. The next gen-
eration of Ariane rocket family, Ariane 5, reused the speci…cations from
Ariane 4 software. The Ariane 5’s ‡ight path was considerably di¤erent
and beyond the range for which the reused computer program had been
designed. Because of the di¤erent ‡ight path, a data conversion from a 64-
bit ‡oating point to 16-bit signed integer value caused a hardware exception
88 8. Global Optimisation Techniques

(more speci…cally, an arithmetic over‡ow, as the ‡oating point number had


a value too large to be represented by a 16-bit signed integer). E¢ ciency
considerations had led to the disabling of the software handler for this er-
ror trap, although other conversions of comparable variables in the code
remained protected. This caused a cascade of problems, culminating in
destruction of the entire ‡ight.
The subsequent automated analysis of the Ariane code was the …rst ex-
ample of large-scale static code analysis by abstract interpretation. It was
not until 2007 that European Space Agency could reestablish Ariane 5
launches as reliable and safe as those of the predecessor model.
On February 25, 1991, an Iraqi Scud hit the barracks in Dhahran, Saudi
Arabia, killing 28 soldiers from the US Army’s 14th Quartermaster Detach-
ment. A government investigation was launched to reveal reason of failed
intercept at Dhahran. It turned out that the computation of time in a
Patriot missile, which is critical in tracking a Scud, involved a multiplica-
tion by a constant factor of 1/10. The number 1/10 is a number that has
no exact binary representation, so every multiplication by 1/10 necessarily
causes some rounding error.
(0.1)10 = (0.00011001100110011...)2
The Patriot missile battery at Dhahran had been in operation for 100
hours, by which time the system’s internal clock had drifted by one third
of a second. Due to the closure speed of the interceptor and the target,
this resulted in an error of 600 meters. The radar system had successfully
detected the Scud and predicted where to look for it next, but because of the
time error, looked in the wrong part of the sky and found no missile. With
no missile, the initial detection was assumed to be a spurious track and the
missile was removed from the system. No interception was attempted, and
the missile impacted on a barracks killing 28 soldiers.
Use of standard interval analysis could have detected the roundo¤ dif-
…culty in the Patriot missile example. The extended interval arithmetic
(Hansen, 2004) would have produced a correct interval result in the Ariane
space shuttle example, even in the presence of over‡ow. The Columbia US
Space Shuttle maiden ‡ight had to be postponed because of a clock syn-
chronization algorithm failure. This occurred after the algorithm in ques-
tion had been subjected to a three year review process and formally proved
to be correct.
Unfortunately, the proof was ‡awed. Interval Arithmetic can be used to
perform exhaustive testing that is otherwise impractical. All of these and
similar errors would have been detected if interval rather than ‡oating-point
algorithms had been used.

Performance Benchmark
The relative speed of interval and point algorithms is often the cause of con-
fusion and misunderstanding. People unfamiliar with the virtues of interval
8.5 Interval Mathematics 89

algorithms often ask what is the relative speed of interval and point opera-
tions and intrinsic function evaluations. Aside from the fact that relatively
little time and e¤ort have been spent on interval system software implemen-
tation and almost no time and e¤ort implementing interval-speci…c hard-
ware, there is another reason why a di¤erent question is more appropriate
to ask. Interval and point algorithms solve di¤erent problems. Comparing
how long it takes to compute guaranteed bounds on the set of solutions
to a given problem, as compared to providing an approximate solution of
unknown accuracy, is not a reasonable way to compare the speed of inter-
val and point algorithms. For many even problems, the operation counts
in interval algorithms are similar to those in non-interval algorithms. For
example, the number of iterations to bound a polynomial root to a given
(guaranteed) accuracy using an interval Newton method is about the same
as the number of iterations of a real Newton method to obtain the same
(not guaranteed) accuracy.

Virtues of Interval Analysis


The admirable quality of interval analysis is that it enables the solution of
certain problems that cannot be solved by non-interval methods. The pri-
mary example is the global optimization problem, which is the major topic
of this talk. Prior to the use of interval methods, it was impossible to solve
the nonlinear global optimization problem except in special cases. In fact,
various authors have written that in general it is impossible in principle to
numerically solve such problems. Their argument is that by sampling values
of a function and some of its derivatives at isolated points, it is impossi-
ble to determine whether a function dips to a global minimum (say) be-
tween the sampled points. Such a dip can occur between adjacent machine-
representable ‡oating point values. Interval methods avoid this di¢ culty
by computing information about a function over continua of points even if
interval endpoints are constrained to be machine-representable. Therefore,
it is not only possible but relatively straightforward to solve the global
optimization problem using interval methods.
The obvious comment regarding the apparent slowness of interval meth-
ods for some problems (especially if they lack the structure often found
in real world problems) is that a price must be paid to have a reliable al-
gorithm with guaranteed error bounds that non-interval methods do not
provide. For some problems, the price is somewhat high; for others it is
negligible or nonexistent. For still others, interval methods are more e¢ -
cient.
There are several other virtues of interval methods that make them well
worth paying even a real performance price. In general, interval methods
are more reliable. As we shall see, some interval iterative methods always
converge, while their non-interval counterparts do not. An example is the
Newton method for solving for the zeros of a nonlinear equation.
90 8. Global Optimisation Techniques

Ease of use and availability of software


Despite several advantages of interval analysis, interval mathematics is less
prevalent in practice than one might expect. The main reasons for this are:
i. Lack of convenience (avoidable)
ii. Slowness of many interval arithmetic packages (avoidable)
iii. Slowness of some interval algorithms (occasional)
iv. Di¢ culty of some interval problems
For programming convenience, an interval data type is needed to repre-
sent interval variables and interval constants as single entities rather than as
two real interval endpoints. Now-a-days numerous computing tools support
computations with intervals. This includes, Mathematica, Maple, MuPad,
Matlab, etc. Good interval arithmetic software for various applied problems
is now often available (http://cs.utep.edu/interval-comp/intsoft.html). More
recently compilers have been developed by Sun Microsystems Inc. that rep-
resents the current state of the art and allow interval data types (e.g. SUN
Fortran 95).

8.5.4 Interval numbers and arithmetic


Interval numbers
Interval number (or interval) X is a closed interval, i.e. a set of all real
numbers between and including end-points. Mathematically, can be written
as:

X = fxja x bg (8.1)
A degenerate interval is an interval with zero width, i.e. . The end-
points and of a given interval might not be representable on a given com-
puter. Such an interval might be a datum or the result of a computation
on the computer. In such a case, we round down to the largest machine-
representable number that is less than and round up to the smallest machine-
representable number that is greater than . Thus, the retained interval
contains . This process is called outward rounding.
An under-bar indicates the lower endpoint of an interval; and an over-
bar indicates the upper endpoint. For example, if , then and . Similarly, we
write .

Finite interval arithmetic


Let +, -, ; and denotetheoperationsof addition; subtraction; multiplication; anddivision; respectively:If d

X Y = fx yjx 2 X; y 2 Y g (8.2)
Thus the interval X Y resulting from the operation contains every pos-
sible number that can be formed as x y for each x X, and each y Y.
This de…nition produces the following rules for generating the endpoints
8.5 Interval Mathematics 91

of X Y from the two intervals X = [a, b] and Y = [c, d].

X +Y = [a + c b + d] (8.3)
X Y = [a d b c] (8.4)

Division by an interval containing 0 is considered in extended interval


arithmetic (See Hansen, 2004).
Interval arithmetic operations su¤er from dependency and this can result
in widening of computed intervals and make it di¢ cult to compute sharp
numerical results of complicated expressions. One should always be aware
of this di¢ culty and, when possible, take steps to reduce its e¤ect.

Real functions of intervals


There are a number of useful real-valued functions of intervals, some of
them are listed here.
The mid-point of interval is

The width of X is

The magnitude is de…ned as maximum value of for all

The mignitude is de…ned as minimum value of for all

The interval version of absolute value of X is de…ned as

Interval arithmetic is quite involved with varied theorems and criteria


to produce sharper bounds on computed quantities. Interested readers are
requested to refer Interval Analysis by Moore (Moore, 1966). We now move
quickly to interval global optimization techniques.

8.5.5 Global optimization techniques


Unconstrained optimization problem
Here, we consider the problem

where f is a scalar function of a vector x of n components. We seek the


minimum value f* of f and the point(s) x* at which this minimum occurs.
For simplicity, we assume that any used derivative exists and is continu-
ous in the region considered. However, Interval methods exist that do not
require di¤erentiability. (See Ratschek and Rokne (1988) or Moore, Hansen,
and Leclerc (1991))
92 8. Global Optimisation Techniques

Interval analysis makes it possible to solve the global optimization prob-


lem, to guarantee that the global optimum is found, and to bound its value
and location. Secondarily, perhaps, it provides a means for de…ning and
performing rigorous sensitivity analyses.
Until fairly recently, it was thought that no numerical algorithm can
guarantee having found the global solution of a general nonlinear opti-
mization problem. Various authors have ‡atly stated that such a guarantee
is impossible. Their argument was as follows: Optimization algorithms can
sample the objective function and perhaps some of its derivatives only at a
…nite number of distinct points. Hence, there is no way of knowing whether
the function to be minimized dips to some unexpectedly small value be-
tween
sample points. In fact the dip can be between closest possible points in
a given ‡oating point number system. This is a very reasonable argument;
and it is probably true that no algorithm using standard arithmetic will ever
provide the desired guarantee. However, interval methods do not sample
at points. They compute bounds for functions over a continuum of points,
including ones that are not …nitely representable.

Example 4 Example 1

Consider the following simple optimization problem

We know that the global minimum will be at +/- 2 . Suppose we


evaluate f at x=1 and over the interval . We obtain,

Thus, we know that f (x) 0 for all x [3, 4.5] including such transcen-
dental points as = 3.14.... Since f (1) = 3, the minimum value of f is
no larger than 3. Therefore, the minimum value of f cannot occur in the
interval [3, 4.5]. We have proved this fact using only two evaluations of f.
Rounding and dependence have not prevented us from infallibly drawing
this conclusion. By eliminating subintervals that are proved to not con-
tain the global minimum, we eventually isolate the minimum point. In a
nutshell, an algorithm for global optimization generally provides various
(systematic) ways to do the elimination.

Global optimization algorithm


The algorithm proceeds as follows:
i. Begin with a box x(0) in which the global minimum is sought.
Because we restrict our search to this particular box, our problem is really
constrained. We will discuss this aspect in later.
ii. Delete subboxes of x(0) that cannot contain a solution point. Use
fail-safe procedures so that, despite rounding errors, the point(s) of global
minimum are never deleted.
The methods for Step 2 are as follows:
8.5 Interval Mathematics 93

(a) Delete subboxes of the current box wherein the gradient g of f is


nonzero. This can be done without di¤erentiating g. This use of monotonic-
ity was introduced by Hansen (1980). Alternatively, consistency methods
and/or an interval Newton method can be applied to solve the equation g
= 0. In so doing, derivatives (or slopes) of g are used. By narrowing bounds
on points where g = 0, application of a Newton method deletes subboxes
wherein .
(b) Compute upper bounds on f at various sampled points. The smallest
computed upper bound is an upper bound for f*. Then delete subboxes
of the current box wherein f > . The concept of generating and using an
upper bound in this way was introduced by Hansen (1980).
(c) Delete subboxes of the current box wherein f is not convex. The
concept of using convexity in this way was introduced by Hansen (1980).
iii. Iterate Step 2 until a su¢ ciently small set of points remains. Since
x* must be in this set, its location is bounded. Then bound f over this set
of points to obtain …nal bounds on f*.
For problems in which the objective function is not di¤erentiable, Steps
2a and 2c cannot be used because the gradient g is not de…ned. Step 2b is
always applicable. We now describe these procedures and other aspects of
the algorithm in more detail.

Initial search region (Initial Box)


The user of the algorithm can specify a box or boxes in which the solution
is sought. Any number of …nite boxes can be prescribed to de…ne the region
of search. The boxes can be disjoint or overlap. However, if they overlap,
a minimum at a point that is common to more than one box is separately
found as a solution in each box containing it. In this case, computing e¤ort
is wasted. For simplicity, assume the search is made in a single box. If user
does not specify a box, search is made in default box , where is largest
‡oating point number that can be represented by given number system.
Since we restrict our search to a …nite box, we have replaced the uncon-
strained problem by a constrained one of the form

Actually, we do not solve this constrained problem because we assume the


solution occurs at a stationary point of f. However, it is simpler to assume
the box X is so large that a solution does not occur at a non-stationary
point on the boundary of X.
Walster, Hansen, and Sengupta (1985) compared run time on their inter-
val algorithm as a function of the size of the initial box. They found that in-
creasing box width by an average factor of 9.1 105increasedtheruntimebyanaveragef actorof only4:4:F oronee
108:
94 8. Global Optimisation Techniques

Use of gradient
We assume that f is continuously di¤erentiable. Therefore, the gradient g of
f is zero at the global minimum. Of course, g is also zero at local minima, at
maxima and at saddle points. Our goal is to …nd the zero(s) of g at which f
is a global minimum. As we search for zeros, we attempt to discard any that
are not a global minimum of f. Generally, we discard boxes containing non-
global minimum points before we spend the e¤ort to bound such minima
very accurately.
When we evaluate gradient g over sub-boxes XI, if then there is no sta-
tionary point of f in x. therefore x cannot contain the global minimum and
can be deleted. We can apply hull consistency to further expedite conver-
gence of the algorithm and sometimes reduce the search box.

An upper bound on the minimum


We use various procedures to …nd the zeros of the gradient of the objective
function. Please note that these zeros can be stationary points that are not
the global minimum. Therefore, we want to avoid spending the e¤ort to
closely bound such points when they are not the desired solution. In this
section we consider procedures that help in this regard.
Suppose we evaluate f at a point x. Because of rounding, the result is
generally an interval . Despite rounding errors in the evaluation, we know
without question that f I(x) is an upper bound for and hence for f*. Let
denote the smallest such upper bound obtained for various points sampled
at a given stage of the overall algorithm. This upper bound plays an im-
portant part in our algorithm. Since , we can delete any subbox of X for
which . This might serve to delete a subbox that bounds a non-optimal
stationary point of f. There are various methods that can be applied to the
upper bound on the minimum.

Termination
The optimization algorithm splits and subdivides a box into sub-boxes,
at the same time sub-boxes that are guaranteed to not contain a global
optimum are deleted. Eventually we will have a few small boxes remaining.
For a box to be considered as a solution box, two conditions must be
satis…ed. One,

Where, is speci…ed by user. This condition means that width of a solution


box must be less than a speci…ed threshold. Second, we require

Where, is speci…ed by user. This condition guarantees that the glob-


ally minimum value f* of the objective function is bounded to within the
tolerance .
8.5 Interval Mathematics 95

8.5.6 Constrained optimization


The constrained optimization problem considered here is

Subject to

We assume that function is twice continuously di¤erentiable and con-


straints and are continuously di¤erentiable.
Now let’s understand the John conditions that necessarily hold at a con-
strained (local or global) minimum. We use these conditions in solving the
above constrained optimization problem.
John’s condition for the above optimization problem can be written as:
where, are Lagrange multipliers.
The John conditions di¤er from the more commonly used Kuhn-Tucker-
Karush conditions because they include the Lagrange multiplier u0. If we
set u0 = 1, then we obtain the Kuhn-Tucker-Karush conditions.
The John conditions do not normally include a normalization condition.
Therefore, there are more variables than equations. One is free to remove
the ambiguity in whatever way desired. A normalization can be chosen
arbitrarily without changing the solution x of the John conditions. If no
equality constraints are present in the problem, we can use

Since Lagrange multipliers are non-negative, this assures .


The multipliers vi (i = 1, , r) can be positive or negative. Therefore,
a possible normalization is

However, we want our normalization equation that is continuously dif-


ferentiable so we can apply interval Newton method to solve the John
condition. Therefore we use the following normalization equation:

Where, and is the smallest machine representable number.


An Interval Newton method has been proposed to solve the John con-
dition. Solving the John condition is discussed in detail in Hansen and
Walster (1990).
For further reading on interval global optimization, readers are encour-
aged to browse references listed here.

8.5.7 References
Alefeld, G. (1984). On the convergence of some interval arithmetic modi…-
cations of Newton’s method, SIAM J. Numer. Anal. 21, 363–372.
Alefeld, G. and Herzberger, J. (1983). Introduction to Interval Compu-
tations, Academic Press, Orlando, Florida.
Bazaraa, M. S. and Shetty, C. M. (1979). Nonlinear Programming. The-
ory and Practice,Wiley, NewYork.
96 8. Global Optimisation Techniques

Hansen, E. R. (1969). Topics in Interval Analysis, Oxford University


Press, London.
Hansen, E. R. (1978a). Interval forms of Newton’s method, Computing
20, 153–163.
Hansen, E. R. (1978b). A globally convergent interval method for com-
puting and bounding real roots, BIT 18, 415–424.
Hansen, E. R. (1979). Global optimization using interval analysis-the one
dimensional case, J. Optim. Theory Appl. 29, 331–344.
Hansen, E. R. (1980). Global optimization using interval analysis-the
multi-dimensional case, Numer. Math. 34, 247–270.
Krawczyk, R. (1983). A remark about the convergence of interval se-
quences, Computing 31, 255–259.
Krawczyk, R. (1986). A class of interval Newton operators, Computing
37, 179–183.
Loh, E. andWalster, G.W. (2002). Rump’s example revisited. Reliable
Computing, 8 (2) 245–248.
Moore, R. E. (1965). The automatic analysis and control of error in
digital computation based on the use of interval numbers, in Rall (1965),
pp. 61–130.
Moore, R. E. (1966).Interval Analysis, Prentice-Hall, Englewood Cli¤s,
New Jersey.
Moore, R. E. (1979).Methods and Applications of Interval Analysis,
SIAM Publ., Philadelphia, Pennsylvania.
Moore, R. E., Hansen, E. R„and Leclerc, A. (1992). Rigorous methods
for parallel global optimization, in Floudas and Pardalos (1992), pp.321–
342.
Nataraj, P. S.V. and Sardar, G. (2000). Computation of QFT bounds
for robust sensitivity and gain-phase margin speci…cations, Trans. ASME
Journal of Dynamical Systems, Measurement, and Control, Vol. 122, pp.
528–534.
Nataraj, P. S. V. (2002a). Computation of QFT bounds for robust track-
ing speci…cations, Automatica, Vol. 38, pp. 327–334.
Nataraj, P. S.V. (2002b). Interval QFT:A mathematical and computa-
tional enhancement of QFT, Int. Jl. Robust and Nonlinear Control, Vol.
12, pp. 385–402.
Neumaier, A. (1990). Interval Methods for System of Equations, Cam-
bridge University Press, London.
Ratschek, H., and Rokne, J. (1984). Computer Methods for the Range
of Functions, Halstead Press, NewYork.
Walster, G.W. (1988). Philosophy and practicalities of interval arith-
metic, pages 309–323 of Moore (1988).
Walster, G.W. (1996). Interval Arithmetic: The New Floating-Point Arith-
metic Paradigm, Sun Solaris Technical Conference, June 1996.
8.5 Interval Mathematics 97

Walster, G.W., Hansen, E. R., and Sengupta, S. (1985). Test results for
a global optimization algorithm, in Boggs, Byrd, and Schnabel (1985), pp.
272–287.
6.1. Web References
Fortran 95 Interval Arithmetic Programming Reference
http://docs.sun.com/app/docs/doc/816-2462
INTerval LABoratory (INTLAB) for MATLAB
http://www.ti3.tu-harburg.de/~rump/intlab/
Research group in Systems and Control Engineering, IIT Bombay
http://www.sc.iitb.ac.in/~nataraj/publications/publications.htm
Global Optimization using Interval Analysis
http://books.google.com/books?id=tY2wAkb-zLcC&printsec
=frontcover&dq=interval+global+optimization&hl=en&ei=m8QYTLuhO5mMNbuzoccE&sa=
X&oi=book_result&ct=result&resnum=1&ved=0CCwQ6AEwAA#v=onepage&q&f=false
Global Optimization techniques (including non-inverval)
http://www.mat.univie.ac.at/~neum/glopt/techniques.html
List of Interval related softwares
http://cs.utep.edu/interval-comp/intsoft.html
Interval Global optimization
http://www.cs.sandia.gov/opt/survey/interval.html
Interval Methods
http://www.mat.univie.ac.at/~neum/interval.html
List of publications on Interval analysis in early days
http://interval.louisiana.edu/Moores_early_papers/bibliography.html.
98 8. Global Optimisation Techniques
This is page 99
Printer: Opaque this

9
A GAMS Tutorial

9.1 Introduction
The introductory part of this book ends with a detailed example of the use
of GAMS for formulating, solving, and analyzing a small and simple opti-
mization problem. Richard E. Rosenthal of the Naval Postgraduate School
in Monterey, California wrote it. The example is a quick but complete
overview of GAMS and its features. Many references are made to other
parts of the original user manual , but they are only to tell you where
to look for more details; the material here can be read pro…tably without
reference to the rest of the user manual.
The example is an instance of the transportation problem of linear pro-
gramming, which has historically served as a ’laboratory animal’in the de-
velopment of optimization technology. [See, for example, Dantzig (1963).]
It is good choice for illustrating the power of algebraic modeling languages
like GAMS because the transportation problem, no matter how large the
instance at hand, possesses a simple, exploitable algebraic structure. You
willsee that almost all of the statements in the GAMS input …le we are
about to present would remain unchanged if a much larger transportation
problem were considered.
In the familiar transportation problem, we are given the supplies at sev-
eral plants and the demands at several markets for a single commodity,
and we are given the unit costs of shipping the commodity from plants
to markets. The economic question is: how much shipment should there
100 9. A GAMS Tutorial

FIGURE 9.1. Data for the transportation problem

be between each plant and each market so as to minimize total transport


cost?
The algebraic representation of this problem is usually presented in a
format similar to the following.
Indices:
i = plants
j = markets
Given Data:
ai = supply of commodity of plant i (in cases)
bi = demand for commodity at market j
cij = cost per unit shipment between plant i and market j ($/case)
Decision Variables:
xij = amount of commodity to ship from plant i to market j (cases),
where xij 0, for all i, j
Constraints: P
Observe supply limit at plantPi: j xij aj for all i (cases)
Satisfy demand at market j: P i xij
P bj for all j (cases)
Objective Function: Minimize i j cijxij ($K)
Note that this simple example reveals some modeling practices that we
regard as good habits in general and that are consistent with the design
of GAMS. First, all the entities of the model are identi…ed (and grouped)
by type. Second, the ordering of entities is chosen so that no symbol is
referred to before it is de…ned. Third, the units of all entities are speci…ed,
and, fourth, the units are chosen to a scale such that the numerical values
to be encountered by the optimizer have relatively small absolute orders of
magnitude. (The symbol $K here means thousands of dollars.)
The names of the types of entities may di¤er among modelers. For exam-
ple, economists use the terms exogenous variable and endogenous variable
for given data and decision variable, respectively. In GAMS, the terminol-
ogy adopted is as follows: indices are called sets, given data are called
parameters, decision variables are called variables, and constraints and
the objective function are called equations. The GAMS representation of
the transportation problem closely resembles the algebraic representation
above. The most important di¤erence, however, is that the GAMS version
can be read and processed by the computer.
9.1 Introduction 101

As an instance of the transportation problem, suppose there are two


canning plants and three markets, with the data given in table 2.1. Shipping
distances are in thousands of miles, and shipping costs are assumed to
be $90.00 per case per thousand miles. The GAMS representation of this
problem is as follows:
Sets
i canning plants / seattle, san-diego /
j markets / new-york, chicago, topeka / ;
Parameters
a(i) capacity of plant i in cases
/ seattle 350
san-diego 600 /
b(j) demand at market j in cases
/ new-york 325
chicago 300
topeka 275 / ;
Table d(i,j) distance in thousands of miles
new-york chicago topeka
seattle 2.5 1.7 1.8
san-diego 2.5 1.8 1.4 ;
Scalar f freight in dollars per case per thousand miles /90/ ;
Parameter c(i,j) transport cost in thousands of dollars per case ;
c(i,j) = f * d(i,j) / 1000 ;
Variables
x(i,j) shipment quantities in cases
z total transportation costs in thousands of dollars ;
Positive Variable x ;
Equations
cost de…ne objective function
supply(i) observe supply limit at plant i
demand(j) satisfy demand at market j ;
cost .. z =e= sum((i,j), c(i,j)*x(i,j)) ;
supply(i) .. sum(j, x(i,j)) =l= a(i) ;
demand(j) .. sum(i, x(i,j)) =g= b(j) ;
Model transport /all/ ;
2.2 Structure of a GAMS Model 7
Solve transport using lp minimizing z ;
Display x.l, x.m ;
If you submit a …le containing the statements above as input to the
GAMS program, the transportation model will be formulated and solved.
Details vary on how to invoke GAMS on di¤erent of computers, but the
simplest (’no frills’) way to call GAMS is to enter the word GAMS followed
by the input …le’s name. You will see a number of terse lines describing the
progress GAMS is making, including the name of the …le onto which the
output is being written. When GAMS has …nished, examine this …le, and
102 9. A GAMS Tutorial

if all has gone well the optimal shipments will be displayed at the bottom
as follows.
new-york chicago topeka
seattle 50.000 300.000
san-diego 275.000 275.000
You will also receive the marginal costs (simplex multipliers) below.
chicago topeka
seattle 0.036
san-diego 0.009
These results indicate, for example, that it is optimal to send nothing
from Seattle to Topeka, but if you insist on sending one case it will add
.036 $K (or $36.00) to the optimal cost. (Can you prove that this …gure is
correct from the optimal shipments and the given data?)

9.2 Structure of a GAMS Model


For the remainder of the tutorial, we will discuss the basic components of a
GAMS model, with reference to the example above. The basic components
are listed in table.
There are optional input components, such as edit checks for bad data
and requests for customized reports of results. Other optional advanced fea-
tures include saving and restoring old models, and creating multiple models
in a single run, but this tutorial will discuss only the basic components.
Before treating the individual components, we give a few general remarks.
1. A GAMS model is a collection of statements in the GAMS Language.
The only rule governing the ordering of statements is that an entity of the
model cannot be referenced before it is declared to exist.
2. GAMS statements may be laid out typographically in almost any style
that is appealing to the user. Multiple lines per statement, embedded blank
lines, and multiple statements per line are allowed. You will get a good idea
of what is allowed from the examples in this tutorial, but precise rules of
the road are given in user manual .
3. When you are a beginning GAMS user, you should terminate every
statement with a semicolon, as in our examples. The GAMS compiler does
not distinguish between upper-and lowercase letters, so you are free to use
either.
4. Documentation is crucial to the usefulness of mathematical models.
It is more useful (and most likely to be accurate) if it is embedded within
the model itself rather than written up separately. There are at least two
ways to insert documentation within a GAMS model. First, any line that
starts with an asterisk in column 1 is disregarded as a comment line by the
GAMS compiler. Second, perhaps more important, documentary text can
9.3 Sets 103

be inserted within speci…c GAMS statements. All the lowercase words in the
transportation model are examples of the second form of documentation.
5. As you can see from the list of input components above, the creation
of GAMS entities involves two steps: a declaration and an assignment or
de…nition. Declaration means declaring the existence of something and giv-
ing it a name. Assignment or de…nition means giving something a speci…c
value or form. In the case of equations, you must make the declaration
and de…nition in separate GAMS statements. For all other GAMS entities,
however, you have the option of making declarations and assignments in
the same statement or separately.
6. The names given to the entities of the model must start with a letter
and can be followed by up to thirty more letters or digits

Sets
Sets are the basic building blocks of a GAMS model, corresponding ex-
actly to the indices in the algebraic
representations of models. The Transportation example above contains
just one Set statement:

9.3 Sets
i canning plants / seattle, san-diego /
j markets / new-york, chicago, topeka / ;
The e¤ect of this statement is probably self-evident. We declared two
sets and gave them the names i and j. We also assigned members to the
sets as follows:
104 9. A GAMS Tutorial

i = {Seattle, San Diego} j = {New York, Chicago, Topeka}.


You should note the typographical di¤erences between the GAMS format
and the usual mathematical format for listing the elements of a set. GAMS
uses slashes ’/’ rather than curly braces ’{}’ to delineate the set simply
because not all computer keyboards have keys for curly braces. Note also
that multiword names like ’New York’ are not allowed, so hyphens are
inserted.
The lowercase words in the sets statement above are called text. Text
is optional. It is there only for internal documentation, serving no formal
purpose in the model. The GAMS compiler makes no attempt to interpret
the text, but it saves the text and ’parrots’it back to you at various times
for your convenience. It was not necessary to combine the creation of sets i
and j in one statement. We could have put them into separate statements
as follows:
Set i canning plants / seattle, san-diego / ;
Set j markets / new-york, chicago, topeka / ;
The placement of blank spaces and lines (as well as the choice of upper-
or lowercase) is up to you. Each GAMS user tends to develop individual
stylistic conventions. (The use of the singular set is also up to you. Using
set in a statement that makes a single declaration and sets in one that
makes several is good English, but GAMS treats the singular and plural
synonymously.)
A convenient feature to use when you are assigning members to a set is
the asterisk. It applies to cases when the elements follow a sequence. For
example, the following are valid set statements in GAMS.
Set t time periods /1991*2000/;
Set m machines /mach1*mach24/;
Here the e¤ect is to assign
t = {1991,1992,1993, ....., 2000} m = {mach1, mach2,......, mach24}.
Note that set elements are stored as character strings, so the elements of
t are not numbers.
Another convenient feature is the alias statement, which is used to give
another name to a previously declared set. In the following example:
Alias (t,tp);
the name tp is like a t0 in mathematical notation. It is useful in models
that are concerned with the interactions of elements within the same set.
The sets i, j, t, and m in the statements above are examples of static
sets, i.e., they are assigned their members directly by the user and do not
change. GAMS has several capabilities for creating dynamic sets, which
acquire their members through the execution of set-theoretic and logical
operations. Dynamic sets are discussed in Chapter 12, page107 of user
manual. Another valuable advanced feature is multidimensional sets, which
are discussed in user manual.
9.4 Data 105

9.4 Data
The GAMS model of the transportation problem demonstrates all of the
three fundamentally di¤erent formats that are allowable for entering data.
The three formats are:
Lists
Tables
Direct assignments
The next three sub-sections will discuss each of these formats in turn.

9.4.1 Data Entry by Lists


The …rst format is illustrated by the …rst Parameters statement of the
example, which is repeated below
Parameters
a(i) capacity of plant i in cases
/ seattle 350
san-diego 600 /
b(j) demand at market j in cases
/ new-york 325
chicago 300
topeka 275 / ;
This statement has several e¤ects. Again, they may be self-evident, but
it is worthwhile to analyze them in detail. The statement declares the exis-
tence of two parameters, gives them the names a and b, and declares their
domains to be i and j, respectively. (A domain is the set, or tuple of sets,
over which a parameter, variable, or equation is de…ned.) The statement
also gives documentary text for each parameter and assigns values of a(i)
and b(j) for each element of i and j. It is perfectly acceptable to break this
one statement into two, if you prefer, as follows.
Parameters a(i) capacity of plant i in cases
/ seattle 350
san-diego 600 / ;
Parameters b(j) demand at market j in cases
/ new-york 325
chicago 300
topeka 275 / ;
Here are some points to remember when using the list format.
1. The list of domain elements and their respective parameter values can
be laid out in almost any way you like. The only rules are that the entire
list must be enclosed in slashes and that the element-value pairs must be
separated by commas or entered on separate lines.
2. There is no semicolon separating the element-value list from the name,
domain, and text that precede it. This is because the same statement is
being used for declaration and assignment when you use the list format.
106 9. A GAMS Tutorial

(An element-value list by itself is not interpretable by GAMS and will result
in an error message.)
3. The GAMS compiler has an unusual feature called domain checking,
which veri…es that each domain element in the list is in fact a member of
the appropriate set. For example, if you were to spell ’Seattle’ correctly
in the statement declaring Set i but misspell it as ’Seatle’in a subsequent
element-value list, the GAMS compiler would give you an error message
that the element ’Seatle’does not belong to the set i.
4. Zero is the default value for all parameters. Therefore, you only need
to include the nonzero entries in the element-value list, and these can be
entered in any order .
5. A scalar is regarded as a parameter that has no domain. It can be
declared and assigned with a Scalar statement containing a degenerate list
of only one value, as in the following statement from the transportation
model.
Scalar f freight in dollars per case per thousand miles /90/;
If a parameter’s domain has two or more dimensions, it can still have
its values entered by the list format. This is very useful for entering arrays
that are sparse (having few non-zeros) and super-sparse (having few distinct
non-zeros).

9.4.2 Data Entry by Tables


Optimization practitioners have noticed for some time that many of the
input data for a large model are derived from relatively small tables of
numbers. Thus, it is very useful to have the table format for data entry.
An example of a two-dimensional table (or matrix) is provided the trans-
portation model.
Table d(i,j) distance in thousands of miles
new-york chicago topeka
seattle 2.5 1.7 1.8
san-diego 2.5 1.8 1.4 ;
The e¤ect of this statement is to declare the parameter d and to specify
its domain as the set of ordered pairs in the Cartesian product of i and j. The
values of d are also given in this statement under the appropriate heading.
If there are blank entries in the table, they are interpreted as zeroes. As
in the list format, GAMS will perform domain checking to make sure that
the row and column names of the table are members of the appropriate
sets. Formats for entering tables with more columns than you can …t on
one line and for entering tables with more than two dimensions are given
in Chapter 5, page 43.
9.4 Data 107

9.4.3 Data Entry by Direct Assignment


The direct assignment method of data entry di¤ers from the list and table
methods in that it divides the tasks of parameter declaration and para-
meter assignment between separate statements. The transportation model
contains the following example of this method.
Parameter c(i,j) transport cost in thousands of dollars per case ;
c(i,j) = f * d(i,j) / 1000 ;
It is important to emphasize the presence of the semicolon at the end of
the …rst line. Without it, the GAMS compiler would attempt to interpret
both lines as parts of the same statement. (GAMS would fail to discern a
valid interpretation, so it would send you a terse but helpful error message.)
The e¤ects of the …rst statement above are to declare the parameter c, to
specify the domain (i,j), and to provide some documentary text. The second
statement assigns to c(i,j) the product of the values of the parameters f and
d(i,j). Naturally, this is legal in GAMS only if you have already assigned
values to f and d(i,j) in previous statements.
The direct assignment above applies to all (i,j) pairs in the domain of
c. If you wish to make assignments for speci…c elements in the domain,
you enclose the element names in quotes. For example, c(’Seattle’,’New-
York’) = 0.40; is a valid GAMS assignment statement. The same parameter
can be assigned a value more than once. Each assignment statement takes
e¤ect immediately and overrides any previous values. (In contrast, the same
parameter may not be declared more than once. This is a GAMS error check
to keep you from accidentally using the same name for two di¤erent things.)
The right-hand side of an assignment statement can contain a great va-
riety of mathematical expressions and built-in functions. If you are familiar
with a scienti…c programming language such as FORTRAN or C, you will
have no trouble in becoming comfortable writing assignment statements
in GAMS. (Notice, however, that GAMS has some e¢ ciencies shared by
neither FORTRAN nor C. For example, we were able to assign c(i,j) values
for all (i,j) pairs without constructing ’do loops’.)
The GAMS standard operations and supplied functions are given later.
Here are some examples of valid assignments. In all cases, assume the left-
hand-side parameter has already been declared and the right-hand-side
parameters have already been assigned values in previous statements.
csquared = sqr(c);
e = m*csquared;
w = l/lamda;
eoq(i) = sqrt( 2*demand(i)*ordcost(i)/holdcost(i));
t(i) = min(p(i), q(i)/r(i), log(s(i)));
euclidean(i,j) = qrt(sqr(xi(i) - xi(j) + sqr(x2(i) - x2(j)));
present(j) = future(j)*exp(-interest*time(j));
The summation and product operators to be introduced later can also
be used in direct assignments
108 9. A GAMS Tutorial

Variables
The decision variables (or endogenous variables ) of a GAMS-expressed
model must be declared with a Variables
statement. Each variable is given a name, a domain if appropriate, and
(optionally) text. The transportation
model contains the following example of a Variables statement.

9.5 Variables
x(i,j) shipment quantities in cases
z total transportation costs in thousands of dollars ;
This statement results in the declaration of a shipment variable for each
(i,j) pair. (You will see in Chapter 8, page 65, how GAMS can handle
the typical real-world situation in which only a subset of the (i,j) pairs is
allowable for shipment.)
The z variable is declared without a domain because it is a scalar quan-
tity. Every GAMS optimization model must contain one such variable to
serve as the quantity to be minimized or maximized.
Once declared, every variable must be assigned a type. The permissible
types are given below. Variable Type Allowed Range of Variable
free(default) -1 to +1
positive 0 to +1
negative -1 to 0
binary 0 or 1
integer 0, 1, . . . , 100 (default)
The variable that serves as the quantity to be optimized must be a scalar
and must be of the free type. In our transportation example, z is kept
free by default, but x(i,j) is constrained to non-negativity by the following
statement.
Positive variable x ;
Note that the domain of x should not be repeated in the type assignment.
All entries in the domain automatically have the same variable type.
Section 2.10 of user manual describes how to assign lower bounds, upper
bounds, and initial values to variables.

9.6 Equations
The power of algebraic modeling languages like GAMS is most apparent
in the creation of the equations and inequalities that comprise the model
under construction. This is because whenever a group of equations or in-
equalities has the same algebraic structure, all the members of the group
are created simultaneously, not individually.
9.6 Equations 109

9.6.1 Equation Declaration


Equations must be declared and de…ned in separate statements. The format
of the declaration is the same as for other GAMS entities. First comes the
keyword, Equations in this case, followed by the name, domain and text
of one or more groups of equations or inequalities being declared. Our
transportation model contains the following equation declaration:
Equations
cost de…ne objective function
supply(i) observe supply limit at plant i
demand(j) satisfy demand at market j ;
Keep in mind that the word Equation has a broad meaning in GAMS.
It encompasses both equality and inequality relationships, and a GAMS
equation with a single name can refer to one or several of these relationships.
For example, cost has no domain so it is a single equation, but supply refers
to a set of inequalities de…ned over the
domain i.

9.6.2 GAMS Summation (and Product) Notation


Before going into equation de…nition we describe the summation notation in
GAMS. Remember that GAMS is designed for standard keyboards and line-
by-line input readers, so it is not possible (nor would it be convenient for
the user) to employ the standard mathematical notation for summations.
The summation notation in GAMS can be used for simple and com-
plex expressions. The format is based on the idea of always thinking of a
summation as an operator with two arguments: Sum(index of summation,
summand) A comma separates the two arguments, and if the …rst argument
requires a comma then it should be in parentheses. The second argument
can be any mathematical expression including another summation.

9.6.3 Equation De…nition

Equation de…nitions are the most complex statements in GAMS in terms


of their variety. The components of an equation de…nition are, in order:
1. The name of the equation being de…ned
2. The domain
3. Domain restriction condition (optional)
4. The symbol ’..’
5. Left-hand-side expression
6. Relational operator: =l=, =e=, or =g=
7. Right-hand-side expression
The transportation example contains three of these statements.
cost .. z =e= sum((i,j), c(i,j)*x(i,j)) ;
110 9. A GAMS Tutorial

supply(i) .. sum(j, x(i,j)) =l= a(i) ;


demand(j) .. sum(i, x(i,j)) =g= b(j) ;
Here are some points to remember.
1)The power to create multiple equations with a single GAMS statement
is controlled by the domain. For example, the de…nition for the demand
constraint will result in the creation of one constraint for each element of
the domain j, as shown in the following excerpt from the GAMS output.
DEMAND(new-york)..X(seattle,new-york) + X(san-diego,new-york)=G=325
;
DEMAND(chicago).. X(seattle,chicago) + X(san-diego,chicago) =G=300
;
DEMAND(topeka).. X(seattle,topeka) + X(san-diego,topeka) =G=275
;
2) The key idea here is that the de…nition of the demand constraints
is exactly the same whether we aresolving the toy-sized example above or
a 20,000-node real-world problem. In either case, the user enters just one
generic equation algebraically, and GAMS creates the speci…c equations
that are appropriate for the model instance at hand. (Using some other
optimization packages, something like the extract above would be part of
the input, not the output.)
3) In many real-world problems, some of the members of an equation
domain need to be omitted or di¤erentiated from the pattern of the others
because of an exception of some kind. GAMS can readily accommodate this
loss of structure using a powerful feature known as the dollar or ’such-that’
operator, which is not illustrated here. The domain restriction feature can
be absolutely essential for keeping the size of a real-world model within the
range of solvability.
4)The relational operators have the following meanings:
=l= less than or equal to
=g= greater than or equal to
=e= equal to
5) It is important to understand the di¤erence between the symbols ’=’
and ’=e=’. The ’=’ symbol is used only in direct assignments, and the
’=e=’symbol is used only in equation de…nitions. These two contexts are
very di¤erent. A direct assignment gives a desired value to a parameter
before the solver is called. An equation de…nition also describes a desired
relationship, but it cannot be satis…ed until after the solver is called. It
follows that equation de…nitions must contain variables and direct assign-
ments must not.
6)ariables can appear on the left or right-hand side of an equation or
both. The same variable can appear in an equation more than once. The
GAMS processor will automatically convert the equation to its equivalent
standard form (variables on the left, no duplicate appearances) before call-
ing the solver.
9.7 Objective Function 111

7) An equation de…nition can appear anywhere in the GAMS input,


provided the equation and all variables and parameters to which it refers are
previously declared. (Note that it is permissible for a parameter appearing
in the equation to be assigned or reassigned a value after the de…nition.
This is useful when doing multiple model runs with one GAMS input.) The
equations need not be de…ned in the same order in which they are declared.

9.7 Objective Function


This is just a reminder that GAMS has no explicit entity called the ob-
jective function. To specify the function to be optimized, you must create
a variable, which is free (unconstrained in sign) and scalar-valued (has no
domain) and which appears in an equation de…nition that equates it to the
objective function.

9.8 Model and Solve Statements


The word model has a very precise meaning in GAMS. It is simply a col-
lection of equations. Like other GAMS entities, it must be given a name in
a declaration. The format of the declaration is the keyword model followed
by the name of the model, followed by a list of equation names enclosed
in slashes. If all previously de…ned equations are to be included, you can
enter /all/ in place of the explicit list. In our example, there is one Model
statement:
model transport /all/ ;
This statement may seem super‡uous, but it is useful to advanced users
who may create several models in one GAMS run. If we were to use the
explicit list rather than the shortcut /all/, the statement would be written
as model transport / cost, supply, demand / ;
The domains are omitted from the list since they are not part of the
equation name. The list option is used when only a subset of the existing
equations comprises a speci…c model (or sub-model) being generated. Once
a model has been declared and assigned equations, we are ready to call the
solver. This is done with a solve statement, which in our example is written
as solve transport using lp minimizing z ;
The format of the solve statement is as follows:
1. The key word solve
2. The name of the model to be solved
3. The key word using
4. An available solution procedure.
The complete list is
lp for linear programming
112 9. A GAMS Tutorial

qcp for quadratic constraint programming


nlp for nonlinear programming
dnlp for nonlinear programming with discontinuous derivatives
mip for mixed integer programming
rmip for relaxed mixed integer programming
miqcp for mixed integer quadratic constraint programming
minlp for mixed integer nonlinear programming
rmiqcp for relaxed mixed integer quadratic constraint programming
rminlp for relaxed mixed integer nonlinear programming
mcp for mixed complementarity problems
mpec for mathematical programs with equilibrium constraints
cns for constrained nonlinear systems
5. The keyword ’minimizing’or ’maximizing’
6. The name of the variable to be optimized

9.9 Display Statements


The solve statement will cause several things to happen when executed. The
speci…c instance of interest of the model will be generated, the appropriate
data structures for inputting this problem to the solver will be created, the
solver will be invoked, and the output from the solver will be printed to a
…le. To get the optimal values of the primal and/or dual variables, we can
look at the solver output, or, if we wish, we can request a display of these
results from GAMS. Our example contains the following statement:
display x.l, x.m ;
that calls for a printout of the …nal levels, x.l, and marginal (or reduced
costs), x.m, of the shipment variables, x(i,j). GAMS will automatically
format this printout in to dimensional tables with appropriate headings.

9.9.1 The ’.lo, .l, .up, .m’Database


GAMS was designed with a small database system in which records are
maintained for the variables and equations.
The most important …elds in each record are:
.lo lower bound
.l level or primal value
.up upper bound
.m marginal or dual value
The format for referencing these quantities is the variable or equation’s
name followed by the …eld’s name, followed (if necessary) by the domain
(or an element of the domain). GAMS allows the user complete read-and
write-access to the database. This may not seem remarkable to you now,
9.9 Display Statements 113

but it can become a greatly appreciated feature in advanced use. Some


examples of use of the database follow.

9.9.2 Assignment of Variable Bounds and/or Initial Values


The lower and upper bounds of a variable are set automatically according
to the variable’s type (free, positive, negative, binary, or integer), but these
bounds can be overwritten by the GAMS user. Some examples follow.
x.up(i,j) = capacity(i,j) ;
x.lo(i,j) = 10.0 ;
x.up(’seattle’,’new-york’) = 1.2*capacity(seattle’,’new-york’) ;
It is assumed in the …rst and third examples that capacity(i,j) is a para-
meter that was previously declared and assigned values. These statements
must appear after the variable declaration and before the Solve statement.
All the mathematical expressions available for direct assignments are us-
able on the right-hand side. In nonlinear programming it is very important
for the modeler to help the solver by specifying as narrow a range as possible
between lower and upper bound. It is also very helpful to specify an initial
solution from which the solver can start searching for the optimum. For
example, in a constrained inventory model, the variables are quantity(i),
and it is known that the optimal solution to the unconstrained version of
the problem is a parameter called eoq(i). As a guess for the optimum of
the constrained problem we enter quantity.l(i) = 0.5*eoq(i) ;
(The default initial level is zero unless zero is not within the bounded
range, in which case it is the bound closest to zero.)
It is important to understand that the .lo and .up …elds are entirely
under the control of the GAMS user. The .l and .m …elds, in contrast, can
be initialized by the user but are then controlled by the solver.

9.9.3 Transformation and Display of Optimal Values


(This section can be skipped on …rst reading if desired.)
After the optimizer is called via the solve statement, the values it com-
putes for the primal and dual variables are placed in the database in the
.l and .m …elds. We can then read these results and transform and display
them with GAMS statements.
For example, in the transportation problem, suppose we wish to know
the percentage of each market’s demand that is …lled by each plant. After
the solve statement, we would enter parameter pctx(i,j) perc of market j’s
demand …lled by plant i;
pctx(i,j) = 100.0*x.l(i,j)/b(j) ;
display pctx ;
Appending these commands to the original transportation problem input
results in the following output: pctx percent of market j’s demand …lled by
plant I
114 9. A GAMS Tutorial

new-york chicago topeka


seattle 15.385 100.000
san-diego 84.615 100.000
For an example involving marginal, we brie‡y consider the ratio con-
straints that commonly appear in blending and re…ning problems. These
linear programming models are concerned with determining the optimal
amount of each of several available raw materials to put into each of sev-
eral desired …nished products. Let y(i,j) be the variable for the number
of tons of raw material i put into …nished product j. Suppose the ratio
constraint is that
no product can consist of more than 25 percent of one ingredient, that
is,
y(i,j)/q(j) =l= .25 ;
for all i, j. To keep the model linear, the constraint is written as
ratio(i,j).. y(i,j) - .25*q(j) =l= 0.0 ;
rather than explicitly as a ratio.
The problem here is that ratio.m(i,j), the marginal value associated with
the linear form of the constraint, has no intrinsic meaning. At optimality,
it tells us by at most how much we can bene…t from relaxing the linear
constraint to
y(i,j) - .25*q(j) =l= 1.0 ;
Unfortunately, this relaxed constraint has no realistic signi…cance. The
constraint we are interested in relaxing (or tightening) is the nonlinear form
of the ration constraint. For example, we would like to know the marginal
bene…t arising from changing the ratio constraint to
y(i,j)/q(j) =l= .26 ;
We can in fact obtain the desired marginals by entering the following
transformation on the undesired marginals: parameter amr(i,j) appropriate
marginal for ratio constraint ;
amr(i,j) = ratio.m(i,j)*0.01*q.l(j) ;
display amr ;
Notice that the assignment statement for amr accesses both .m and .l
records from the database. The idea behind the transformation is to notice
that
y(i,j)/q(j) =l= .26 ;
is equivalent to
y(i,j) - .25*q(j) =l= 0.01*q(j) ;

9.10 GAMS Output


The default output of a GAMS run is extensive and informative. For a
complete discussion, see Chapter 10, page 79. This tutorial discusses output
partially as follows:
9.10 GAMS Output 115

Echo Print Reference Maps Status Reports. Error Messages Model Statis-
tics Solution Reports. A great deal of unnecessary anxiety has been caused
by textbooks and users’manuals that give the reader the false impression
that ‡awless use of advanced software should be easy for anyone with a
positive pulse rate. GAMS. is designed with the understanding that even
the most experienced users will make errors. GAMS attempts to catch the
errors as soon as possible and to minimize their consequences.

9.10.1 Echo Prints


Whether or not errors prevent your optimization problem from being solved,
the …rst section of output from a GAMS run is an echo, or copy, of your
input …le. For the sake of future reference, GAMS puts line numbers on the
left-hand side of the echo. For our transportation example, which luckily
contained no errors, the echo print is as follows:

3 Sets
4 i canning plants / seattle, san-diego /
5 j markets / new-york, chicago, topeka / ;
6
7 Parameters
8
9 a(i) capacity of plant i in cases
10 / seattle 350
11 san-diego 600 /
12
13 b(j) demand at market j in cases
14 / new-york 325
15 chicago 300
16 topeka 275 / ;
17
18 Table d(i,j) distance in thousands of miles
19 new-york chicago topeka
20 seattle 2.5 1.7 1.8
21 san-diego 2.5 1.8 1.4 ;
22
23 Scalar f freight in dollars per case per thousand miles /90/ ;
24
25 Parameter c(i,j) transport cost in thousands of dollars per case;
26
27 c(i,j) = f * d(i,j) / 1000 ;
28
29 Variables
30 x(i,j) shipment quantities in cases
31 z total transportation costs in thousands of dollars ;
116 9. A GAMS Tutorial

32
33 Positive Variable x ;
34
35 Equations
36 cost de…ne objective function
37 supply(i) observe supply limit at plant i
38 demand(j) satisfy demand at market j ;
39
40 cost .. z =e= sum((i,j), c(i,j)*x(i,j)) ;
41
42 supply(i) .. sum(j, x(i,j)) =l= a(i) ;
43
44 demand(j) .. sum(i, x(i,j)) =g= b(j) ;
45
46 Model transport /all/ ;
47
48 Solve transport using lp minimizing z ;
49
50 Display x.l, x.m ;
51
The reason this echo print starts with line number 3 rather than line
number 1 is because the input …le contains two dollar-print-control state-
ments. This type of instruction controls the output printing, but since it
has nothing to do with de…ning the optimization model, it is omitted from
the echo. The dollar print controls must start in column 1.
$title a transportation model
$o¤uppper
The $title statement causes the subsequent text to be printed at the top
of each page of output. The $o¤upper statement is needed for the echo to
contain mixed upper- and lowercase. Other available instructions are given
in Appendix D, page 193.

9.11 Summary
This tutorial has demonstrated several of the design features of GAMS that
enable you to build practical optimization models quickly and e¤ectively.
The following discussion summarizes the advantages of using an algebraic
modeling language such as GAMS versus a matrix generator or conversa-
tional solver.
1) By using an algebra-based notation, you can describe an optimization
model to a computer nearly as easily as you can describe it to another
mathematically trained person.
9.11 Summary 117

2) Because an algebraic description of a problem has generality, most of


the statements in a GAMS model are reusable when new instances of the
same or related problems arise. This is especially important in environments
where models are constantly changing.
3) You save time and reduce generation errors by creating whole sets of
closely related constraints in one statement.
4) You can save time and reduce input errors by providing formulae for
calculating the data rather than entering them explicitly.
5) The model is self-documenting. Since the tasks of model development
and model documentation can be done simultaneously, the modeler is much
more likely to be conscientious about keeping the documentation accurate
and up to date.
6) The output of GAMS is easy to read and use. The solution report
from the solver is automatically reformatted so that related equations and
variables are grouped together and appropriately labeled. Also, the display
command allows you to modify and tabulate results very easily.
7) If you are teaching or learning modeling, you can bene…t from the
insistence of the GAMS compiler that every equation be mathematically
consistent. Even if you are an experienced modeler, the hundreds of ways
in which errors are detected should greatly reduce development time.
8) By using the dollar operator and other advanced features not covered
in this tutorial, one can e¢ ciently implement large-scale models. Speci…c
applications of the dollar operator include the following:
1. It can enforce logical restrictions on the allowable combinations of
indices for the variables and equations to be included in the model. You
can thereby screen out unnecessary rows and columns and keep the size of
the problem within the range of solvability.
2. It can be used to build complex summations and products, which can
then be used in equations or customized reports.
3. It can be used for issuing warning messages or for terminating prema-
turely conditioned upon context-speci…c data edits
118 9. A GAMS Tutorial
This is page 119
Printer: Opaque this

Appendix A
The First Appendix

Example1.1.
Short‐‐term sccheduling based on Disccrete‐tim
me repre
esentatio
on 

Time horizon:  H= 9 hr   

 
Model:  

,  

 
•6/18/2010

Cyclic Scheduling of  Continuous Plants  
Time slot
k=1 k=2 k = NK Transition
stage 1 ...
k=1 k=2
... k = NK processing
i
stage 2
.
.
.
k=1 k=2 k = NK
stage M ...

time

Time slots of a plant with one production line per stage

(Pinto & Grossmann, 1994)

MINLP model for cyclic scheduling


Maximize
WpMi Im im Zijkm
Profit = ∑p
i
i
Tc
− ∑∑ Cinvim
i m Tc
− ∑∑∑∑ Ctrij
i j k m Tc
1 ⎛ TppikM ⎞
− ∑∑
2 i k
Cinvfi α iM RpiM ⎜1 −
⎝ Tc ⎠
⎟TppikM (1)

subject to
∑y k
ikm =1 ∀i ∀m (2a)

∑y i
ik
ikm =1 ∀k ∀m (2b)

∑z
j
ijkm = yikm ∀j ∀k ∀m (3a)

∑z
i
ijkm = y jk −−1m ∀i ∀k ∀m (3b)

•1
•6/18/2010

Tspikm − U im yikm ≤ 0
T
∀i ∀ k ∀m (4a)

Tepikm − U im yikm ≤ 0
T ∀i ∀ k ∀m (4b)

T ikm − U im yikm ≤ 0
Tpp
T
∀i ∀ k ∀m (4 )
(4c)

Tppikm = Tepikm − Tspikm ∀ i ∀ k ∀m (4d)

∑ Tspi
i1 m = ∑ ∑τi j
ijm z ij 1 m ∀m (5a)

∑ Tspi
i ( k + 1) m = ∑ Tep
i
ikm + ∑ ∑ τ ijm z ij ( k
i j
+ 1) m ∀ k < NK ∀m (5b)

⎛ ⎞
T c ≥ ∑ ⎜⎜ ∑ Tpp ikm + ∑ ∑ τijm zijkm ⎟⎟ (5c)
k ⎝ i i j ⎠

Tppikm Tppikm
Tspikm Tepikm stage m Tspikm Tepikm

Tppik(m+1) Tppik(m+1)
stage m+1
Tspik(m+1) Tepik(m+1) Tspik(m+1) Tepik(m+1)

Inventory Inventory
level level
I1im I2im I1im
I2im

I0im I3im I0im I3im

time time

Inventory levels of products between stages

•2
•6/18/2010

⎧ ⎫
I 1im = I 0 im + α im Rp im min ⎨ ∑ Tsp ik ( m + 1) − ∑ Tsp ikm , ∑ Tpp ikm ⎬
⎩ k k k ⎭
⎧ ⎫
I 2 im = I 1im + (α im Rp im − Rp i ( m +1) )max ⎨0, ∑ Tep ikm − ∑ Tsp ik ( m + 1) ⎬
⎩ k k ⎭
⎧ ⎫
I 3im = I 2 im − Rp i ( m +1) min ⎨ ∑ Tpp ik ( m + 1), ∑ Tep ik ( m + 1) − ∑ Tep ikm ⎬
⎩ k ⎭
0 ≤ I 1im ≤ Im im
k k

0 ≤ I 2 im ≤ Im im
0 ≤ I 3im ≤ Im im
Im im ≤ U im
I
i

I 3im = I 0 im ∀i ∀m (6)

Wp Mi = α iM Rp iM ∑ Tpp ikM ∀i (7a)


k
(7b)
Wp Mi ≥ DiTc ∀i

Variables:

y ikm ∈ {0 ,1}
0 ≤ z ijkm ≤ 1
Tsp ikm , Tep ikm , Tpp ikm , Wp Mi , T c , Im im , I 0 im , I 1im , I 2 im , I 3 im ≥ 0

•3
•6/18/2010

Motivating example (3P2S)

A A

B B
C C

stage 1 stage 2

Product sale pprice ($


($/ton)) demand ((kg/h)
g )
A 150 50
B 400 100
C 650 250

stage 1 stage 2
processing intermediate processing final
rate storage rate inventory
product (kg/h) ($/ton) (kg/h) ($/ton.h)
A 800 140.6 900 4.06
B 1200 140.66
140 600 44.06
06
C 1000 140.6 1100 4.06

Transition times (sequence dependent)

stage 1 stage 2
product A B C A B C
A - 10 3 - 7 3
B 3 - 6 3 - 10
C 8 3 - 4 0 -

•4
•6/18/2010

3 B 3 A 3 C
stage 1
0 10.84 19.72 94.05

B 3 A 3 C
stage 2
0 15 68
15.68 23 9
23.9 91 75
91.75

Inv
( )
(ton)

Time (hr)

Results for motivating example (3P2S)


Profit = $ 442.53 / hr
Cycle time = 94.05 hr
Variables = 146 (18 bin)
Constraints = 162
CPU time = 12.43 sec

Product demand (kg/hr) production (kg/h)


A 50 50
B 100 100
C 250 758

•5
Overview of Planning and Scheduling:
Short-term Scheduling of Batch Plants –
Discrete time model

Dr. Munawar A. Shaik


Assistant Professor
Department of Chemical Engineering

Basic Definitions & Applications


Scheduling: Efficient management of resources over a set of
units to perform a group of activities in an optimal fashion

Planning: What? Where? How much?


Scheduling: How?
Applications:
♣ Operations Research Community:
♣ Flowshops & Jobshops
♣ Scheduling of Personnel, Vehicles etc.
♣ Chemical Engineering:
♣ Batch plants: Food, Pharmaceuticals, Paper products &
Specialty Chemicals
♣ Continuous/Semi-continuous: Petrochemical & Refinery
operations

1
People & Places
Chemical engineers have made significant contributions
in Operations Scheduling in the past two decades

♣ Shah, Pantelides et al Æ Imperial College, London

♣ Grossmann et al Æ CMU

♣ Floudas et al Æ Princeton Univ.

♣ Kar
Karimi
m ett a
al ÆN
NUS
S

♣ Reklaitis, Pekny et al Æ Purdue

♣ Pinto et al Æ RPI

♣ Ierapetritou et al Æ Rutgers Univ.

Supply Chain of an Enterprise


Challenges:
Other Resources Integration
Æ Different time scales
Æ Consistent Decisions
Planning Æ Infrequent Revision
Æ Large-size Problems

Forecasting Scheduling

Market Operations RTO

Management MPC

Demand/Supply Plant Control & Instrumentation

Vertical Integration in an Enterprise is Desirable

2
Planning and Scheduling
Multi-site Production Planning:
Time Horizon is
period 1 period 2 period T longer

site 1 site 2 site N

Medium-term & Short-term Scheduling:


R l i l Short
Relatively Sh Ti
Time
period t Horizons Typical Time Horizons:
Planning Æ 3 months to 1 year
Medium-term Æ week or month
Short-term Æ hour or day

site n

Problem Statement
Given:
¾Set of products along with their demands and due dates
¾Set of manufacturing locations
¾Process flow sheet at each plant
¾Equipment and storage capacities
¾Batch processing time for each product in all stages
¾Transition times (sequence dependent)
¾Production, transportation, inventory or earliness, and tardiness costs

For Planning determine: For Scheduling determine:


¾Optimal sequencing at each plant
¾Order allocation across plants
¾Start and finish times of different
¾Amounts of products to be
tasks on each unit
produced
¾Optimal inventory levels
¾Length of short-term horizon
¾Optimal dispatch schedule

3
Classification of Scheduling Problems
Batch Plants
Continuous/Semi-continuous Medium-term Scheduling
Mixed d production
d
Short-term scheduling
lines
Cyclic scheduling
Serial units
Parallel lines Robust scheduling
Hybrid flowshops Reactive scheduling

Discrete time
Slot-based
Global-event based
Continuous-time
formulation Unit-specific-event based
Precedence based

Classification of Scheduling Problems

Multi-product plants
Max Profit (job shops)

Min Make Span Multi-purpose plants


(flow shops)
Min Tardiness/Earliness

Without Resources

With Resources
Unlimited Storage (Utilities)

No Storage / Zero-wait
Dedicated Storage
Finite-Intermediate
Storage Flexible Storage

4
Classification of Scheduling Problems

fA A
fB 1 2 3 4 B
fC C

Multi-product plants (flow shop)

fA A
fB 1 2 3 4 B
C fC

Multi-purpose plants (job shop)

Process Representation
STN Representation:
¾State-Task Network (STN) S8 Product 1

¾Resource-Task Network (RTN) 0.4 IntAB


Heating 0.4 Reaction 2 0.6
S4 S5
p diagrams
g
S1
¾Recipe F dA
Feed
i=1 i=4, 5
06
0.6
Hot A Impure E 0.1
Separation
S6 IntBC S7
¾2 products, 3 feeds, 4 intermediates i=8
0.9
¾1 heater, 2 reactors, 1 still S2 Reaction 1 Reaction 3 S9
i=2, 3 i=6, 7
¾9 states, 8 tasks Feed B 0.5 0.2 Product 2
S3

Feed C

Gantt Chart Schedule:

5
Process Representations: STN vs RTN
S8 Product 1

STN Representation:
0.4 IntAB
¾1 heater, 2 reactors, 1 still Heating 0.4 Reaction 2 0.6
S1 S4 S5
i=1 i=4, 5
¾9 states, 8 tasks Feed A Hot A 0.6
Impure E 0.1
Separation
S6 IntBC S7
i=8
09
0.9

S2 Reaction 1 Reaction 3 S9
i=2, 3 i=6, 7
Feed B 0.5 0.2 Product 2
S3

RTN Representation: Feed C

S8 Product 1
Heater
J1
Product 2
Feed A Hot A Reaction 2
Heating 0.4 S9
S4 0.4 i=4
S1
i=1
1 R ti 2
Reaction 0.6
0.6 0.9
i=5 IntAB
0.1 Separation Separator
S5 i=8
Reactor1 J4
J2

Feed B IntBC 0.8 Reaction 3


Reaction 1
i=6
S2 0.5 i=2 S6 S7
Reaction 3
¾13 resources, 8 tasks
Reaction 1
0.5 i=7 Impure E
i=3 Reactor2
J3
0.2
Feed C S3

Different Time Representations


ƒ Discrete Time Representation ƒ Continuous Time Representation I
Slot based
U1
U1
U2 Both start and end times
U2 of tasks have to be at an
eventt
UN
UN
5 slots or 6 events
0 1 2 3 4 5 H-1 H
0 1 2 H-1 H
Time intervals of unequal and unknown length
Time intervals of equal length common to all units common to all units

ƒ Continuous Time Representation II ƒ Continuous Time Representation III


U1
Global
Gl b l event n Unit Specific
U1
U2
based n
event based
U2 n+1
Only the start times of tasks
have to be at an event
n
UN UN Only 2 events
4 events
0 12 3 4 H-1 H 0 12 3 H
4 H-1

Events common to all units Events different for each unit

6
Scheduling Characteristics
Profit maximization
Make-span minimization
Performance
Mean-flow time minimization
criteria
Average tardiness minimization

UIS (Unlimited Intermediate Storage)


NIS (No Intermediate Storage)
Transfer
FIS (Finite Intermediate Storage)
policies
ZW (Zero-Wait Policy)
MIS (Mixed Intermediate Storage)

Mathematical Model

Max Profit or Min Makespan

s.t. Allocation constraints


Material balance constraints
Capacity constraints
Storage constraints
Duration constraints
Sequence constraints
Demand constraints
Due date constraint
Time horizon constraints

Mixed-Integer Linear/Nonlinear Optimization Problem

7
Solution of the Scheduling Model

¾ Broadly Two approaches for solution:


Æ Deterministic Methods
Æ Stochastic
h i Methods
M h d

Commercial Software:
Modeling Languages Solvers
♣ GAMS ♣ LP/MILP Æ CPLEX
♣ ILOG OPL Studio ♣ MINLP Æ SBB,
SBB DICOPT
DICOPT, BARON
♣ MOSEL from XPRESSMP ♣ NLP Æ SNOPT, MINOS, CONOPT
♣AMPL, LINGO etc. ♣ DAEs Æ MINOPT

Short-Term Scheduling: Batch Plants


Discrete-time model of Kondili et al. (1993)

They first introduced the concept of STN representation.


One of the first models developed in scheduling literature.

The time horizon is divided into a number of intervals of equal duration


time-horizon

Events of anyy type-such


yp as the start or end of p g individual batches of
processing
individual tasks, changes in the availability of processing equipment and other
resources etc.-are only allowed at the interval boundaries.

The main advantage of this type of time representation is that it facilitates the
formulation by providing a reference grid against which all operations competing
for shared resources are positioned.

8
Short-Term Scheduling: Batch Plants
The length of the time interval is taken to be the highest common factor
of the processing times involved in the problem
The length of the interval may have to be reduced further to ensure that
all resource changes coincide with interval boundaries.

Selection of the grid size:


‰ Tradeoff between accuracy and required computational efforts
‰ Use of the GCF of the processing times as duration of each time
interval
ÆLarge combinatorial problems
‰ Coarser discretization

„Problem size more tractable

„Loss of model accuracy – suboptimal solution

Short-Term Scheduling: Batch Plants


„ Variables
‰ ‘Wijt’ – determines whether a task(i) starts in unit(j)
at the beginning of time period t
‰ ‘Bijt’–
’ amountt off material
t i l that
th t starts
t t undergoing
d i
task(i) in unit (j) at beginning of t
‰ ‘Sst’– amount of material stored in state s, at the
beginning of t

„ Allocation Constraints
‰

9
Short-Term Scheduling: Batch Plants
„ Capacity Limitations
‰

„ Material Balance
‰

„ Other aspects
‰ Similarly other constraints can be modeled using
discrete-time approach such as demand
constraints, duration constraints, different
schedule performance criteria etc.

Examples 1 & 2
STN Representation Product 1
S8

0.4 IntAB
Heating 0.4 Reaction 2 0.6
S1 S4 S5
i=1 i=4, 5
F dA
Feed Hot A 06
0.6 0.1
Impure E
Separation
S6 IntBC S7
i=8
0.9

S2 Reaction 1 Reaction 3 S9
i=2, 3 i=6, 7
Feed B 0.5 0.2 Product 2
S3

Feed C

ƒ Problem involves 4 units, 8 processing tasks, 9 states (3 feed, 4 int, 2 product)


ƒ Finite intermediate storage (FIS) for intermediates S4,S5,S6 and S7 in example 1
& FIS for intermediates S4,S5 & S7 in example 2
ƒTime horizon: example 1(H= 9 h) & example 2 (H= 10 h)
ƒObjective function: Maximization of profit

10
Example 3
STN Representation

A1 A2
Prod A
F dA
Feed Int A

B1 B2

Feed B Prod B
Int B

C1 C2

Feed C Int C Prod C

ƒ Problem involves 4 units, 6 processing tasks, 9 states (3 feed, 3 int, 3 products)


ƒ Finite intermediate storage (FIS) for intermediates int A, int B & int C
ƒTime horizon is 10 h
ƒObjective function: Maximization of profit

Data
Data of coefficients of processing times of tasks, limits on batch sizes of units
Task Unit Processing Bijmin Bijmax
i j times (h) (mu) (mu)
Heating (i=1) Heater 1 --- 100
Reaction1 (i=2) Reactor1 2 --- 80
Examples 1&2 (i=3) Reactor2 2 --- 50
Reaction2 (i=4) Reactor1 2 --- 80
(i=5) Reactor2 2 --- 50
Reaction3 (i=6) Reactor1 1 --- 80
(i=7) Reactor2 1 --- 50
Separation (i=8) Separator 2 --- 200

A1 Unit 1 2 --- 2029


A2 Unit 2 1 --- 1691
B1 Unit 3 1 --- 720
Example 3 B2 Unit 4 1 --- 929
C1 Unit 2 1 --- 1691
C2 Unit 3 2 --- 720

11
Data
Data of storage capacities, initial stock levels and prices of various states

Example 1 Example 2 Example 3


Storage Initial Price
Storage Initial Price Storage Initial Price
capacity stock ($/mu)
capacity stock ($/mu) capacity stock ($/mu)
State (mu) (mu)
State (mu) (mu) (mu) (mu)

Feed A UL AA 0 UL AA 0 Feed A UL AA 0
Feed B UL AA 0 UL AA 0 Feed B UL AA 0
Feed C UL AA 0 UL AA 0 Feed C UL AA 0
Hot A 100 0 1000 0 Int A 100000 0
Int AB 200 0 1000 0 Int B 0 0
Int BC 150 0 0 0 Int C 0 0
Imp E 200 0 1000 0 Prod A UL 1
P1 UL 1 UL 10 Prod B UL 1
P2 UL 1 UL 10 Prod C UL 2.5
UL – Unlimited storage capacity
AA – Available as and when required

Computational Results

Example Time Points CPU Nodes RMILP MILP Binary Continuous Constraints Nonzeros
time (s) ($) ($) variables variables
Example 1 (H=9)
17 0.015 4 232.75 214.75 136 299 358 1263
18 0.015 17 204.99 191.75 144 316 379 1466
20 0.031 91 257.20 241 192 418 505 2065

Example 2 (H=10)
25 0.016 11 2138.01 2053.33 200 435 526 2155
26 0.031 28 2426 2268.33 208 458 547 2245
27 0.032 138 2437 2296.25 216 469 568 2335

Example 3 (H=10)
19 0.016 0 15085 14935 48 130 321 559
20 0.015 21 16591.27 15000 120 310 801 1746
21 0
0.015
015 0 17501 35 16756
17501.35 126 325 841 1835

12
Gantt chart for Example 1

D D

R1 R2 R2 R3 R2 R3

H Heater
R1 R1 R2 R3 R2
R1 Reaction 1
R2 Reaction 2
R3 Reaction 3
D Distillation
H H H

Time (hrs)

Gantt chart for Example 2

D D

R1 R1 R3 R3 R2

R2 R2 R2

H H

Time (hrs)

13
Gantt chart for Example 3

Time (hrs)

14
Short-term Scheduling of Batch Plants:
Slot based and Global-event based
Continuous-time Models

Dr. Munawar A. Shaik


Assistant Professor
Department of Chemical Engineering

Introduction
ƒ Short-term scheduling has received increasing attention from
both academia and industry in the past two decades
ƒ Models are usually classified into two main groups based on
time representation: Floudas & Lin, C&ChE (2004); Floudas & Lin, Annals of OR (2005)

- Discrete-time models Slot based


- Continuous-time models Global-event based
Unit-specific-event based

ƒ Both Slot based and Global event based models use a set of
events that are common for all tasks and all units while Unit
Unit-
specific event based models define events on a unit basis
ƒ Unit-specific event based models are considered the most
general and most rigorous representation of time used in short-
term scheduling problems

1
Different Time Representations
ƒ Discrete Time Representation ƒ Continuous Time Representation I
U1 Slot based
U1
U2 Both start and end times
U2
of tasks have to be at an
event
UN UN

5 slots or 6 events
0 1 2 3 4 5 H-1 H
0 1 2 H-1 H
Time intervals of unequal and unknown length
Time intervals of equal length common to all units
common to all units

ƒ Continuous Time Representation II ƒ Continuous Time Representation III


Global event U1 n Unit Specific
p
U1
based n n+1
event based
U2
U2
Only the start times of tasks
have to be at an event n
UN
UN
Only 2 events
4 events 0 12 3 4 H-1 H
0 12 3 4 H-1 H
Events different for each unit
Events common to all units

Literature Review
Review: Floudas and Lin (2004, 2005), Mendez et al. (2006)

ƒ Slot-based models
– Pinto & Grossmann (1994,1995,1996,1997), Pinto et al. (1998,2000),
– Alle & Pinto (2002
(2002, 2004)
2004), Karimi & McDonald (1997)
(1997), Lamba & Karimi
(2002)
– Sundaramoorthy & Karimi (2005)
ƒ Global event-based models
– Zhang & Sargent (1996,1998), Mockus & Reklaitis (1997,1999)
– Schilling & Pantelides (1996,1999), Mendez & Cerda (2000,2003)
– Maravelias & Grossmann (2003,2004)
– Castro et al (2001,2004,2005,2006), Majozi and Zhu (2001), Lee et al
(2001), Wang & Guignard (2002), Burkard et al (2002,2005),
ƒ Unit-specific
p event-based models
– Ierapetritou & Floudas (1998a,b), Ierapetritou et al (1999), Lin & Floudas
(2001), Lin et al (2003,2004), Janak et al (2004,2005,2006,2007), Shaik and
Floudas (2007)
– Giannelos & Georgiadis (2002, 2003, 2004)

2
General Short-Term Scheduling Model
Max or Min Profit or Makespan

s.t. Allocation constraints


Material balance constraints
Capacity constraints
Storage constraints
Duration constraints
Sequence constraints
Demand constraints
Due date constraint
Time horizon constraints

Mixed-Integer Linear Optimization Problem

Global-event based model of


Castro, Barbosa-Povoa, and Matos (2001)

ƒ Based on RTN process representation


ƒ Global events common across all units
ƒ Binary variables for both start and end times of tasks
ƒ No special sequencing constraints required because
of the unified treatment of different resources using
RTN
ƒ No big-M constraints
ƒ Tasks can occur over multiple events
ƒ Tasks allowed to end before the end time of the event
resulting in inexact process time representations with
additional wait periods

3
Global-event based model of
Castro, Barbosa-Povoa, and Matos (2001)

Global-event based model of


Castro, Barbosa-Povoa, and Matos (2001)
For the objective of maximization of profit:

Max Profit = ∑ price R(r, t = T )


r
r

T (t ') − T (t ) ≥ α i N (i, t , t ') + βi ξ (i, t , t ') ∀i, t , t ' ∈ t ' > t

N (i, t ) = ∑ N (i, t , t ') ∀i, t ∈ t < T


t '> t

ξ (i, t ) = ∑ ξ (i, t , t ') ∀i, t ∈ t < T


t '>t

Vi min N (i, t ) ≤ ξ (i, t ) ≤ Vi max N (i, t ) ∀i, t ∈ t < T

Vi min N (i, t , t ') ≤ ξ (i, t , t ') ≤ Vi max N (i, t , t ') ∀i, t , t ' ∈ t ' > t , t < T

4
Global-event based model of
Castro, Barbosa-Povoa, and Matos (2001)
R(r , t ) = Rr0
t =1
i i t '< t
(
+ R(r , t − 1) t >1 + ∑ ( μri N (i, t ) +ν riξ (i, t ) ) + ∑∑ μri N (i, t ', t ) +ν ri ξ (i, t ', t ) ) ∀r , t

Rrmin ≤ R ( r , t ) ≤ Rrmax ∀r , t

T (t ) ≤ H ∀t

T (t ) = 0 ∀t = 1

N (i, t , t ') = ξ (i, t , t ') = 0 ∀t ' = 1 or t ' ≤ t

N (i, t ) = ξ (i, t ) = N (i, t , t ') = ξ (i, t , t ') = 0 ∀t = T

For the objective of minimization of makespan:


Min MS

R(r , t ) ≥ Demand r t=T

T (t ) ≤ MS t=T

Global-event based model of


Castro, Barbosa-Povoa,Matos, Novais (2004)

ƒ Based on RTN process representation


ƒ Global events common across all units
ƒ Improved model compared to Castro et al (2001) by eliminating
redundant binary and continuous variables and with new timing
constraints
ƒ Binary variables for only end times of tasks
ƒ No special sequencing constraints required because of the
unified treatment of different resources using RTN
ƒ No big-M constraints
ƒ Tasks can occur over multiple events
ƒ Iteration over an additional parameter (Δt) that defines the limit
on the maximum number of events over which a task can occur
ƒ Tasks allowed to end before the end time of the event resulting
in inexact process time representations with additional wait
periods

5
Global-event based model of
Castro, Barbosa-Povoa,Matos, Novais (2004)
The variables N(i,t) and ξ(i,t) are eliminated from the model of CBM and for
each event we have an additional iteration over a parameter Δt.

For the objective of maximization of profit:


Max Profit = ∑ price R(r , t = T )
r
r

(
T (t ') − T (t ) ≥ ∑ μri α i N (i, t , t ') + βi ξ (i, t , t ')
i
) ∀r ∈ R EQ , t , t ', t < t ' ≤ Δt + t , t ≠ T

Vi min N (i, t , t ') ≤ ξ (i, t , t ') ≤ Vi max N (i, t , t ') ∀i, t , t ', t < t ' ≤ Δt + t , t ≠ T

R (r , t ) = Rr0
t =1
+ R (r , t − 1) t >1 + ∑
i
∑ (μ
t <t '≤Δt + t
ri N (i, t , t ') + ν ri ξ (i, t , t ') )
+∑
i
∑ (μ
t −Δt ≤t '<t
ri N (i, t ', t ) +ν ri ξ (i, t ', t ) ) ∀r , t

Rrmin ≤ R(r , t ) ≤ Rimax ∀r , t

Global-event based model of


Castro, Barbosa-Povoa,Matos, Novais (2004)
T (t ) ≤ H ∀t

T (t ) = 0 ∀t = 1

N (i, t , t ') = ξ (i, t , t ') = 0 ∀t ' = 1 or t ' ≤ t or ∀t = T

For the objective of minimization of makespan:


Min MS
R(r , t ) ≥ Demand r t=T
T (t ) ≤ MS t=T
For zero-wait tasks, the following constraint needs to be added:
⎛ ⎞
(
T (t ') − T (t ) ≤ H ⎜1 − ∑ μ ri N (i, t , t ') ⎟ + ∑ μri α i N (i, t , t ') + β i ξ (i, t , t ')
⎝ i∈I ZW ⎠ i∈I ZW
)
∀r ∈ R EQ , t , t ', t < t ' ≤ Δt + t , t ≠ T

6
Global-event based model of
Maravelias and Grossmann (2003)

ƒ Based on STN process representation


ƒ Global events common across all units
ƒ Tasks allowed to take place over multiple events
using time matching constraints involving big-M
constraints
ƒ Accounts for various resource constraints such as
utilities and different storage policies
ƒ Proposed a new class of tightening constraints for
improved LP relaxation

Global-event based model of


Maravelias and Grossmann (2003)
For the objective of maximization of profit:
Max Profit = ∑ price ST (s, N )
s
s

∑ Ws(i, n) ≤ 1
i∈suitij
∀j , n

∑ Wf (i, n) ≤ 1
i∈suitij
∀j , n

∑Ws(i, n)=∑Wf (i, n)


n n
∀i (All tasks that start must finish)

∑ ∑ (Ws(i, n ') − Wf (i, n ')) ≤ 1


i∈suitij n '≤ n
∀j , n (At most one task can continue)

D(i, n) = α iWs (i, n) + βi Bs (i, n) ∀i, n

7
Global-event based model of
Maravelias and Grossmann (2003)
Tf (i, n) ≤ Ts (i, n) + D (i, n) + H (1 − Ws (i, n)) ∀i , n

Tf (i, n) ≥ Ts (i, n) + D (i, n) − H (1 − Ws (i, n)) ∀i, n

Tf (i, n) − Tf (i, n − 1) ≤ H Ws (i, n) ∀i , n > 1


(The finish time of a task i remains unchanged until the next occurance of task i)
Tf (i, n) − Tf (i, n − 1) ≥ D (i, n) ∀i , n > 1

Ts (i, n) = T (n) ∀i, n

Tf (i, n − 1) ≤ T ( n) + H (1 − Wf (i, n)) ∀i , n > 1

For zero-wait tasks, the following constraints are added:

Tf (i, n − 1) ≥ T (n) − H (1 − Wf (i, n)) ∀i ∈ I ZW , n > 1

Global-event based model of


Maravelias and Grossmann (2003)
Ws (i, n) Bimin ≤ Bs (i, n) ≤ Ws (i, n) Bimax ∀i, n Batch-size constraints

Wf (i, n) Bimin ≤ Bf (i, n) ≤ Wf (i, n) Bimax ∀i, n

⎛ ⎞ ⎛ ⎞
Bimin ⎜ ∑ Ws (i, n ') − ∑ Wf (i, n ') ⎟ ≤ Bp(i, n) ≤ Bimax ⎜ ∑ Ws (i, n ') − ∑ Wf (i, n ') ⎟ ∀i, n
⎝ n '< n n '≤ n ⎠ ⎝ n '< n n '≤ n ⎠
Constraint to ensure
Bs (i, n − 1) + Bp (i, n − 1) = Bp (i, n) + Bf (i, n) ∀i , n > 1
Bs(i,n)=Bf(i,n)=Bp(i,n)

B I (i, s, n) = ρ si Bs (i, n) ∀i, n, ∀s ∈ SI (i )

B I (i, s, n) ≤ Bimax ρ siWs (i, n) ∀i, n, ∀s ∈ SI (i )

B O (i, s, n) = ρ si Bf (i, n) ∀i, n, ∀s ∈ SO (i )

B O (i, s, n) ≤ Bimax ρ siWf (i, n) ∀i, n, ∀s ∈ SO (i )

ST ( s, n) = ST ( s, n − 1) + ∑
i∈O ( s )
B O (i, s, n) − ∑ B (i , s , n )
i∈I ( s )
I
∀s, n > 1

8
Global-event based model of
Maravelias and Grossmann (2003)
T ( n + 1) ≥ T ( n) ∀n < N
Tightening constraints
∑ ∑ D(i, n) ≤ H
i∈suitij n
∀j

∑ ∑ D(i, n ') ≤ H − T (n)


i∈suitij n '≥ n
∀j , n

∑ ∑ (α Wf (i, n ') + β Bf (i, n ') ) ≤ T (n)


i∈suitij n '≤ n
i i ∀j , n

Ts (i, n) ≤ H ∀i , n

Tf (i, n) ≤ H ∀i , n

ST ( s, n) ≤ STsmax ∀s ∈ FIS , ∀n
T (n) = Wf (i, n) = Bf (i, n) = B O (i, s, n) = 0 ∀n = 1
Ws (i, n) = Bs (i, n) = D(i, n) = Bp (i, n) = B I (i, s, n) = 0 ∀n = N
T (N ) = H

Global-event based model of


Maravelias and Grossmann (2003)
For the objective of minimization of makespan:
Min MS
ST ( s, N ) ≥ Demand s ∀s T ( N ) = MS

Tightening constraints
∑ ∑ D(i, n) ≤ MS ∀j ∑ ∑ D(i, n ') ≤ MS − T (n)
i∈suitij n '≥ n
∀j , n
i∈suitij n

When utility requirements are considered, the following constraints are added:

R I (i, r , n) = γ irWs (i, n) + δ ir Bs (i, n) ∀i, r , n


R O (i, r , n) = γ irWf (i, n) + δ ir Bf (i, n) ∀i , r , n

R(r , n) = R(r , n − 1) − ∑ R O (i, r , n − 1) + ∑ R I (i, r , n) ∀r , n


i i

R (r , n) ≤ Rrmax ∀r , n

9
Slot based model of
Sundaramoorthy and Karimi (2005)
ƒ Based on process representation using recipe diagrams
ƒ Recent model that claims superior performance
ƒ Slot based but similar to global events common across all units
ƒ Tasks allowed to continue over multiple time slots
ƒ No resources other than materials and equipments
ƒ Several new ways of writing the balances are proposed leading
to a compact model eliminating the otherwise big-M constraints
ƒ Claim that no big-M
big M constraints
ƒ They demonstrated that the model of Giannelos and Georgiadis
(2002) leads to suboptimal solutions
ƒ Claim that the model can effectively handle the objective of
makespan minimization (problems not solved to zero integrality
gap)

Slot based model of


Sundaramoorthy and Karimi (2005)

10
Slot based model of
Sundaramoorthy and Karimi (2005)
The set of tasks (I) also includes an idle task ‘i0’that is suitable on all units.

For the objective of maximization of profit:


Max Profit = ∑ price ST (s, K )
s
s

∑ SL(k ) ≤ H
k

Z ( j, k ) = ∑ Y (i, j, k )
i∈suitij
∀j , 0 ≤ k < K

Z ( j, k ) = ∑ YE (i, j, k )
i∈suitij
∀j , 0 < k < K

Y (i, j, k ) Bijmin ≤ B(i, j , k ) ≤ Y (i, j, k ) Bijmax ∀i > 0, j ∈ suitij ,0 ≤ k < K

y (i, j , k ) Bijmin ≤ b(i, j , k ) ≤ y (i, j , k ) Bijmax ∀i > 0 , j ∈ suitij ,0 < k < K

YE (i, j, k ) Bijmin ≤ BE (i, j , k ) ≤ YE (i, j, k ) Bijmax ∀i > 0, j ∈ suitij ,0 < k ≤ K

Slot based model of


Sundaramoorthy and Karimi (2005)
y (i, j , k ) = y (i, j , k − 1) + Y (i, j , k − 1) − YE (i, j , k ) ∀i, j ∈ suitij , 0 < k < K Balance on status of a unit:

b(i, j , k ) = b(i, j , k − 1)) + B (i, j , k − 1)) − BE (i, j , k ) ∀i > 0 , j ∈ suitij ,k


, >0

t ( j , k + 1) ≥ t ( j , k ) + ∑ (α Y (i, j, k ) + β
i∈suitij
ij ij B(i, j , k ) ) − SL( k + 1) ∀j , k < K

t ( j, k ) ≤ ∑α
i∈suitij
ij y (i, j, k ) + βij b(i, j, k ) ∀j, 0 < k < K

ST ( s, k ) = ST ( s, k − 1) + ∑ ∑ ρ si BE (i, j , k ) + ∑ ∑ ρ si B (i, j , k ) ∀s, k


j i∈suitij ,i ≠ 0, ρ si > 0 j i∈suitij ,i ≠ 0, ρ si < 0

ST ( s, k ) ≤ STsmax ∀s ∈ FIS , ∀k

11
Slot based model of
Sundaramoorthy and Karimi (2005)
Bounds SL(k ) ≤ max ⎡⎢ max(α ij + βij Bijmax ) ⎤⎥ ∀k > 0
j ⎣ i∈suitij ⎦
t ( j , k ) ≤ max(α ij + βij Bijmax ) ∀j , k
i∈suitij

Y ( i , j , k ) = y (i , j , k ) = b ( i , j , k ) = B ( i , j , k ) = 0 ∀i, j ∈ suitij = 0 or k = K

YE (i, j , k ) = y (i, j , k ) = b(i, j , k ) = BE (i, j , k ) = 0 ∀i, j ∈ suitij = 0 or k = 0

Z ( j, k ) = t ( j, k ) = 0 ∀j , k = K

t ( j , k ) = 0; SL ( k ) = 0 ∀k = 0

0 ≤ y (i, j , k ), YE (i, j , k ), Z ( j , k ) ≤ 1

For the objective of minimization of makespan:


K
Min MS= ∑ SL(k )
k =1

ST ( s, K ) ≥ Demand s ∀s

References
Floudas, C. A.; Lin, X. Continuous-time versus discrete-time approaches for scheduling of chemical
processes: A review. Comput. Chem. Eng. 2004, 28, 2109.
Floudas, C. A.; Lin, X. Mixed integer linear programming in process scheduling: Modeling,
algorithms, and applications. Ann. Oper. Res. 2005, 139, 131.
Mendez, C. A.; Cerda, 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
Maravelias, C. T.; Grossmann, I. E. New general continuous-time state-task network formulation for
short-term scheduling of multipurpose batch plants. Ind. Eng. Chem. Res. 2003, 42, 3056.

Pinto, J. M.; Grossmann, I. E. Optimal cyclic scheduling of multistage continuous multiproduct plants.
Comput. Chem. Eng. 1994, 18, 797.

Sundaramoorthy, A
Sundaramoorthy A.;; Karimi
Karimi, II. A
A. A simpler better slot-based continuous-time formulation for short-
term scheduling in multipurpose batch plants. Chem. Eng. Sci. 2005, 60, 2679.

Ierapetritou, M. G.; Floudas, C. A. Effective continuous-time formulation for short-term


scheduling: 1. Multipurpose batch processes. Ind. Eng. Chem. Res. 1998, 37, 4341.

Ierapetritou, M.G.; Floudas, C.A. Effective continuous-time formulation for short-term scheduling: 2.
Continuous and semi-continuous processes. Ind. Eng. Chem. Res. 1998, 37, 4360.

12
References
Janak, S. L.; Lin, X.; Floudas, C. A. Enhanced continuous-time unit-specific event-based formulation for
short-term scheduling of multipurpose batch processes: Resource constraints and mixed storage policies.
Ind. Eng. Chem. Res. 2004, 42, 2516.
Shaik, M. A.; Janak, S. L.; Floudas, C. A. Continuous-time models for short-term scheduling of
multipurpose batch plants: A comparative study. Ind. Eng. Chem. Res. 2006, 45, 6190.

Shaik, M. A.; Floudas, C. A. Improved unit-specific event-based model continuous-time model for
short-term scheduling of continuous processes: Rigorous treatment of storage requirements. Ind. Eng.
Chem. Res. 2007, 46, 1764.
Shaik, M. A.; Floudas, C. A. Unit-specific event-based continuous-time approach for short-term
scheduling of batch plants using RTN framework. Comput. Chem. Eng. 2008, 32, 260.
Shaik, M. A.; Floudas, C. A.; Kallrath, J.; Pitz, H. -J. Production scheduling of a large-scale industrial
continuous plant: Short
Short-term
term and medium
medium-term
term scheduling”
scheduling , Comput.
Comput Chem
Chem. Eng
Eng. 2009,
2009 32,
32 670
670-686
686.

Shaik, M. A.; Bhushan, M.; Gudi, R. D.; Belliappa, A. M. Cyclic scheduling of continuous multi-
product plants in a hybrid flowshop facility. Ind. Eng. Chem. Res. 2003, 42, 5861.

Munawar, S.A. and Gudi, R.D.A Multi-level, Control-theoretic Framework for Integration of Planning,
Scheduling and Rescheduling, Ind. Eng. Chem. Res., 2005, 44, 4001-4021.

Shaik, M. A.; Floudas, C. A. Unit-specific event-based continuous-time approach for short-term


scheduling of batch plants using RTN framework. Comput. Chem. Eng. 2008, 32, 260.

13
Short-term Scheduling of Batch Plants:
Unit-Specific Event-based Continuous-
time Models

Dr. Munawar A. Shaik


Assistant Professor
Department of Chemical Engineering

Unit-specific-event based model of


Ierapetritou and Floudas (1998a,b; et al.1999)
ƒ Based on STN process representation
ƒ Presented the original concept of event points
ƒ “True”
“T ” continuous
ti time
ti formulation
f l ti
ƒ Location of events different for each unit
ƒ Different tasks can start at different times in different units at
the same event point
ƒ Sequencing constraints involving big-M constraints
ƒ Requires less number of events compared to slot based/ global
event based models
ƒ No resources other than materials and equipments
ƒ Janak, Lin, Floudas (2004) extended the basic model to
account for resource constraints and storage policies

1
Short-Term Scheduling: Batch Plants
Shaik, Janak & Floudas (2006)
For the objective of maximization of profit:
⎛ ⎞
Max Profit = ∑ prices ⎜ ST ( s, N ) + ∑ ρ si ∑ b(i, j , N ) ⎟
⎜ ⎟
s ⎝ i∈ρ si > 0 j∈suitij ⎠

∑ w(i, j, n) ≤ 1
i∈suit ij
∀j,n

w(i, j , n) Bijmin ≤ b(i, j , n) ≤ w(i, j , n) Bijmax ∀i,j ∈ suitij ,∀n

ST ( s, n) = ST ( s, n − 1) + ∑
i∈ ρsi > 0
ρsi ∑
j∈suitij
b(i, j , n − 1) + ∑
i∈ ρsi < 0
ρsi ∑
j∈suitij
b(i, j , n) ∀s,n

ts (i, j , n + 1) ≥ ts (i ' , j , n) + α i ' j w(i ' , j , n) + β i ' j b(i ' , j , n) ∀i, i ' , j ∈ suit ij , suiti ' j , ∀n < N

ts (i, j , n + 1) ≥ ts (i ', j ', n) + α i ' j ' w(i ', j ', n) + β i ' j ' b(i ', j ', n) − H (1 − w(i ', j ', n))
∀s , i , i ', j , j ' ∈ suitij , suiti ' j ' , i ≠ i ', j ≠ j ', ρ si < 0, ρ si ' > 0, ∀n < N

Short-Term Scheduling: Batch Plants


Shaik, Janak & Floudas (2006)

ts (i, j , n) ≤ H ∀i, j ∈ suitij , ∀n

ts (i, j , N ) + α ijj w(i, j , N ) + β ijj b(i, j , N ) ≤ H ∀i, j ∈ suitijj

w(i, j , n) = b(i, j , n) = ts (i, j , n) = 0 ∀i, j ∈ suitij = 0

For the objective of minimization of makespan:


Min MS
⎛ ⎞
∑ ⎜⎜ ST (s, N ) + ∑ ρ si ∑ b(i, j , N ) ⎟ ≥ Demand s

s ⎝ ρ i∈ si > 0 j∈suitij ⎠

ts (i, j , N ) + α ij w(i, j , N ) + β ij b(i, j , N ) ≤ MS ∀i, j ∈ suitij

2
Short-Term Scheduling: Batch Plants
Shaik & Floudas (2008)

RTN representation has not been explored in literature


for unit-specific event-based models

– Unit-Specific Event-based Continuous-time formulation for Short-Term


Scheduling of Batch Plants without Resources (such as utilities)
–The work is extension of STN model of Ierapetritou & Floudas (1998)
– Improved Sequencing Constraints (for handling sequence-dependent
changeovers)
h )
– Alternate approach for handling dedicated finite-intermediate storage
without the need for considering storage as a separate task
– Additional tightening constraint
– Limitation: Does not allow tasks to take place over multiple events

Short-Term Scheduling Model


Nomenclature
Sets
I tasks
Ir tasks related to resource r
R resources
RJ equipment resources
RS material resources
RFIS material resources with finite dedicated storage
N event points within the time horizon
Parameters
H scheduling horizon
Pr price of resource r
Dr demand for resource r
τr sequence independent clean up time
τ ii ' sequence-dependent clean up time required between tasks i and i′
Ermin lower bound on the availability of resource r
Ermax upper bound on the availability of resource r
μ rip , μric proportion of equipment resource produced, consumed in task i, μ rip ≥0, μri ≤ 0
c

ρ rip , ρ ric proportion of material resource produced, consumed in task i, ρ ri ≥0, ρri ≤ 0
p c

3
Short-Term Scheduling Model
Nomenclature
Binary variables
w(i,n) Assign the beginning of task i at event n
Positive variables
b(i,n))
b(i A
Amount t off material
t i l processed
d by
b ttaskk i in
i eventt n
E0(r) initial amount of resource r available or required from external sources
E(r,n) excess amount of resource r available at event n
Ts(i,n) time at which task i starts at event n

Capacity Constraints

w(i, n) Bimin ≤ b(i, n) ≤ w(i, n) Bimax ∀i ∈ I , n ∈ N (1)

Ermin ≤ E ( r , n) ≤ Ermax ∀r ∈ R , n ∈ N (2)

Short-Term Scheduling Model


Excess Resource Balances
The amount of a resource r produced or consumed μri w(i, n) + ρri b(i, n)
by task i is represented as:

E ( r , n) = E ( r , n − 1) + ∑ ( μ rip w(i, n − 1) + ρ rip b(i, n − 1) ) + ∑ ( μ ric w(i, n) + ρ ric b(i, n) )


i∈I r i∈I r
∀r ∈ R , n ∈ N , n > 1 (3a)

E (r , n) = E0 (r ) + ∑ ( μric w(i, n) + ρ ric b(i, n) ) ∀r ∈ R , n ∈ N , n = 1 (3b)


i∈I r

The excess resource balances are more generic compared to their


counterpart (material balances) in STN based models

Analysis for Equipment Resources: (keeps track of the status of a unit)


E (r , n) = E (r , n − 1) + ∑ μrip w(i, n − 1) + ∑ μric w(i, n) ∀r ∈ R , n ∈ N , n > 1
J

i∈I r i∈I r

E (r , n) = E0 (r ) + ∑ μric w(i, n) ∀r ∈ R J , n ∈ N , n = 1
i∈I r
A separate task is assumed for each task suitable in multiple equipment resources

Implicitly represents the allocation constraint (No need to write separately)

Analysis for Material Resources: (Reduces to the material balances in STN)

4
Short-Term Scheduling Model
Sequencing Constraints
(i) Same task in the same unit
T s (i, n + 1) ≥ T s (i, n) + α i w(i, n) + β i b(i, n) ∀i ∈ I , n ∈ N , n < N (4)

((ii)) Different tasks in the same unit:


(a) No changeovers or cleanup times:
T s (i, n + 1) ≥ T s (i ', n) + α i ' w(i ', n) + β i 'b(i ', n) ∀r ∈ R J , i ∈ I r , i ' ∈ I r , n ∈ N , n < N (5a)

(b) Sequence-independent cleanup times:


T (i, n + 1) ≥ T s (i ', n) + α i ' w(i ', n) + β i 'b(i ', n) + τ r w(i ', n) ∀r ∈ R J , i ∈ I r , i ' ∈ I r , i ≠ i ', n ∈ N , n < N (5b)
s

(c) Sequence-dependent changeovers:


T s (i, n) ≥ T s (i ', n ') + α i ' w(i ', n ') + β i 'b(i ', n ') + τ ii'ii w(i, n) − H (1 − w(i ', n ')) − H ∑ ∑ w(i ", n ")
i "∈I r n '< n "< n

∀r ∈ R J , i ∈ I r , i ' ∈ I r , i ≠ i ', n ∈ N , n ' ∈ N , n > n ' (5c)

The last constraint is novel and more generic than the earlier version
shown below

Only the last constraint has big-M terms unlike in the earlier works

Short-Term Scheduling Model


Sequencing Constraints

(iii) Different tasks in different units:


T s (i, n + 1) ≥ T s (i ', n) + α i ' w(i ', n) + βi 'b(i ', n) − H (1 − w(i ', n))
∀r ∈ R S , i ' ∈ I r , i ∈ I r , i ≠ i ', ρ rip' > 0, ρ ric < 0, n ∈ N , n < N (6)

Time Bounding Constraints


T s (i, n) ≤ H ∀i ∈ I , n ∈ N (7a)

T s ( i , N ) + α i w( i , N ) + β i b ( i , N ) ≤ H ∀i ∈ I (7b)

Ti ht i Constraint
Tightening C t i t

∑ ∑ (α w(i, n) + β b(i, n)) ≤ H


n∈N i∈I r
i i ∀r ∈ R J (8)

The tightening constraint provides a better LP relaxation

5
Objective Function
Maximization of Profit
⎛ ⎞
Max Profit = ∑ P ⎜ E (r , N ) + ∑ ( μ
r
p
ri w(i, N ) + ρ rip b(i, N ) ) ⎟ (9)
r∈R S ⎝ i∈I r ⎠

Minimization of MakeSpan (MS)

Demand Constraints
E (r , N ) + ∑ ( μ rip w(i, N ) + ρ rip b(i, N ) ) ≥ Dr ∀r ∈ R S (10)
i∈I r

Time Bounding Constraints


T (i, N ) + α i w(i, N ) + β i b(i, N ) ≤ MS
s
∀i ∈ I (11)

Modified Tightening Constraint


∑ ∑ (α w(i, n) + β b(i, n)) ≤ MS
n∈N i∈I r
i i ∀r ∈ R J (12)

This is the model for Unlimited Intermediate storage (UIS)

Dedicated Finite Intermediate


Storage (FIS)
Finite Storage requirement:
E (r , n) ≤ Ermax ∀r ∈ R s , n ∈ N

Simply enforcing an upper bound may lead to violations in storage


requirements in real time

Example: N2
U2 100 E(r,N1)=200 ?
N1 N2
U1 300

Using the Lin & Floudas (2001) model :


Storage needs to be considered as a separate task, and the allocation and
sequencing constraints are written for storage tasks as well

6
Dedicated Finite Intermediate
Storage (FIS)
We Propose an Alternate Method for handling dedicated FIS:
(without the need for considering storage as a separate task)

Two additional Sequencing


q g Constraints

T s (i, n + 1) ≤ T s (i ', n) + α i ' w(i ', n) + βi 'b(i ', n) + H (2 − w(i ', n) − w(i, n + 1)) (6a)
∀r ∈ R FIS , i ' ∈ I r , i ∈ I r , i ≠ i ', ρ rip' > 0, ρ ric < 0, n ∈ N , n < N

Constraint (6a) along with Eq (6) for different tasks in different units will enforce the start
time of next event to be equal to the end of previous event

T s (i, n) ≤ T s (i ', n) + α i ' w(i ', n) + βi 'b(i ', n) + H (1 − w(i ', n))
∀r ∈ R FIS , i ' ∈ I r , i ∈ I r , i ≠ i ', ρ rip' > 0, ρ ric < 0, n ∈ N (6b)

Constraint (6b) enforces that the start time of the consuming task at event n should be
before the end of the active producing task (producing FIS) at event n
There is no need to write these constraints at the end of the horizon time, as the excess
amount produced can stay in the batch unit itself

Flexible FIS: storage needs to be considered as a separate task (Janak et al., 2004)

Unit-specific-event based model of


Giannelos and Georgiadis (2002)
ƒ Based on STN process representation
ƒ Slight
g variation of the model of Ierapetritou
p and Floudas (1998),
( )
using buffer times for relaxing the task durations and implicitly
eliminated the various big-M constraints of Ierapetritou and
Floudas (1998)
ƒ No big-M constraints
ƒ Although based on unit specific events, due to special
sequencing constraints on tasks producing/consuming the
same state
state, it is similar to global events
ƒ They enforce the start and end times of all tasks producing or
consuming the same state to be same
ƒ Thus leading to suboptimal solutions as observed by
Sundaramoorthy & Karimi (2005) and also in this work

7
Benchmark Examples
Problem Statement

„ Given:
– P d ti recipe
Production i iin tterms off ttaskk sequences
– Pieces of equipment and their ranges of capacities
– Material storage policy (Unlimited)
– Production requirement
– Utility requirements and their maximum availabilities
– Time horizon under consideration
„ Determine:
– Optimal sequence of tasks taking place in each unit
– Amount of material processed at each time in each unit
– Processing time of each task in each unit
– Utility usage profiles
„ So as to optimize a performance criterion,
– Maximization of profit, minimization of makespan,
minimization of order earliness, etc.

Example 1
STN Representation

S1 Task 1 S2 Task 2 S3 Task 3 S4


i=1, 2 i=3 i=4, 5

ƒ Problem involves 5 units, 3 processing tasks, and 4 states (1 feed, 2 int, 1 product)
ƒ Variable batch sizes and processing times
ƒ Unlimited intermediate storage (UIS) for all states
ƒ Consider two objective functions:

ƒ Maximization of Profit ƒ Minimization of Makespan


for 3 cases of different time horizons: for 2 cases of different demands:
ƒ Case 1a: H=8 hr ƒ Case 1a: D4 =2000 mu
ƒ Case 1b: H=12 hr ƒ Case 1b: D4 =4000 mu
ƒ Case 1c: H=16 hr

1
Example 2
STN Representation Product 1
S8

0.4 IntAB
Heating 0.4 Reaction 2 0.6
S1 S4 S5
i=1 i=4, 5
F dA
Feed Hot A 06
0.6 0.1
Impure E
Separation
S6 IntBC S7
i=8
0.9

S2 Reaction 1 Reaction 3 S9
i=2, 3 i=6, 7
Feed B 0.5 0.2 Product 2
S3

Feed C

ƒ Problem involves 4 units, 8 processing tasks, 9 states (3 feed, 4 int, 2 product)


ƒ Variable batch sizes and processing times
ƒ Unlimited intermediate storage (UIS) for all states
ƒ Consider two objective functions:
ƒ Maximization of Profit ƒ Minimization of Makespan
for 3 cases of different time horizons: for the following demands:
ƒ Case 2a: H=8 hr D8 =200 mu
ƒ Case 2b: H=12 hr D9 =200 mu

Example 3
STN Representation Feed 3 S8

0.75
Heating 2 Reaction 3 0.4
S9 S13
i=2 i=7, 8
Int 1 Int 6 0.6 Product 2
0.25
Heating 1
S1 S3
i=1 S6 Int 4 Int 7 S10
Feed 1 0.5
0.4 Int 5 0.4
Reaction 2 Separation 0.5 S7 0.4 Mixing
S5 S12
i=5, 6 i=9 i=10, 11
0.5 Int 3 Product 1
0.1 0.2
Reaction 1
S2 S4 S11
i=3, 4 Feed 4
Feed 2 Int 2

ƒ Problem involves 6 units, 11 processing tasks, 13 states (4 feed, 7 int, 2 product)


ƒ Variable batch sizes and processing times
ƒ Unlimited intermediate storage (UIS) for all states
ƒ Consider 3 cases of different time horizons:

ƒ Maximization of Profit ƒ Minimization of Makespan


for 2 cases of different time horizons: for 2 cases of different demands:
ƒ Case 3a: H=8 hr ƒ Case 3a: D12 =100 mu, D13 =200 mu
ƒ Case 3b: H=12 hr ƒ Case 3b: D12 = D13 =250 mu

2
Computational Results
Example 1 Maximization of Profit
Model Events CPU Nodes RMILP MILP Binary Continuous Constraints Nonzeros
time (s) ($) ($) variables variables
Example 1a (H=8)
S&K 5 0.05 13 2000.0 1840.2 40 215 192 642
M&G 5 0.03 2 2000.0 1840.2 40 195 520 1425
CBM 5 0.04 0 2000.0 1840.2 70 115 201 655
CBMN(Δt=1) 5 0.01 0 2000.0 1840.2 20 70 86 274
(Δt=2) 5 0.02 7 2000.0 1840.2 35 85 116 414
G&G 4 0.01 0 2000.0 1840.2 20 76 122 355
I&F 4 0.01 1 2000.0 1840.2 10 48 69 176
5 0.05 160 2804.6 1840.2 15 62 92 245
Example 1b (H=12)
S&K 9 26.83 27176 4481.0 3463.6 80 415 408 1358
M&G 9 29.52 26514 4563.8 3463.6 80 375 1000 3415
CBM 9 26.93 23485 5237.6 3463.6 220 301 553 2099
CBMN(Δt=1) 9 0.23 606 4419.9 3301.6 a 40 130 162 546
(Δt=2) 9 10.32 21874 5237.6 3463.6 75 165 232 886
G&G 6 0.03 22 3890.0 3301.6a 30 114 182 541
I&F 6 0.03 24 4000.0 3463.6 20 76 115 314
7 0.19 589 4857.6 3463.6 25 90 138 383
Example 1c (H=16)
S&K 12 5328 22
5328.22 3408476 6312.6
6312 6 5038
5038.1
1 110 565 570 1895
13 >670001 36297619 6381.9 5038.1 120 615 624 2074
M&G 12 37675.13 17465450 6332.8 5038.1 110 510 1360 5275
13 >670002 20693001 6391.4 5038.1 120 555 1480 5965
CBM 12 32456.61 14385711 7737.6 5038.1 385 493 922 3707
13 >670003 22948021 8237.6 5038.1 450 567 1065 4343
CBMN(Δt=2) 12 1086.08 1642027 7737.6 5000.0 a 105 225 319 1240
(Δt=3) 12 3911.14 4087336 7737.6 5038.1 150 270 409 1680
(Δt=3) 13 40466.83 44252075 8237.6 5038.1 165 295 448 1848
G&G 11 3.40 9533 6236.0 4840.9a 55 209 332 1006
I&F 9 1.76 6596 6601.5 5038.1 35 118 184 521
10 20.60 89748 6601.5 5038.1 40 132 207 590
a Suboptimal solution; Relative Gap: 1.24 %1, 6.54%2, 2.92%3

Example 1c Maximization of Profit


9 events, Bin = 35
CPU time = 1.76 sec
Nodes=6596

Ierapetritou & Floudas (1998)

12 events, Bin = 150


CPU time = 4997.22 sec
Nodes = 4087336

Castro et al (2004)

3
Computational Results
Example 2 Maximization of Profit
Model Events CPU Nodes RMILP MILP Binary Continuous Constraints Nonzeros
time (s) ($) ($) variables variables

Example 2a (H=8)
S&K 5 0 07
0.07 4 1730.9
1730 9 1498
1498.6
6 48 235 249 859
M&G 5 0.16 26 1730.9 1498.6 64 360 826 2457
CBM 5 0.07 8 1812.1 1498.6 112 184 322 1105
CBMN(Δt=1) 5 0.01 4 1730.9 1498.6 32 104 114 439
G&G 4 0.03 14 1812.1 1498.6 32 142 234 820
I&F 4 0.03 13 1812.1 1498.6 18 90 165 485
5 0.28 883 2305.3 1498.6 26 115 216 672
Example 2b (H=12)
S&K 7 1.93 1234 3002.5 2610.1 72 367 387 1363
8 29.63 16678 3167.8 2610.3 84 433 456 1615
9 561.58 288574 3265.2 2646.8 96 499 525 1867
10 10889.61 3438353 3315.8 2646.8 108 565 594 2119
11 >670001 17270000 3343.4 2646.8a 120 631 663 2371
M&G 7 2.15 814 3002.5 2610.1 96 526 1210 4019
8 58.31 17679 3167.8 2610.3 112 609 1402 4884
9 2317.38 611206 3265.2 2646.8 128 692 1594 5805
10 >670002 10737753 3315.8 2646.8a 144 775 1786 6782
11 >670003 9060850 3343
3343.4
4 2658
2658.5
5 160 858 1978 7815
CBM 7 1.38 1421 3190.5 2610.1 216 316 572 2146
8 35.81 30202 3788.3 2610.3 280 394 721 2791
9 1090.53 680222 4297.9 2646.8 352 480 886 3519
10 40355.97 19225950 4770.8 2646.8 432 574 1067 4330
11 >670004 13393455 5228.7 2627.9a 520 676 1264 5224
CBMN(Δt=2) 7 0.63 1039 3045.0 2610.1 88 188 224 1050
8 14.39 32463 3391.0 2610.3 104 218 261 1238
9 331.72 593182 3730.5 2646.8 120 248 298 1426
10 4366.09 6018234 4070.0 2646.8 136 278 335 1614
11 >670005 80602289 4409.5 2646.8a 152 308 372 1802
G&G 6(to 11) 0.33 701 3190.5 2564.6a 48 208 348 1238
I&F 7 6.19 14962 3788.3 2658.5 42 165 318 1046
8 105.64 211617 4297.9 2658.5 50 190 369 1233
a Suboptimal solution; Relative Gap: 1.59 %1, 3.16%2, 5.12%3 , 28.16%4 , 2.58%5

Computational Results
Example 3 Maximization of Profit

Model Events CPU Nodes RMILP MILP Binary Continuous Constraints Nonzeros
time (s) ($) ($) variables variables
Example 3a (H=8)
S&K 7 184.46 145888 2513.8 1583.4 102 597 584 2061
M&G 7 1012.68 429949 2560.6 1583.4 132 717 1667 5601
CBM 7 19.82 13130 2809.4 1583.4 297 433 841 3049
CBMN(Δt=2) 7 6.90 10361 2606.5 1583.4 121 264 343 1495
G&G 5 0.35 807 2100.0 1274.5a 55 244 392 1335
I&F 5 0.38 1176 2100.0 1583.4 30 155 303 875
6 25.92 57346 2847.8 1583.4 41 190 377 1139
Example 3b (H=12)
S&K 9 372.92 94640 3867.3 3041.3 136 783 792 2789
10 >710001 12781125 4029.7 3041.3 153 876 896 3153
M&G 9 19708.33 2254227 3867.3 3041.3 176 943 2195 8114
10 >71000 2 5857914 4029.7 2981.7a 198 1056 2459 9492
CBM 9 290.84 80123 4059.4 3041.3 484 658 1307 5001
10 16416.31 3194816 4615.6 3041.3 594 787 1576 6154
CBMN(Δt=2) 9 107.97 47798 3864.3 3041.3 165 348 457 2031
10 1173.82 751686 4189.8 3041.3 187 390 514 2299
G&G 6 1.18 2750 2871.9 2443.2a 66 290 469 1608
I&F 7 18.33 15871 3465.6 3041.3 52 225 451 1403
8 50.48 41925 4059.4 3041.3 63 260 525 1667
a Suboptimal solution; Relative Gap: 3.76 %1, 12.85 %2

4
Example 1 Minimization of Makespan
Model Events H CPU Nodes RMILP MILP Binary Continuous Constraints Nonzeros
(hr) time (s) (hr) (hr) variables variables

Example 1a (D4=2000 mu)


S&K 13 -- 1.18 362 27.126 29.772 120 615 624 2074
14 -- 31.54 15622 25.702 29.772 130 665 678 2253
15 -- 728.05 400789 25.142 29.439 140 715 732 2432
16 -- 37877.69 12064418 24.871 29.106 150 765 786 2611
17 -- >800001 17279722 24.716 28.773a 160 815 840 2790
M&G 13 50 2.19 394 27.126 29.772 120 556 1485 6056
14 645.06 139488 25.335 29.772 130 601 1605 6786
15 25253.81 5273904 25.024 29.439 140 646 1725 7551
16 >900002 11258561 24.834 29.106a 150 691 1845 8351
CBM 13 -- 0.50 6 23.313 29.772 450 568 1066 4404
14 -- 14.90 4262 21.049 29.772 520 647 1219 5095
15 -- 2163.55 454549 19.049 29.439 595 731 1382 5836
16 -- 64850.69 9852772 17.049 29.106a 675 820 1555 6627
CBMN(Δt=1) 13 -- 0.02 0 27.126 29.772 60 191 239 824
(Δt=1) 14 -- 0.11 65 25.824 29.772 65 206 258 892
(Δt=1) 15 -- 0.28 417 25.358 29.772 70 221 277 960
(Δt=2) 15 -- 235.90 236250 19.049 29.439 135 286 407 1605
(Δt=2) 16 -- 27994.64 23426601 17.049 29.106 145 306 436 1723
(Δt=2) 17 -- >800003 80105289 15.049 28.773a 155 326 465 1841
G&G 12 -- 0.03 0 27.126 29.772 60 228 367 1108
15 -- 1.87 3529 25.064 29.772a 75 285 457 1387
I&F 12 50 0.12 208 24.236 28.439 50 160 253 732
13 2.26 7863 24.236 27.903 55 174 276 801
14 41.89 134961 24.236 27.881 60 188 299 870
15 950.64 2693556 24.236 27.881 65 202 322 939
Example 1b (D4=4000 mu)
S&K 23 -- 101.03 34598 51.362 56.432 220 1115 1164 3864
24 -- 15814.03 4164921 49.939 56.432a 230 1165 1218 4043
M&G 23 100 21974.42 2525960 51.362 56.432 220 1006 2685 14931
24 >900004 5129168 49.572 57.765a 230 1051 2805 16011
CBM 23 -- 6.09 185 43.313 56.432 1375 1583 3046 13564
24 -- 2016.50 136348 41.049 56.432a 1495 1712 3299 14755
CBMN(Δt=1) 23 -- 0.05 0 51.362 56.432 110 341 429 1504
(Δt=2) 24 -- 0.20 72 50.061 56.432 115 356 448 1572
(Δt=2) 25 -- >800005 34358380 39.049 56.099a 235 486 697 2785
G&G 22 -- 0.07 0 51.362 56.432 110 418 667 2038
24 -- 1.53 1707 49.594 56.432a 120 456 727 2224
I&F 22 100 6.48 19019 48.473 52.433 100 300 483 1422
23 384.12 832372 48.473 52.072 105 314 506 1491
a Suboptimal solution; Relative Gap: 4.22 %1, 7.38 %2, 0.12%3, 11.01%4, 2.18 %5

Computational Results
Example 2 Minimization of Makespan
Model Events H CPU Nodes RMILP MILP Binary Continuous Constraints Nonzeros
(hr) time (s) (hr) (hr) variables variables
Example 2 (D8=D9=200 mu)
S&K 9 -- 10.98 5378 18.685 19.789 96 556 528 1936
10 -- 519.35 142108 18.685 19.340 108 622 597 2188
11 -- 11853.03 2840768 18.685 19.340 120 688 666 2440
M&G 9 50 66.55 15674 18.685 19.789 128 693 1598 5869
10 5693.53 1066939 18.685 19.340 144 776 1790 6850
11 >800001 5019315 18.685 19.340 160 859 1982
7887
CBM 9 -- 7.75 6426 12.555 19.789 352 481 888 3584
10 -- 727.23 441130 9.889 19.340 432 575 1069 4403
11 -- 32258.74 13776145 7.223 19.340 520 677 1266 5305
CBMN(Δt=1) 9 -- 0.71 1809 18.685 19.789 64 193 216 872
(Δt=1) 10 -- 50.49 134189 18.685 19.789 72 215 241 979
(Δt=2) 10 -- 56.11 109917 15.654 19.340 136 279 337 1623
(Δt=2) 11 -- 5535.27 8389012 12.988 19.340 152 309 374 1811
G&G 8 -- 1.97 3804 12.555 19.789 64 274 475 1675
10 -- 1614.35 1182082 10.475 19.789a 80 340 589 2093
I&F 8 50 0
0.78
78 1008 12
12.738
738 19
19.764
764 45 190 367 1211
9 74.26 111907 12.477 19.340 53 215 418 1398
10 1672.11 2079454 12.435 19.340 61 240 469 1585
a Suboptimal solution; Relative Gap: 2.03 %1

5
Computational Results
Example 3 Minimization of Makespan
Model Events H CPU Nodes RMILP MILP Binary Continuous Constraints Nonzeros
(hr) time (s) (hr) (hr) variables variables
Example 3a (D12=100 mu, D13=200 mu)
S&K 8 -- 0.28 36 12.317 14.366 119 690 689 2425
9 -- 13.32 5156 11.621 13.589 136 783 793 2789
10 -- 226.83 53789 11.417 13.532 153 876 897 3153
11 -- 4340.65 821194 11.335 13.367 170 969 1001 3517
12 -- >800001 11858901 11.295 13.367 187 1062 1105 3881
M&G 8 50 1.15 316 12.317 14.366 154 831 1937 6905
9 126.77 21366 11.621 13.589 176 944 2201 8208
10 3949.36 605450 11.417 13.532 198 1057 2465 9592
11 >800002 7481387 11.335 13.367 220 1170 2729 11057
CBM 8 -- 0.62 68 10.941 14.366 385 541 1064 4044
9 -- 5.89 2762 8.941 13.589 484 659 1309 5090
10 -- 53.42 22452 6.941 13.532 594 788 1578 6254
11 -- 2514.97 673460 4.941 13.367 715 928 1871 7536
12 -- >800003 20380858 3.825 13.367 847 1079 2188 8936
CBMN(Δt=2) 8 -- 0.23 67 12.192 14.366 143 307 402 1776
(Δt=2) 9 -- 2.23 2566 10.192 13.589 165 349 459 2044
(Δt=2) 10 -- 14.73 17426 8.192 13.532 187 391 516 2312
(Δt=2) 11 -- 312.07 326752 6.192 13.532 209 433 573 2580
(Δt=3)
(Δt 3) 11 -- 20230.89 16842943 6.192 13.367 297 521 725 3494
(Δt=3) 12 -- 11547.29 5054232 4.635 13.367 330 574 801 3877
G&G 7 -- 0.25 338 11.066 14.616 77 336 558 1902
9 -- 3.36 3960 10.167 14.616a 99 428 712 2448
I&F 7 50 0.38 458 11.066 13.367 52 225 452 1413
8 2.89 3506 10.000 13.367 63 260 526 1677
Example 3b (D12=D13=250 mu)
S&K 11 -- 981.01 226238 14.535 17.357a 170 969 1001 3517
M&G 11 100 62724.36 5802875 14.535 17.357a 220 1170 2729 11057
CBM 11 -- 38.14 9627 10.722 17.357a 715 928 1871 7536
CBMN(Δt=2) 11 -- 31.57 28079 12.494 17.357a 209 433 573 2580
G&G 10 -- 59.26 84970 12.763 18.978a 110 474 789 2721
I&F 10 100 2.50 2668 12.500 17.025 85 330 674 2205
11 396.58 424617 12.500 17.025 96 365 748 2469
a Suboptimal solution; Relative Gap: 1.01 %1, 3.055 %2, 3.29 %3

Conclusions
„ Compared and assessed various continuous-time formulations for short-term
scheduling of batch plants
„ Slot based vs. Global-event based vs. Unit-specific-event based models are
compared with respect to different performance metrics
„ Different instances of 3 benchmark examples with 2 objective functions: Max Profit
and Min Makespan
„ Giannelos & Georgiadis (2002) yields suboptimal solutions due to special
sequencing constraints
„ Both Slot based and Global-event based models require same number of events,
while the Unit-specific-event based model almost always requires less number of
events
„ Both Slot based and Global-event based models have weak performance for the
objective of makespan minimization
„ Unit-specific-event
Unit specific event based model performs well for both the objectives of max.
max profit
and min. makespan considered in this study
„ Unit-specific-event based model outperforms all the models compared in this study
in terms of faster computational times resulting from compact model statistics,
despite the presence of big-M constraints
„ Unit-specific-event based models treat the time horizon in a “True” continuous time
fashion without the requirement of small unnecessary slots as required by the slot or
global event based models

6
Short-Term Scheduling of Continuous
Plants: Industrial case study of FMCG

Dr. Munawar Abdul Shaik

Assistant Professor
Department
p of Chemical Engineering
g g

Classification of Scheduling Problems

Batch Plants Long-term Scheduling


Continuous Plants
Medium-term scheduling
Mixed production
lines
Short-term scheduling

Discrete time
Slot-based
Continuous-time Global event-based
formulation
Unit-specific event-based

1
Motivation behind the Proposed
Short-Term Scheduling Model
• Ierapetritou & Floudas (1998) model for Continuous Plants
– Approximation of storage
– Reported approximate/ suboptimal solutions for UIS and
FIS cases of an Industrial Case Study
• Mendez & Cerda (2002) and Giannelos & Georgiadis(2002)
– Reported suboptimal solutions for FIS case of an Industrial
Case Study
• Castro & co-workers ((2004a,, 2004b))
– Reported suboptimal solutions for NIS case of an
Industrial Case Study
– Classified the problem as Intractable despite using a
Decomposition Strategy
Shaik and Floudas (2007) – proposed an improved model

Short-Term Scheduling Model


Shaik and Floudas (2007) model

- Unit-specific Event-based Continuous-Time Formulation


- Improved version of the Model of Ierapetritou and Floudas (1998)
for Rigorous Handling of Different Storage Requirements and
Improved Sequencing Constraints
Nomenclature
Binary variables
w(i,n) Assign the beginning of task ‘i’ at event ‘n’
z(ist,n) Whether there is nonzero amount stored at event ‘n’
Positive variables
B(i,n) Amount of material undertaking task ‘i’ at event ‘n’
ST(s,n) Excess amount of state s that needs to be stored at event n
ST0(s) Initial amount of state ‘s’ required from external resources
Ts(i,n) Time that task ‘i’ starts at event ‘n’
Tf(i,n) Time that task ‘i’ ends at event ‘n’

2
Proposed Short-Term Scheduling Model
With Bypassing of Storage: Without Bypassing of Storage:
- only the excess amount is stored - Whatever is produced is always
stored

UIS (Unlimited Intermediate Storage)


NIS (No Intermediate Storage)
Storage
FIS (Finite Intermediate Storage)
policies
ZW (Zero-Wait Policy)
MIS (Mixed Intermediate Storage)

Unlimited Intermediate Storage Case


(UIS)
No need to model storage as a separate task
No difference in the model due to bypassing of storage

Allocation constraints: ∑ w(i, n) ≤ 1


i∈I j
∀j ∈ J , n ∈ N

Capacity constraints for processing tasks:


Rimin
p
(T f (i p , n) − T s (i p , n)) ≤ b(i p , n) ≤ Rimax
p
(T f (i p , n) − T s (i p , n)) ∀i p ∈ I p , n ∈ N
b(i p , n) = Ri p (T (i p , n) − T (i p , n))
f s
∀i p ∈ I p , n ∈ N

Demand constraints: Ds ≤ ∑ ∑ ρ si b(i p , n) ≤ Ds ∀s ∈ S P


min p max
p
n∈N i p∈I s

Duration constraints for processing tasks:


T f (i p , n) − T s (i p , n) ≤ Hw(i p , n) ∀i p ∈ I p , n ∈ N

Extra tightening constraint: ∑ ∑ (T


n∈ N i∈I j
f
(i, n) − T s (i, n)) ≤ H − τ min
j ∀j ∈ J

3
Unlimited Intermediate Storage Case
(UIS)
Material balance constraints
Raw materials (available as and when required):
ST0 ( s, n) + ∑ ρ sic p b(i p , n) = 0 ∀s ∈ S R , n ∈ N
i p ∈I s

Raw materials (entire amount available in the beginning):


ST ( s, n) = ST ( s, n − 1) + ∑ρ
i p ∈I s
c
si p b(i p , n) ∀s ∈ S R , n ∈ N , n > 1

ST ( s, n) = ST0 ( s ) + ∑ρ
i p ∈I s
c
si p b(i p , n) ∀s ∈ S R , n = 1
Intermediates:
ST ( s, n) = ST ( s, n − 1) + ∑ρ
i p ∈I s
p
si p b(i p , n) + ∑ρ
i p ∈I s
c
si p b(i p , n) ∀s ∈ S IN , n ∈ N , n > 1

ST ( s, n) = ST0 ( s ) + ∑ρ
i p ∈I s
p
si p b(i p , n) + ∑ρ
i p ∈I s
c
si p b(i p , n) ∀s ∈ S IN , n = 1

Unlimited Intermediate Storage Case


(UIS)
Sequencing Constraints

Same task in the same unit: T (i, n + 1) ≥ T (i, n) ∀i ∈ I , n ∈ N , n ≠ N


s f

Different tasks in the same unit:


(a) No changeovers or cleanup times:
T s (i, n + 1) ≥ T f (i ' , n) ∀j ∈ J , i ∈ I j , i '∈ I j , n ∈ N , n ≠ N
(b) Sequence independent cleanup times:
T s (i, n + 1) ≥ T f (i' , n) + τ j w(i' , n) ∀j ∈ J , i, i '∈ I j , i ≠ i' , n ∈ N , n ≠ N
(c) Sequence dependent changeovers:
T s (i, n) ≥ T f (i ', n ') + ti'icl w(i, n) − H (1 − w(i ', n ')) − H ∑ ∑ w(i ", n ")
i " n '< n "< n

∀j ∈ J , i, i ' ∈ I j , i ≠ i ', n, n ' ∈ N , n > n '


Different tasks in different units - processing tasks:
T s (i p , n) ≥ T s (i ' p , n) − H (1 − w(i ' p , n))
∀s ∈ S IN , i p ∈ I s , i ' p ∈ I s , i p ≠ i ' p , ρ sip' p > 0, ρ sic p < 0, n ∈ N

T f (i p , n) ≥ T f (i ' p , n) − H (1 − w(i ' p , n))


∀s ∈ S IN , i p ∈ I s , i ' p ∈ I s , i p ≠ i ' p , ρ sip' p > 0, ρ sic p < 0, n ∈ N

4
Dedicated Finite Intermediate
Storage Case (FIS)
No need to model storage as a separate task
With Storage Bypassing:
Different tasks in different units - zero wait condition processing tasks:
T s (i p , n) ≤ T s (i ' p , n) + H (2 − w(i ' p , n) − w(i p , n))
∀s ∈ S FIS , i p ∈ I s , i ' p ∈ I s , i p ≠ i ' p , ρ sip' p > 0, ρ sic p < 0, n ∈ N
T (i p , n) ≤ T (i ' p , n) + H (2 − w(i ' p , n) − w(i p , n))
f f

∀s ∈ S FIS , i p ∈ I s , i ' p ∈ I s , i p ≠ i ' p , ρ sip' p > 0, ρ sic p < 0, n ∈ N

Giannelos and Georgiadis (2002) enforced the zw condition for batch plants
as well leading to suboptimal solutions
(Sundaramoorthy & Karimi, 2005; Shaik, Janak, & Floudas, 2006)

Finite Storage requirement: ST ( s, n) ≤ STsmax ∀s ∈ S FIS , n ∈ N

Better to Model storage as a separate task !

No Intermediate Storage Case (NIS)


No need to model storage as a separate task

No Storage requirement: ST(s,n) = 0 or eliminate ST(s,n)

∑ρ
i p ∈I s
p
si p b(i p , n) + ∑ρ
i p ∈I s
c
si p b(i p , n) = 0 ∀s ∈ S IN , n ∈ N

Different tasks in different units - processing tasks:


T s (i p , n) ≥ T s (i ' p , n) − H (2 − w(i ' p , n) − w(i p , n))
∀s ∈ S IN , i p ∈ I s , i ' p ∈ I s , i p ≠ i ' p , ρ sip' p > 0, ρ sic p < 0, n ∈ N
T f (i p , n) ≥ T f (i ' p , n) − H (2 − w(i ' p , n) − w(i p , n))
∀s ∈ S IN , i p ∈ I s , i ' p ∈ I s , i p ≠ i ' p , ρ sip' p > 0, ρ sic p < 0, n ∈ N
Different tasks in different units - zero wait condition processing tasks:
T s (i p , n) ≤ T s (i ' p , n) + H (2 − w(i ' p , n) − w(i p , n))
∀s ∈ S FIS , i p ∈ I s , i ' p ∈ I s , i p ≠ i ' p , ρ sip' p > 0, ρ sic p < 0, n ∈ N
T (i p , n) ≤ T (i ' p , n) + H (2 − w(i ' p , n) − w(i p , n))
f f

∀s ∈ S FIS , i p ∈ I s , i ' p ∈ I s , i p ≠ i ' p , ρ sip' p > 0, ρ sic p < 0, n ∈ N

5
Flexible FIS – With Storage Bypassing
Most general case: Model storage as a separate task
Allocation Constraints for Storage Tasks:
w(ist , n + 1) ≥ w(ist , n) + z (ist , n) − 1 ∀ist ∈ I st , n ∈ N

Capacity Constraints - Storage Tasks:


b(ist , n) ≤ Vistmax w(ist , n) ∀ist ∈ I st , n ∈ N
b(ist , n) ≤ Vi stmax z (ist , n) ∀ist ∈ I st , n ∈ N

Material Balance Constraints: ST(s,n) = 0 or eliminate ST(s,n)


∑ρ
i p ∈I s
p
si p b(i p , n) + ∑ρ
ist ∈I s
p
sist b(ist , n − 1) + ∑ ρ b(i, n) = 0
i∈I s
c
si ∀s ∈ S FIS , n ∈ N , n > 1

∑ρ
i p ∈I s
p
si p b(i p , n) + ST0 ( s ) + ∑ ρ sic b(i, n) = 0
i∈I s
∀s ∈ S FIS , n = 1

Duration Constraints - Storage Tasks:


T f (ist , n) ≥ T s (ist , n) ∀ist ∈ I st , n ∈ N

Flexible FIS – With Storage Bypassing


Sequencing Constraints: Different Tasks in Different Units – Storage Tasks:
(a) Start time of storage task = start time of processing task (producing/consuming):
T s (ist , n) ≥ T s (i p , n) − H (2 − w(ist , n) − w(i p , n)) ∀s ∈ S IN , ist ∈ I s , i p ∈ I s , n ∈ N
T s (ist , n) ≤ T s (i p , n) + H (2 − w(ist , n) − w(i p , n)) ∀s ∈ S IN , ist ∈ I s , i p ∈ I s , n ∈ N

(b) No consuming/producing tasks & z(ist,n)=1 then ist should start at the end of previous event
T s (ist , n) ≤ T f (ist , n − 1) + H (1 − z (ist , n) + w(i p , n)) ∀s ∈ S IN , ist ∈ I s , i p ∈ I s , n ∈ N , n > 1

(c) End time of storage task ≥ end time of both producing and consuming tasks
T f (ist , n) ≥ T f (i p , n) − H (2 − w(ist , n) − w(i p , n)) ∀s ∈ S IN , ist ∈ I s , i p ∈ I s , n ∈ N

(d) When z(ist,n)=0 then end time of ist should match with the consuming task:
T f (ist , n) ≤ T f (i p , n) + H (2 − w(ist , n) − w(i p , n)) + Hz
H (ist ,n))
∀s ∈ S IN , ist ∈ I s , i p ∈ I s , ρ sic p < 0, n ∈ N

(e) When z(ist,n)=1 then ist should go till start time of next consuming/producing task:
T f (ist , n) ≥ T s (i p , n + 1) − H (2 − w(ist , n) − w(i p , n + 1)) − H (1 − z (ist ,n))
∀s ∈ S IN , ist ∈ I s , i p ∈ I s , n ∈ N , n ≠ N
T f (ist , n) ≤ T s (i p , n + 1) + H (2 − w(ist , n) − w(i p , n + 1)) + H (1 − z (ist ,n))
∀s ∈ S IN , ist ∈ I s , i p ∈ I s , n ∈ N , n ≠ N

6
FIS Case Without Storage Bypassing
Dedicated FIS Without Storage Bypassing:
No need to model storage as a separate task

Material Balance Constraints for Intermediates:


ST ( s, n − 1) + ∑ρ
i p ∈I s
p
si p b(i p , n) ≤ STsmax ∀s ∈ S FIS , n ∈ N , n > 1

ST0 ( s ) + ∑ρ
i p ∈I s
p
si p b(i p , n) ≤ STsmax ∀s ∈ S FIS , n ∈ N , n = 1

Dedicated and Flexible FIS Without Storage Bypassing:


Model with storage as a separate task

Allocation Constraints: ∑ w(i st , n) ≥ w(i p , n) ∀s ∈ S FIS , i p ∈ ρ sipp , n ∈ N


i st ∈ρ sic st

Material Balance Constraints for Intermediates:


∑ρ
ist ∈I s
p
sist b(ist , n − 1) + ∑ρ
i p ∈I s
p
si p b(i p , n) ≤ ∑V
ist ∈I s
max
isi w(ist , n) ∀s ∈ S FIS , n ∈ N , n > 1

ST0 ( s ) + ∑ρ
i p ∈I s
p
si p b(i p , n) ≤ ∑V
ist ∈I s
max
isi w(ist , n) ∀s ∈ S FIS , n = 1

FIS Case Without Storage Bypassing


Dedicated and Flexible FIS Without Storage Bypassing:

Sequencing Constraints: Different Tasks in Different Units:


(a) Start time of storage task = start time of producing task:
T s (ist , n) ≥ T s (i p , n) − H (2 − w(ist , n) − w(i p , n)) ∀s ∈ S IN , ist ∈ I s , i p ∈ ρ sipp , n ∈ N
T s (ist , n) ≤ T s (i p , n) + H (2 − w(ist , n) − w(i p , n)) ∀s ∈ S IN , ist ∈ I s , i p ∈ ρ sipp , n ∈ N

(b) Start time of consuming task ≥ start time of storage task:


T s (i p , n) ≥ T s (ist , n) − H (2 − w(ist , n) − w(i p , n)) ∀s ∈ S IN , ist ∈ I s , i p ∈ ρ sic p , n ∈ N

No need to enforce the zero wait condition on start time of processing tasks

(c) End time of consuming task ≥ End time of producing task:


T f (i p , n) ≥ T f (i ' p , n) − H (2 − w(i ' p , n) − w(i p , n))
∀s ∈ S IN , i p ∈ I s , i ' p ∈ I s , i p ≠ i ' p , ρ sip' p > 0, ρ sic p < 0, n ∈ N

7
Objective Function

Max Profit

C1 ∑ ∑ price ∑ ρ s
p
si b(i, n) − C2 ∑ ∑ w(i, n) − C3 ∑ ∑ z(i st , n)
s∈S P n∈ N i∈ I s i∈I n∈ N i st ∈I st n∈N

Min MS
T f (i, n) ≤ MS ∀i ∈ I , n ∈ N
∑ ∑ (T f (i, n) − T s (i, n)) ≤ MS − τ min
n∈N i∈I j
j ∀j ∈ J

Industrial Case Study:


Mixing, Storage, & Packing

Munawar A. Shaik and Christodoulos A. Floudas


Department of Chemical Engineering
Princeton University

8
State-Task-Network
Pack-P1 P1 (Line 3)
(Mixer A) Mixing Stage: 3 mixers
Make-Int1 Int1 Pack-P2 P2 (Line 1)
3 bases
Base A Pack-P3 P3 (Line 2) 7 intermediates
(Mixer A)
(Line 1)
Make-Int2 Int2 Pack-P4 P4
Packing Stage: 5 lines
Pack-P5 P5 (Line 2) 15 products
(Mixer B,C)
Make-Int3 Int3 Pack-P6 P6
(Line 3)

Base B Pack-P7 P7 (Line 4)


With Storage bypassing
(Mixer B C)
Make-Int4 Int4 Pack-P8 P8 (Line 1)

Pack-P9 P9 (Line 2)
Time horizon = 120 h
(Mixer B,C)
Make-Int5 Int5 Pack-P10 P10 (Li 5)
(Line

Pack-P11 P11 (Line 5)


(Mixer B,C)
Base C Make-Int6 Int6 Pack-P12 P12 (Line 4)

Pack-P13 P13 (Line 4)


(Mixer B,C)
Make-Int7 Int7 Pack-P14 P14 (Line 2)

Pack-P15 P15 (Line 4)

Different Cases
a) Unlimited intermediate storage with Dmin
b) No intermediate storage with Dmin
c) Flexible finite intermediate storage: 3 tanks available with
maximum
i capacity
it off 60 tton each,
h and
d any iintermediate
t di t can
be stored in any of the 3 tanks. With Dmin and Dmax
d) Same as (c) but without Dmax
e) Restricted finite intermediate storage: With Dmin and Dmax
f) Same as (e) but without Dmax

Restricted Storage Suitability


State(s) tank (Jst)
Int1 Tank A
Int2 Tank B
Int3 Tank C
Int4 Tank A
Int5 Tank B
Int6 Tank A
Int7 Tank C

9
Other models

Ierapetritou, M. G.; Floudas, C. A. Effective continuous-time formulation for


short-term scheduling: 2. Continuous and semi-continuous processes. Ind.
g Chem. Res. 1998,, 37,, 4360.
Eng.
Giannelos, N. F.; Georgiadis, M. C. A novel event-driven formulation for short-
term scheduling of multipurpose continuous processes. Ind. Eng. Chem.
Res., 2002, 41, 2431.
Mendez, C. A.; Cerda, J. An efficient MILP continuous-time formulation for
short-term scheduling of multiproduct continuous facilities. Comput. Chem.
Eng. 2002, 26, 687.
Castro, P
Castro P. M
M.;; Barbosa-Povoa
Barbosa Povoa, A
A. P
P.;; Matos
Matos, H
H. A
A.;; Novais
Novais, A
A. Q
Q. Simple
continuous-time formulation for short-term scheduling of batch and
continuous processes. Ind. Eng. Chem. Res. 2004, 43, 105.
Castro, P. M.; Barbosa-Povoa, A. P.; Novais, A. Q. A divide-and-conquer
strategy for the scheduling of process plants subject to changeovers using
continuous-time formulations. Ind. Eng. Chem. Res. 2004, 43, 7939.

Results for Case A - UIS

this work Castro et alGiannelos & Mendez &


Georgiadis Cerda
Events 4 9 4
Binary variables 108 236 108 38
Continuous variables 356 762 628 44
Constraints 1040 894 1637 140
Nonzeros 4867 5354
RMILP 2695.32 2695.32 2695.32
MILP 2695.32 2695.32 2695.32 2695.32
Profit 2695.32 2695.32 2695.32 2695.32
Integrality gap (%) 0 0 0
CPU time (s) 1.03 58.5a 186.44 14a
Nodes 69 1041 15310
aCPU times for other models reported for completeness only.

10
Gantt Chart for Case A - UIS

Results for Case B - NIS


this work Castro et al
Events 4 9
Binary variables 108 236
Continuous variables 328 762
C t i t
Constraints 1240 894
Nonzeros 5926
RMILP 26946.722 2695.32
MILP 26869.467 2672.50
Profit 2689.747 2672.50
Integrality gap (%) 0.26 0.85
CPU time (s) 157.86 200000a
Nodes 4272 8007335
aCPU time reported for completeness only.

11
Gantt Chart for Case B - NIS

Results for Case C - FIS


this work Giannelos & Giannelos &
Georgiadis Georgiadisa
Events 4 4 4
Binary variables 276 220 292
Continuous variables 580 712 712
Constraints 4282 2113 2113
Nonzeros 21190 6884 7176
RMILP 13876.71 1388 13876.67a
MILP 13857 1388 13857a
Profit 1388 1388 1388
Integrality gap (%) 0.062 0 0.01
CPU time (s) 8.81 0.81 3.92
Nodes 130 30 50
a Using objective function with C1=10,
=10 C2=C3=1

Max Profit

C1 ∑ ∑ price ∑ ρ
s
p
si b(i, n) − C2 ∑ ∑ w(i, n) − C3 ∑ ∑ z(i st , n)
s∈S P n∈ N i∈ I s i∈I n∈ N i st ∈I st n∈N

12
Gantt Chart for Case C - FIS

Results for Case D - FIS


this work Castro et al Giannelos & Mendez &
Georgiadis Cerda
Events 4 10 4
Binary variables 276 330 220 60
C i
Continuous variables
i bl 580 927 712 87
Constraints 4267 1127 2113 361
Nonzeros 21130 6884
RMILP 26946.72 2695.32 2695.32
MILP 26910.18 2695.32 2692.06 2670.28
Profit 2695.32 2695.32 2692.06 2670.28
Integrality gap (%) 0.12 0 0.12
CPU time (s) 465.61 162a 60000 399a
Nodes 7144 3934 3307486
a CPU times for other models reported for completeness only.

13
Gantt Chart for Case D - FIS

Results for Case E - FIS


this work
Events 4
Binary variables 164
Continuous variables 412
Constraints 2080
Nonzeros 9406
RMILP 13876.712
MILP 13857
Profit 1388
Integrality gap(%) 0.026
CPU time (s) 6.56
Nodes 100

14
Gantt Chart for Case E - FIS

Results for Case F - FIS


this work Giannelos &
Georgiadis
Events 4 4
Binary variables 164 164
Continuous variables 412 656
Constraints 2065 1833
Nonzeros 9346 5904
RMILP 26946.72 2695.32
MILP 26914.18 2689.39
Profit 2695.32 2689.39
Integrality gap (%) 0.093 0.22
CPU time (s) 662.58 60000
Nodes 16524 3550540

15
Gantt Chart for Case F - FIS

Conclusions

– Proposed an Improved Unit-Specific Event-based Continuous-Time


formulation for Short-Term Scheduling of Continuous Plants
– Rigorous
Ri T
Treatment
t t off St
Storage Requirements
R i t comparedd tto th
the M
Model
d l
of Ierapetritou and Floudas (1998)
– Improved Sequencing Constraints
– Finds the global optimal solution for all variants of an Industrial Case
Study from the Literature

16
Cyclic Scheduling of Continuous
Plants

Dr. Munawar Abdul Shaik

Assistant Professor
Department
p of Chemical Engineering
g g

Problem Definition
Given:
- products along with their demands
- stages and interconnections
- intermediate and final product inventory tank capacities
- processing time for each product in all stages
- transition times (sequence dependent)
For a cyclic schedule determine:
- sequencing of products
- length of cycle time
- length of production times
- amounts of products to be produced
- levels of intermediate storage and final product inventories

1
Cyclic Scheduling Problem
tanks products
1

. ...
2
. . . .
. . . . .
N
stage 1 stage 2 stage M

M lti t
Multistage Multiproduct
M lti d tC Continuous
ti Pl
Plantt
(Pinto & Grossmann, 1994)

Mathematical Formulation
Time slot
k=1 k=2 k = NK Transition
stage 1 ...
k=1 k=2
... k = NK processing
i
stage 2
.
.
.
k=1 k=2 k = NK
stage M ...

time

Time slot representation

2
MINLP model for Cyclic Scheduling
Maximize
WpMi Im im Zijkm
Profit = ∑p i
i
Tc
− ∑∑ Cinvim
i m Tc
− ∑∑∑∑ Ctrij
i j k m Tc
1 ⎛ TppikM ⎞
− ∑∑
2 i k
Cinvfi α iM RpiM ⎜1 −
⎝ Tc ⎠
⎟TppikM (1)

subject to
∑y k
ikm =1 ∀i ∀m (2a)

∑y i
ik
ikm =1 ∀k ∀m (2b)

∑z j
ijkm = yikm ∀j ∀k ∀m (3a)

∑z i
ijkm = y jk −−1m ∀i ∀k ∀m (3b)

MINLP model for Cyclic Scheduling

Tspikm − U im yikm ≤ 0
T
∀i ∀ k ∀m (4a)

Tepikm − U im yikm ≤ 0
T ∀i ∀ k ∀m (4b)

Tppikm − U im yikm ≤ 0
T
∀i ∀ k ∀m (4c)

Tppikm = Tepikm − Tspikm ∀ i ∀ k ∀m (4d)

∑ Tsp
i
i1 m = ∑ ∑τ
i j
ijm z ij 1 m ∀m (5a)

∑ Tsp
i
i ( k + 1) m = ∑ Tep
i
ikm + ∑ ∑ τ ijm z ij ( k
i j
+ 1) m ∀ k < NK ∀m (5b)

⎛ ⎞
Tc ≥ ∑ ⎜⎜ ∑ Tpp ikm + ∑ ∑ τijm zijkm ⎟⎟ ∀m (5c)
k ⎝ i i j ⎠

3
Inventory Breakpoints

Tppikm Tppikm
Tspikm Tepikm stage m Tspikm Tepikm

Tppik(m+1) Tpp
ppik(m+1)
ik( 1)
stage m+1
Tspik(m+1) Tepik(m+1) Tspik(m+1) Tepik(m+1)

Inventory Inventory
level level
I1im I2im I1im
I2im

I0im I3im I0im I3im

time time

Inventory Breakpoints
⎧ ⎫
I 1im = I 0 im + α im Rp im min ⎨ ∑ Tsp ik ( m + 1) − ∑ Tsp ikm , ∑ Tpp ikm ⎬
⎩ k k k ⎭
⎧ ⎫
i + (α im Rp im − Rp i ( m +1) ) max ⎨ 0, ∑ Tep ikm
i = I 1im
I 2 im ik − ∑ Tsp ik ( m + 1) ⎬
⎩ k k ⎭
⎧ ⎫
I 3im = I 2 im − Rp i ( m +1) min ⎨ ∑ Tpp ik ( m + 1), ∑ Tep ik ( m + 1) − ∑ Tep ikm ⎬
⎩ k ⎭
0 ≤ I 1im ≤ Im im
k k

0 ≤ I 2 im ≤ Im im
0 ≤ I 3im ≤ Im im
Im im ≤ U im
I

I 3im = I 0 im ∀i ∀m (6)

Wp Mi = α iM Rp iM ∑ Tpp ikM ∀i (7a)


k
(7b)
Wp Mi ≥ DiTc ∀i

4
Mathematical model

Variables:

y ikm ∈ {0 ,1}
0 ≤ z ijkm ≤ 1
Tsp ikm , Tep ikm , Tpp ikm , Wp Mi , T c , Im im , I 0 im , I 1im , I 2 im , I 3 im ≥ 0

Most of the Scheduling problems in Chemical


Engineering result in MILP/MINLP models with
large number of binary and continuous variables.

3P2S Scheduling Problem

fA A

fB B

fC C

stage 1 stage 2

P d t
Product ssale
l pprice
i ($/t
($/ton)
n) demand
d m nd (kg/h)
(k /h)
A 150 50
B 400 100
C 650 250

5
3P2S Problem data
stage 1 stage 2
processing intermediate processing final
rate stora e
storage rate inventory
product (kg/h) ($/ton) (kg/h) ($/ton.h)
A 800 140.6 900 4.06
B 1200 140.6 600 4.06
C 1000 140.6 1100 4.06

Transition times (sequence dependent)

stage 1 stage 2
product A B C A B C
A - 10 3 - 7 3
B 3 - 6 3 - 10
C 8 3 - 4 0 -

3P2S Solution
3 B 3 A 3 C
stage 1
0 10.84 19.72 94.05

B 3 A 3 C
stage 2
0 15.68 23.9 91.75

Inv
(ton)

Time (hr)

6
3P2S Solution

Profit = $ 442.53 / hr
Cycle time = 94.05 hr
Variables = 146 (18 bin)
Constraints = 162
CPU time = 12.43 sec

P d t
Product d
demand
d (kg/hr)
(k /h ) production
d ti (kg/h)
(k /h)
A 50 50
B 100 100
C 250 758

General Hybrid Flowshop facility


tanks tanks tanks

L11 L41 LM-2,1

S1 S2 S3 S4 S5 SM-2 SM-1 SM

L12 L42 LM-2,2

stage 1 stage 2 stage 3 stage 4 stage 5 stage M-2 stage M-1 stage M

7
Key features & assumptions
♣ Two units in each parallel line
♣ Continuous feed with FIS
♣ C
Constant
st t demand
d m d rates
t s/ V
Varying
i d demands
m ds lleading
di tto empty
mpt
slots
♣ Same number of grades in the first / second units of the
parallel lines
♣ Processing rates are decision variables with given LB & UB
♣ UIS on product side
♣ Common tank only on feed side of stage 1
♣ Only L11 and L12 cannot operate simultaneously
♣ Succeeding stages can start / end processing before the
preceding stages start / end
♣ Binary representation of logic

Effect of Sloping

Rp Tpp α Rp Tpp
Tank Tank
Stage

Rp Trpp (sloping) β Rp Trpp (sloping)

Tank Tank

Trsp Trpp Trep


Tpp
Tsp Tep Tsp Tep

sloping

8
Model Constraints

♣ Sequencing constraints

♣ Mass balance constraints

♣ Inventory balance constraints

♣ Objective function

MINLP f
formulation
l ti

Model Constraints (contd.)


Sequencing constraints

∑y k
ikm =1 ∀i ∀m

∑y i
ikm =1 ∀k ∀m

∑z
j
ijkm = yikm ∀j ∀k ∀m

∑z
i
ijkm = y jk − −1m ∀i ∀k ∀m

9
Model Constraints (contd.)
Tspikm − U im yikm ≤ 0 Trsp ikm − U im yikm ≤ 0
T T

Tepikm − U im yikm ≤ 0
T
Trep ikm − U im yikm ≤ 0
T

Tppikm − U im yikm ≤ 0 Trpp ikm − U im yikm ≤ 0


T T

Tppikm = Tepikm − Tspikm Trppikm = Trepikm − Trspikm

∑ Tsp
i
i1 m = (1 / 2 ) ∑
i
∑τ j
ijm z ij 1 m
Tc ≥ ∑∑ Trpp ' i ' k ' l
∑ Tsp ik = ∑ Tep ikm + ∑ ∑ τ ijm z ijk
k' i'
+ 1m + 1m
i i i j Tc ≥ ∑∑ Trpp" i" k " l
∑ Trsp = ∑ Tsp − (1 / 2 ) ∑ ∑τ
k" i"
ikm ikm ijm z ijkm
i i i j
Tc ≥ ∑∑ Trppikm
∑ Trep
i
ikm = ∑ Tepi
ikm + (1 / 2 ) ∑
i
∑τ
j
ijm z ijk + +1m k i

Mass balance constraints


feed and stage 1
F Tc = Rp' ∑ Trpp '
i' i '1 i ' k '1
k' αimRpim ∑ Tppikm αim ∑ Tppikm
Sfi '1Fi ' Tc = Rp' i '1∑ Trpp ' i ' k '1
k k

βim = k
= k
k' Rpim ∑ Trppikm ∑ Trpp ikm

(1 − Sfi"1) Fi" Tc = Rp" i"1∑ Trpp" i" k "1 k k

k"

Fi"Tc = Rp" i"1∑ Trpp" i" k "1


k"
β ' i ' lRp ' i ' l ∑ Trpp ' i ' k ' l
parallel line and stage γ i 'l = k'

Rpi ' m ∑ Trppi ' km


k

β ' i ' lRp' i ' l ∑ Trpp ' i ' k ' l = Rpi ' m∑ Trppi ' km
k' k

β ' i ' lRp ' i ' l ∑ Trpp ' i ' k ' l + β " i" lRp" i" l ∑ Trpp" i" k " l = Rpim ∑ Trppikm
k' k" k

β " i" lRp" i" l ∑ Trpp" i" k " l = Rpi" m ∑ Trppi" km


k" k

10
General Hybrid Flowshop facility
tanks tanks tanks

L11 L41 LM-2,1

S1 S2 S3 S4 S5 SM-2 SM-1 SM

L12 L42 LM-2,2

stage 1 stage 2 stage 3 stage 4 stage 5 stage M-2 stage M-1 stage M

Mass balance constraints (contd.)


between any two stages
βimRppim ∑ Trpp pim + 1∑ Trpp
ppikm = Rp ppikm + 1
k k

stage and parallel line

βi ' mRpi ' m ∑ Trppi ' km = Rp' i '1∑ Trpp ' i ' k '1
k k'

Sfi '1βi ' mRpi ' m ∑ Trppi ' km = Rp ' i '1∑ Trpp ' i ' k '1
k k'

(1 − Sfi"1) βi" mRpi" m ∑ Trppi" km = Rp" i"1∑ Trpp" i" k "1


k k"

βi" mRpi" m ∑ Trppi" km = Rp" i"1∑ Trpp" i" k "1


k k"

11
Model Constraints (contd.)
βiMRpiM ∑ TrppikM
WpiM = k

Tc

Binary representation of logic


qi ∑ Trep'i'k'1 + (1 − qi )∑ Trep"i"k"1 ≤ qi ∑ Trsp"i"k"1 + (1 − qi )∑ Trsp'i'k'1
k' k" k" k'

⎡⎛ ⎞ ⎛ ⎞⎤
(2qsim − 1) ⎢⎜ ∑ Tspikm ⎟ − ⎜ ∑ Trspikm+1 ⎟⎥ ≤ 0
⎣⎝ k ⎠ ⎝ k ⎠⎦

⎡⎛ ⎞ ⎛ ⎞⎤
(2qeim − 1) ⎢⎜ ∑ Tepikm ⎟ − ⎜ ∑ Trepikm+1 ⎟⎥ ≤ 0
⎣⎝ k ⎠ ⎝ k ⎠⎦

Inventory breakpoints

Tppikm Tppikm
Tspikm Tepikm stage m Tspikm Tepikm

Trppikm+1 Trppikm+1
stage m+1
Trspikm+1 Trspikm+1 Trepikm+1
Trepikm+1

Inventory Inventory
level level
I1im I2im I1im
I2im

I0im I3im I0im I3im

time time

12
Example: two-stage

C B A
Stage 1

Stage 2 C B A

I0 (B)

I3 (B)
I2 (B)

I0 (C)= I1(C) I3 (C)


Inventory
I3 (A)
I0 (A)

I1 (A)

I2 (C) I1 (B) I1 (A)

Time

Inventory constraints
Five categories

♣ Feed inventory of grades charged into only


L11 or L12

♣ Feed inventory of common grades charged


into both L11 and L12

♣ Inventory
y between any
y two stages
g

♣ Inventory between a stage and a parallel line

♣ Inventory between a parallel line and a stage

13
General Hybrid Flowshop facility
tanks tanks tanks

L11 L41 LM-2,1

S1 S2 S3 S4 S5 SM-2 SM-1 SM

L12 L42 LM-2,2

stage 1 stage 2 stage 3 stage 4 stage 5 stage M-2 stage M-1 stage M

Inventory breakpoints

Tppikm Tppikm
stage m
Tspikm Tepikm Tspikm Tepikm

Trppikm+1 Trppikm+1
stage m+1
Trspikm+1 Trspikm+1 Trepikm+1
Trepikm+1

Inventory Inventory
level level
I1im I2im I1im
I2im

I0im I3im I0im I3im


time time

14
Inventory constraints (contd.)
Inventory between any two stages
⎡ ⎧ ⎫⎤
I1im = I 0im + ⎢αimRpim min ⎨∑ Trspikm + 1 − ∑ Tspikm, ∑ Tppikm ⎬⎥ qsim
⎣⎢ ⎩k k k ⎭⎦⎥
⎡ ⎧ ⎫⎤
− ⎢ Rpim + 1 min ⎨∑ Tspikm − ∑ Trspikm + 1, ∑ Trppikm + 1⎬⎥ (1 − qsim)
⎣ ⎩k k k ⎭⎦
⎡ ⎧ ⎫⎤
I 2im = I1im + ⎢(αimRpim − Rpim + 1) max ⎨0, ∑ Tepikm − ∑ Trspikm + 1⎬⎥ qsim qeim
⎢⎣ ⎩ k k ⎭⎥⎦
⎡ ⎤
+ ⎢(αimRpim − Rpim + 1) ∑ Trppikm + 1⎥ qsim (1 − qeim)
⎣ k ⎦
⎡ ⎧ ⎫⎤
+ ⎢(αimRp pim + 1) max ⎨0, ∑ Treppikm + 1 − ∑ Tsppikm ⎬⎥ (1 − qqsim) (1 − qqeim)
pim − Rp
⎢⎣ ⎩ k k ⎭⎥⎦
⎡ ⎤
+ ⎢(αimRpim − Rpim + 1) ∑ Tppikm ⎥ (1 − qsim) qeim
⎣ k ⎦
⎡ ⎧ ⎫⎤
I 3im = I 2im − ⎢ Rpim + 1 min ⎨ ∑ Trepikm + 1 − ∑ Tepikm, ∑ Trpp ikm + 1 ⎬⎥ qeim
⎣⎢ ⎩ k k k ⎭⎦⎥
⎡ ⎧ ⎫⎤
+ ⎢αim Rpim min ⎨ ∑ Tepikm − ∑ Trepikm + 1, ∑ Tpp ikm ⎬⎥ (1 − qeim)
⎢⎣ ⎩ k k k ⎭⎥⎦

Inventory constraints (contd.)


Inventory breakpoints of the feed tank

C B D
Line 2

Inventory I1 (B)
level
I3 ((B))
I0 (B)

I2 (B)
Time

15
Inventory constraints (contd.)
Inventory break points for feed
I1i ' = I 0i '+ Fi ' ∑ Trsp'
k'
i ' k '1

I 2i ' = I1i '+( Fi '− Rp' i '1 )∑ Trpp 'i ' k '1
k'

⎛ ⎞
I 3i ' = I 2i '+ Fi ' ⎜ Tc-∑ Trep 'i ' k '1 ⎟
⎝ k' ⎠

I1i" = I 0i"+ Fi" ∑ Trsp"


k"
i " k "1

I 2i" = I1i"+( Fi"− Rp" i"1 )∑ Trpp"i" k "1


k"

⎛ ⎞
I 3i" = I 2i"+ Fi" ⎜ Tc-∑ Trep"i" k "1 ⎟
⎝ k" ⎠

Inventory constraints (contd.)


Inventory break points of feed common tank
Trpp’i’k’ Trpp’i’k’
Line 1
Trsp’i’k’ Trep’i’k’’ Trsp’i’k’ Trep’i’k’’

Trpp”i”k” Trpp”i”k”
Line 2
Trsp”i”k” Trsp”i”k” Trep”i”k”
Trep”i”k”

Inventory
level

I1im

I3im I5im
I0im

I2im I4im time

16
Inventory constraints (contd.)
Inventory break points of feed common tank
⎛ ⎞
I1i = I 0i + Fi ⎜ qi

∑ Trsp '
k'
+(1-qi )∑ Trsp" i" k "1 ⎟
i ' k '1
k" ⎠

I 2i = I1i + qi (Fi -Rp' i '1)∑ Trpp ' i ' k '1 + (1 − qi )(Fi -Rp" i"1) ∑ Trpp" i" k "1
k' k"

⎛ ⎞ ⎛ ⎞
I 3i = I 2i + qiFi⎜ ∑ Trsp" i" k "1 − ∑ Trep' i ' k '1⎟ + (1 − qi ) Fi ⎜ ∑ Trsp ' i ' k '1 − ∑ Trep" i" k "1 ⎟
⎝ k" k' ⎠ ⎝ k' k" ⎠

I 4i = I 3i + (1-qi )(Fi -Rp' i '1)∑ Trpp ' i ' k '1 + qi (Fi -Rp" i"1)∑ Trpp" i " k "1
k' k"

⎡ ⎛ ⎞⎤
I 5i = I 4i + Fi ⎢Tc-⎜ (1-qi )∑ Trep' i ' k '1 + qi ∑ Trep" i" k "1 ⎟⎥
⎣ ⎝ k ' k " ⎠⎦

Model constraints (contd.)


Objective function

ε = ∑ (WpiM − Di ) 2
i
Demand feasibility scenarios
WpiM Td ≤ Qd i

zijkm z'i ' j 'k 'l z"i" j"k"l


profit = ∑ PiWpiM − ∑∑∑∑Ctrij − ∑∑∑∑Ctr'i ' j 'l − ∑∑∑∑Ctr"i" j"l
i i j k m Tc i' j' k' l Tc i" j" k " l Tc
⎛ Im axil + Im axim ⎞
− ∑∑∑Cinvi ⎜ ⎟
i l m ⎝ Tc ⎠

17
Prototype hybrid flowshop
Case study 1 Td = 1000 hrs

5237
21
Qdi = 8414 m3
Fb = 28 m /hr
3
975
33
975

Prototype hybrid flowshop: Data


350
Pi = 500 $/m3
250
250

Ctr = $3500

Cinv = 5 $/m3

UiI = 800 m3

18
Results: Prototype hybrid flowshop
Objective function: min ε

CPU time = 13.2 sec


ε =0
Tc = 79.21 hrs
SfB1 = 0.587
γB1 = 0.688

Results: Prototype hybrid flowshop


Objective function: min ε

19
Results: Prototype hybrid flowshop
Objective function: max profit

6719.5 profit = 7296 $/hr


Q’i = 9888.2 m3 ε = 6.1
Tc = 61.37 hrs
1488.6
SfB1 = 0.939
2186.6 γ B1 = 1.0

Results: Prototype hybrid flowshop


Objective function: max profit

20
Results: Prototype hybrid flowshop
Ignoring Sloping losses

CPU time = 5.65 sec


10.8 ε =0
Fb = 19.67 m3/hr Tc = 12.44 hrs
8.64 SfB1 = 0.9
γB1 = 0.924

Results: Prototype hybrid flowshop


Ignoring Sloping losses

21
Results
With and without sloping (3p_2s problem)

Without sloping With sloping

Profit ($/hr) 448 402


Cycle time(hr) 96 122
CPU time(sec) 1.5 8.5

Extensions to Large problems

Performance indices 4P3S 5P3S 6P3S 8P3S 10P3S


Discrete variables 48 66 98 154 252
Continuous variables 476 717 1112 1848 3436
No. of equations 606 855 1231 1621 2609
CPU time (sec) 13.2 19.4 68.3 372.3 648.1
Non linear N-Z 1135 1609 2388 3667 6251
Code length 15397 21413 32204 53275 88669
Derivative pool 73 124 232 77 115
Constant pool 22 27 28 26 33

22
6/14/2010

Advanced Scheduling of Pulp and


Paper Plants

Dr. Munawar Abdul Shaik

Assistant Professor
Department
p of Chemical Engineering
g g

Paper manufacturing process:


Overview

P
Paper Wi d
Winder Sh t
Sheeter
machine
Pulp

Jumbo reels Cut Sheets


rolls

♣ Major Decisions:
Æ Order allocation to various mills Pinar et al (2002) Æ A-team
framework (heuristics based)
Æ Sequencing at each mill
Æ Trimming
Æ Dispatch Schedule

1
6/14/2010

Paper manufacturing: Issues


Paper manufacturing as a hybrid flowshop facility
Sheeter 1
G1 sheets

G2 Paper Winder 1
Machine 1 Wrapper 1 rolls
G3

Offline Palletizer
Rewinder
coater

G2
Wrapper 2 rolls
G3 Paper Winder 2
Machine 2
G4 Sheeter 2

♣ Simplifying assumptions:
Æ Paper machine slowest

Æ Capacity constraints for


shared resources

Multi-level Structure Paper


Industry
Two-level framework for Three/Four level framework for
small-size p
problems medium to large-size problems

Level-1
Simultaneous order
Level-1 assignment and sequencing Level-1a Order assignment across multiple-sites

Level-1b Detailed scheduling at each site


Simultaneous trim loss (Grade Sequencing)
Level-2 minimization and
optimal sequencing of
cutting patterns Level-2a Trim loss minimization

Level-2b optimal sequencing of


cutting patterns

2
6/14/2010

Multi-level Structure for Paper


Industry

Abstractions Proactive measures


Æ High trim losses
Level-1 Æ Time slots
(Assumed trim losses) Æ Higher tardiness
compared to earliness

Level-2 Æ Simultaneous trim loss & Æ Conservative


pattern sequencing production rates

Planning & Scheduling in a Paper


Industry
Model formulation for order allocation

G1 G2 G3
J1 J3 J5 J6 J7 J11 J12 Changeover
m=1 time
k=1 k=2 k=3 k=4 Production time

G1 G2 G3 G1 k-1 k
J2 J4 J8 J9 J10 J13 J14 J15 J16 J17
m=2
k=1 k=2 k=3 k=4

time

Iteration on maximum number of time slots (NK)

3
6/14/2010

Planning & Scheduling in a Paper


Industry
MINLP model for order allocation

min
i cost = ∑∑ Qpr ∑ Cpr mk gm z gmk + ∑ Q ∑∑ Ctr
j
j
m k
j
jm y jmk
j k
m k g

+ ∑ E j Q j ∑∑ Ce m y jmk +
j m k
∑ Tard
j
j Q j Ctard j

+ ∑∑∑ z gm ( slot1) g 0 g 'm Cgrgg 'm +


m g g'
∑∑∑∑ z
m k >1 g g'
gmk z g 'm ( k −1) Cgrgg 'm

s.t. ∑∑ y
m k
jmk =1 ∀ j where OMj,m=1

z gmk = min(1, ∑ y jmk OG jg ) ∀ g, m, k


j

∑z g
gmk ≤ ∑ z gm ( k −1)
g
∀ m, ∀ k >1

Planning & Scheduling in a Paper


Industry
MINLP model (contd.)
⎡ Trim mk ⎤
Q mk = ∑ Q j y jmk ⎢1 +
Qpr Qprmk ≥ ∑ Qm gm z gmk ∀ m,
m ∀k
j ⎣ 100 ⎥⎦ g

Qprmk
Tpp mk = ∑ z gmk ∀ m, ∀ k
g Rp gm
Tmk = t 0 m + ∑∑ z gmk g 0 g 'm τ mgg ' + Tpp mk ∀ m, k=1
g g'

Tmk = Tm ( k −1) + ∑∑ z ggmk z g 'm ( k −1)τ mgg


gg ' + Tpp mk
∀ m, ∀ k >1
g g'

Ts j = Td j − ∑∑ Trans jm y jmk ∀j
m k

E j ≥ Ts j − ∑∑ Tmk y jmk Tard j ≥ ∑∑ Tmk y jmk − Ts j ∀j


m k m k

4
6/14/2010

Case Study 1: Order allocation

20 orders, 5 grades, 3 mills, 5 customers

Customer orders for case study 1:


G1 G2 G3 G4 G5
Delhi J3 J1 J2 J4
Mumbai J5 J6 J7 J8 J9
Chennai J11 J10 J12
Pune J13 J14 J16 J17 J15
Hyderabad J19 J18 J20

Case Study 1: Order allocation

20 orders, 5 grades, 3 mills, 5 customers

Comparison of various costs ($) for different NK


2 slots 3 slots 4 slots 5 slots 6 slots
production cost 78,65,893 73,47,141 72,26,088 69,64,937 122,48,810
transportation cost 6,06,830 1,49,610 2,04,170 4,71,820 8,80,620
earliness cost 10,61,663 1,32,584 2,10,455 9,30,072 14,49,588
tardiness cost 20,95,995 1,14,728 1,24,180 8,77,822 158,60,900
gradechange cost 16,800 20,000 24,400 31,200 28,000
total cost 116,47,180 77,64,064 77,89,293 92,75,852 304,67,920

5
6/14/2010

Case Study 1: Order allocation


NK = 3 slots optimum

Delhi G4 G3 G2
J4 J1 J2 J3
(M1) 1 10 16 22
Mumbai G2 G5 G1
(M2) J7 J9 J15 J20 J5 J6
0 12 25 30
Mumbai G2 G4 G3
(M3) J13 J14 J16 J17 J8
2 14.5 24.5 29.5

Chennai G3 G1 G5
(M4) J10 J18 J11 J19 J12
0 9 18 25

time (days)

Case Study 2: Order allocation

35 orders, 5 grades, 3 mills, 6 customers

Customer orders for case study 2:


G1 G2 G3 G4 G5
Delhi J3 J28 J1 J2 J4 J25
Mumbai J5 J6 J7 J8 J9 J23 J27
Chennai J11 J29 J30 J35 J10 J12
Pune J13 J14 J16 J17 J15
H d
Hyderabad
b d J19 J18 J20 J34
Bhopal J32 J33 J21 J24 J22 J26 J31

6
6/14/2010

Case Study 2: Order allocation

35 orders, 5 grades, 3 mills, 6 customers

Comparison of various costs ($) for different NK


3 slots 4 slots 5 slots
production cost 41,07,580 41,35,222 40,51,072
transportation cost 2,66,490 1,41,490 2,23,490
earliness cost 2,77,862 3,71,648 4,71,172
tardiness cost 4,91,604 2,36,950 4,17,696
gradechange cost 28,400 30,400 29,600
total cost 51,71,937 49,15,712 51,93,032

Case Study 2: Order allocation


NK = 4 slots optimum
G4 G3 G1 G2
Delhi J28
J4 J25 J1 J2 J6 J32 J33
(M1) 1 8 14 27.6 30.6
G2 G2 G5 G3
Mumbai
J24 J7 J9 J15 J20 J8J22J26J31
(M2)
0 6.7 12.1 25.1 33.4
G2 G4 G5
Mumbai
J3 J13 J21 J14 J16 J17 J23J27J34
(M3)
2 15 25.1 32
G3 G1 G2 G5
Chennai J10 J18 J5 J11 J19 J29 J30 J35 J12
(M4) 0 8 20 29.1 32.3

time (days)

7
6/14/2010

Level-2 Results
Orders width quantity due date transport tardiness
time penalty
i bi (m) Qi(ton) Tdi(days) tri(days) Cti
I1 0.90 140 7 2 8
I2 0.80 130 8 1 4 22 Feasible Cutting
g
I3 0.70 125 10 1 10 Patterns
I4 1.15 100 10 3 4
I5 1.05 95 3 2 10
I6 1.20 80 3 0 6
I7 1.00 50 4 3 2

Sequential approach Simultaneous


% Trimloss 1.031174 1.03134
Trim cost $9899.2 $9900.8
Under production cost $9905.6 $9907.2
Knife change cost $700 $1000
Tardiness cost $2438.4 $1015.5
The total cost $22943.2 $21823.5

p17 Æ p9 Æ p5 Æ p18 Æ p19 Æ p22 Æ p14

p17 Æ p12 Æ p9 Æ p5 Æ p21 Æ p19 Æ p22.Æ p18 Æ p14 Æ p7

You might also like