Professional Documents
Culture Documents
Dr. M.Srinivasarao
16/06/2010
ii
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
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
7 Dynamic Optimization 71
7.1 Dynamic programming . . . . . . . . . . . . . . . . . . . . . 73
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
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
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
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.
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
L 1 2
F = N
=
2 +1 L N +2
2
= = 0:33
4+2
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
xn = xn 1 + xn 2
n 2
FN 2
d1 = L
FN 1
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
(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
r2 = 1 r; r2 + r 1 = 0; (2.2)
p p
1+ 1+4 1+ 5
r = = (2.3)
2 2
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
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)
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
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
Subject to
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)
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
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
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.
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
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)
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
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
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.
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.
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
5
Discrete Optimization
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
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.
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
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
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
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
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
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
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.
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
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
x(to) : xo (7.4)
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.
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
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
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
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.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
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
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.
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 .
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
X +Y = [a + c b + d] (8.3)
X Y = [a d b c] (8.4)
The width of X is
Example 4 Example 1
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.
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.
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,
Subject to
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
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
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?)
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
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.
(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).
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
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.
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
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
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)
∑ 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
time time
•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)
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
A A
B B
C C
stage 1 stage 2
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
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)
•5
Overview of Planning and Scheduling:
Short-term Scheduling of Batch Plants –
Discrete time model
1
People & Places
Chemical engineers have made significant contributions
in Operations Scheduling in the past two decades
♣ Grossmann et al Æ CMU
♣ Kar
Karimi
m ett a
al ÆN
NUS
S
♣ Pinto et al Æ RPI
Forecasting Scheduling
Management MPC
2
Planning and Scheduling
Multi-site Production Planning:
Time Horizon is
period 1 period 2 period T longer
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
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
Multi-product plants
Max Profit (job shops)
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
fA A
fB 1 2 3 4 B
C fC
Process Representation
STN Representation:
¾State-Task Network (STN) S8 Product 1
Feed C
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
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
6
Scheduling Characteristics
Profit maximization
Make-span minimization
Performance
Mean-flow time minimization
criteria
Average tardiness minimization
Mathematical Model
7
Solution of the Scheduling Model
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
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.
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
10
Example 3
STN Representation
A1 A2
Prod A
F dA
Feed Int A
B1 B2
Feed B Prod B
Int B
C1 C2
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
11
Data
Data of storage capacities, initial stock levels and prices of various states
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)
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
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)
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
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
3
Global-event based model of
Castro, Barbosa-Povoa, and Matos (2001)
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
T (t ) ≤ MS t=T
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.
(
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
T (t ) = 0 ∀t = 1
6
Global-event based model of
Maravelias and Grossmann (2003)
∑ Ws(i, n) ≤ 1
i∈suitij
∀j , n
∑ Wf (i, n) ≤ 1
i∈suitij
∀j , 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
⎛ ⎞ ⎛ ⎞
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)
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
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
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 (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)
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.
∑ 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
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 ) ≤ 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
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
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: 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.
13
Short-term Scheduling of Batch Plants:
Unit-Specific Event-based Continuous-
time Models
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
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
2
Short-Term Scheduling: Batch Plants
Shaik & Floudas (2008)
ρ 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
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
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)
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
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
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 ⎠
Demand Constraints
E (r , N ) + ∑ ( μ rip w(i, N ) + ρ rip b(i, N ) ) ≥ Dr ∀r ∈ R S (10)
i∈I r
Example: N2
U2 100 E(r,N1)=200 ?
N1 N2
U1 300
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)
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)
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
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:
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
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
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
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
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
Assistant Professor
Department
p of Chemical Engineering
g g
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
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
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
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
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
Giannelos and Georgiadis (2002) enforced the zw condition for batch plants
as well leading to suboptimal solutions
(Sundaramoorthy & Karimi, 2005; Shaik, Janak, & Floudas, 2006)
∑ρ
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
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
∑ρ
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
(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
ST0 ( s ) + ∑ρ
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) ≤ ∑V
ist ∈I s
max
isi w(ist , n) ∀s ∈ S FIS , n = 1
No need to enforce the zero wait condition on start time of processing tasks
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
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)
Pack-P9 P9 (Line 2)
Time horizon = 120 h
(Mixer B,C)
Make-Int5 Int5 Pack-P10 P10 (Li 5)
(Line
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
9
Other models
10
Gantt Chart for Case A - UIS
11
Gantt Chart for Case B - NIS
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
13
Gantt Chart for Case D - FIS
14
Gantt Chart for Case E - FIS
15
Gantt Chart for Case F - FIS
Conclusions
16
Cyclic Scheduling of Continuous
Plants
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
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)
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)
∑ 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
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)
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
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
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
S1 S2 S3 S4 S5 SM-2 SM-1 SM
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
Tank Tank
sloping
8
Model Constraints
♣ Sequencing constraints
♣ Objective function
MINLP f
formulation
l ti
∑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
∑ 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
βim = k
= k
k' Rpim ∑ Trppikm ∑ Trpp ikm
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
10
General Hybrid Flowshop facility
tanks tanks tanks
S1 S2 S3 S4 S5 SM-2 SM-1 SM
stage 1 stage 2 stage 3 stage 4 stage 5 stage M-2 stage M-1 stage M
β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'
11
Model Constraints (contd.)
βiMRpiM ∑ TrppikM
WpiM = k
Tc
⎡⎛ ⎞ ⎛ ⎞⎤
(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
time time
12
Example: two-stage
C B A
Stage 1
Stage 2 C B A
I0 (B)
I3 (B)
I2 (B)
I1 (A)
Time
Inventory constraints
Five categories
♣ Inventory
y between any
y two stages
g
13
General Hybrid Flowshop facility
tanks tanks tanks
S1 S2 S3 S4 S5 SM-2 SM-1 SM
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
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 ⎭⎥⎦
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' ⎠
⎛ ⎞
I 3i" = I 2i"+ Fi" ⎜ Tc-∑ Trep"i" k "1 ⎟
⎝ 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
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 " ⎠⎦
ε = ∑ (WpiM − Di ) 2
i
Demand feasibility scenarios
WpiM Td ≤ Qd i
17
Prototype hybrid flowshop
Case study 1 Td = 1000 hrs
5237
21
Qdi = 8414 m3
Fb = 28 m /hr
3
975
33
975
Ctr = $3500
Cinv = 5 $/m3
UiI = 800 m3
18
Results: Prototype hybrid flowshop
Objective function: min ε
19
Results: Prototype hybrid flowshop
Objective function: max profit
20
Results: Prototype hybrid flowshop
Ignoring Sloping losses
21
Results
With and without sloping (3p_2s problem)
22
6/14/2010
Assistant Professor
Department
p of Chemical Engineering
g g
P
Paper Wi d
Winder Sh t
Sheeter
machine
Pulp
♣ 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
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
Level-1
Simultaneous order
Level-1 assignment and sequencing Level-1a Order assignment across multiple-sites
2
6/14/2010
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
3
6/14/2010
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
s.t. ∑∑ y
m k
jmk =1 ∀ j where OMj,m=1
∑z g
gmk ≤ ∑ z gm ( k −1)
g
∀ m, ∀ k >1
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'
Ts j = Td j − ∑∑ Trans jm y jmk ∀j
m k
4
6/14/2010
5
6/14/2010
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)
6
6/14/2010
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