Professional Documents
Culture Documents
5 – Optimisation
Cláudio P. Fonte
Department of Chemical Engineering and Analytical Science
Learning Objectives
The objective of this video is to introduce you to how numerical optimisation
can be used to determine minima and maxima of both on-dimensional and
multidimensional functions.
Cláudio P. Fonte
Department of Chemical Engineering and Analytical Science
Optimisation
Problem
Given ! " = "$ − $" + ', find the values of ( that correspond to local minima and
maxima of )(()
5
Solve for ( so that ) , ( =0
!′(")
The solution is:
(/ = −1
(1 = 1
If:
) ,, ( < 0 → Local maximum (
!(")
) ,, ( > 0 → Local minimum
!′′(")
• Design pumps, heat exchangers, distillation columns, chemical reactors, etc., for
maximum efficiency (minimise operational costs)
• Material-cutting strategy for minimum investment cost (stainless steel, insulating
materials, …)
• Heat integration to minimise operational costs
• Network of heat exchangers
• Optimal scheduling of batch equipment operation
• Inventory control
• Process control
• …
Excel Solver
Graphical methods
• Approximate solutions
• Impractical for functions with more than two variables
!( !%&' !) !
!*
© Cláudio Fonte, 2020
Golden-section search
Golden ratio
1) Find suitable guesses of !) and !( that
bracket a single minimum of "(!)
ℓ- 1 + 5
*= =
ℓ. 2
2) New estimates of the minimum are
"(!) calculated as
!- = !( + 3
ℓ. ℓ- !. = !) − 3
where 3 = * − 1 !) − !(
!( !%&' !) !
!. !-
© Cláudio Fonte, 2020
Golden-section search
1) Find suitable guesses of !) and !( that
Minimum contained bracket a single minimum of "(!)
between /0 and /1
2) New estimates of the minimum are
"(!) calculated as
Eliminate
!* = !( + 3
!, = !) − 3
where 3 = 5 − 1 !) − !(
23 425
(2 − 1) ≤ :;
2678
!( !%&' !) !
!) or number of iterations max
© Cláudio Fonte, 2020
CHEN10050
Computational Methods for Chemical Engineering
Cláudio P. Fonte
Department of Chemical Engineering and Analytical Science
MATLAB function fminbnd
The MATLAB function fminbnd can also be used for one-dimensional minimisation. It
combines different methods for function minimisation into a single algorithm for balanced
reliability and efficiency.
Its syntax is the following:
xmin and fval are the location and value of the minimum.
The same value xoptimum that minimizes f(x) also maximizes − f(x)
optimum
MATLAB has a function fminsearch that can be used to determine minima of multi-
variable functions.
Its syntax is the following:
xmin and fval are the location and value of the minimum.
f=@(x) 2+x(1)-x(2)+2*x(1)^2+2*x(1)*x(2)+x(2)^2;
>> xmin =
-1.0000 1.5000
fval = 0.7500
Cláudio P. Fonte
Department of Chemical Engineering and Analytical Science
Worked example
$ A cylindrical pressure vessel with a hemispherical head and bottom
is needed for a process.
It needs to have a fixed volume ! = 10 m* given by
& 4 *
!= #$%& + #$
3
and a thickness + = 5 ×100* m.
The cost of the vessel is given by
3 = 45 + 46 2#$&+ + 48 4#$%+
Find the values of
where
; and < that
45 = £10 000 is the fixed costs of manufacture and delivery
minimise the cost
46 = £20 000/m* is the cost of the side wall
of the vessel.
48 = £50 000/m* is the cost of the head and bottom
© Cláudio Fonte, 2020
MATLAB function fminsearch
4 6
Subject to: ./40 + ./ = 7
3
7 = 10
1 = 5 ×10<6 4
7 − ./6
)* = 10000 0= 3
./4
), = 20000
)2 = 50000
/, 0 ≥ 0
Subject to: 9 = 10
! = 5 ×10'(
)* = 10000
)+ = 20000
)- = 50000
., 0 ≥ 0