Documente Academic
Documente Profesional
Documente Cultură
pubs.acs.org/IECR
Adrián Bonilla-Petriciolet*
Department of Chemical Engineering, Instituto Tecnológico de Aguascalientes, Aguascalientes, México
ABSTRACT: This study introduces a strategy to improve the effectiveness of Cuckoo Search (CS) algorithm for the
unconstrained Gibbs free energy minimization in phase equilibrium calculations of nonreactive systems. Specifically, the gradient
information of the unconstrained Gibbs free energy function, which is readily available, is used to enhance the balance between
diversification and intensification stages of the CS algorithm for phase-split calculations in multicomponent systems. The results
showed that it is feasible to improve the numerical performance of the CS algorithm using the gradient information of the Gibbs
free energy function; this improved method provides better results for phase equilibrium calculations in nonreactive systems with
insignificant additional computational effort. This gradient-based Cuckoo Search (GBCS) algorithm outperformed the
conventional CS algorithm, in terms of its reliability and efficiency in solving phase equilibrium problems, especially for
multicomponent systems.
© 2014 American Chemical Society 10826 dx.doi.org/10.1021/ie5016574 | Ind. Eng. Chem. Res. 2014, 53, 10826−10834
Industrial & Engineering Chemistry Research Research Note
π
intensification stages of current metaheuristics is still a challenge,
especially for multicomponent systems. The lack of the proper ∑ nij = zinF i = 1 , ..., c
balance of these stages may lead to a poor convergence j=1 (2)
performance and low algorithm reliability. This problem prevails
0 ≤ nij ≤ zinF i = 1 , ..., c ; j = 1 , ..., π (3)
even for the most promising metaheuristics such as Cuckoo
Search or Bare-Bones Particle Swarm Optimization, which may where nij and Δμij/RT are the mole numbers and chemical
show some numerical disadvantages for PEC.13,16 The desirable potentials of species i in phase j, respectively; c and π are the
scenario for the application and implementation of a numbers of components and phases at equilibrium, respectively;
metaheuristics for the global minimization of the Gibbs free zi is the mole fraction of component i in the feed; and nF is the
energy function in a process simulator is that the optimization total moles in the feed. Decision variables nij for this constrained
method can quickly identify regions in the search space with optimization problem are c·π.
high-quality solutions, without wasting too much computational The unconstrained minimization of the Gibbs free energy
time in unpromising regions. function can be performed using alternative variables χij instead
In particular, a recent study 18 showed that CS is a reliable of nij as decision variables.8 For multiphase nonreactive systems,
stochastic optimization method for solving the unconstrained new decision variables χij ∈ (0,1) can be defined and employed
Gibbs minimization problem and it may offer a better by using the following expressions for the mass balances:
performance than other state-of-the-art stochastic methods.
However, it also showed that there is a need to improve the ni1 = χi1 zinF i = 1 , ..., c (4)
efficiency of the CS algorithm, especially for multicomponent
j−1
systems. Based on these facts, this study is focused on the
development of a strategy to improve the effectiveness of the CS nij = χij (zinF − ∑ nim) i = 1 , ..., c ; j = 2 , ..., π − 1
m=1
algorithm for the unconstrained Gibbs free energy minimization
(5)
in PEC of nonreactive systems. This improvement strategy is
based on the use of the gradient information of the uncon- π−1
strained Gibbs free energy function to enhance the balance niπ = zinF − ∑ nim i = 1 , ..., c
between diversification and intensification stages of the CS m=1 (6)
algorithm for PEC. One of the most commonly used and well-
where the number of decision variables χij is c(π − 1) for the
studied concepts in numerical optimization is the gradient. The
unconstrained Gibbs free energy minimization of nonreactive
gradient at any point in the decision space indicates the direction
systems. In most of the reported studies, authors assumed that
in the search space along which the function to be optimized
the number and type of phases at equilibrium are known; such
improves the most.19 Therefore, this direction, which is derived
problems are also refereed as phase split calculations. In this
from the objective function gradient, can be incorporated into
study, the same assumption is made. For example, for a two-
the metaheuristics to improve their numerical performance. Our
phase split problem, the objective function becomes
results showed that it is feasible to improve the performance of
the CS algorithm using the gradient information of the Gibbs free Δg
c ⎛ Δμ ⎞ c ⎛ Δμiβ ⎞
energy function. This improved method provides better results = ∑ niα⎜ iα ⎟ + ∑ niβ⎜⎜ ⎟⎟
for PEC in nonreactive systems without adding a computational RT i=1
⎝ RT ⎠ i=1 ⎝ RT ⎠ (7)
complexity to the optimization algorithm. In summary, this study
where the subscripts α and β refer to the two phases at
introduces a modification to the CS algorithm, which maintains
equilibrium. The decision variables χiα for a two-phase split
the reliability of the algorithm but significantly enhances its
problem are related to the mass balances as follows:
efficiency in the unconstrained Gibbs free energy minimization
for PEC in multicomponent systems. niα = χiα zinF i = 1 , ..., c (8)
2. THE UNCONSTRAINED GIBBS FREE ENERGY niβ = zinF − χiα zinF i = 1 , ..., c (9)
MINIMIZATION FOR PHASE EQUILIBRIUM On the other hand, the gradient of the unconstrained Gibbs
CALCULATIONS IN NONREACTIVE SYSTEMS free energy function can be easily derived as follows:
In a phase equilibrium problem, a mixture of substances at a given ⎛ Δμij ⎞ ∂nij
1 ⎛ ∂Δg ⎞
π c
temperature (T), pressure (P), and total molar amount may ⎜⎜ ⎟⎟ = ∑ ∑ ⎜⎜ ⎟⎟
separate into two or more phases. The global minimization of the RT ⎝ ∂χkα ⎠ j=1 i=1 ⎝ RT ⎠ ∂χkα
T
Gibbs free energy must be performed for calculating the
π c ∂(Δμij /RT )
equilibrium state of a mixture.1,2 This approach was introduced
by White et al.20 and, to date, many optimization strategies have + ∑ ∑ nij k = 1 , ..., c
j=1 i=1 ∂χkα (10)
been studied for the global minimization of this thermodynamic
function.1−3 For a stable equilibrium at given T and P, the Gibbs The derivative of the number of moles niα and niβ, with respect
free energy of mixing is the thermodynamic objective function, to the decision variables χiα, is
which must be at the global minimum. This optimization
problem can be defined as ∂niα ⎧ zinF i = k
⎪
=⎨
⎩0
⎪
π c ⎛ Δμij ⎞ ∂χkα i≠k (11)
Δg g − g0
min = = ∑ ∑ nij⎜⎜ ⎟⎟
RT RT j=1 i=1 ⎝ RT ⎠ (1) ∂niβ ⎧−zinF i = k
⎪
=⎨
⎩0
⎪
∂χkα i≠k (12)
subject to
10827 dx.doi.org/10.1021/ie5016574 | Ind. Eng. Chem. Res. 2014, 53, 10826−10834
Industrial & Engineering Chemistry Research Research Note
Figure 1. Pseudocode of the gradient-based cuckoo search (GBCS) algorithm used for the unconstrained minimization of the Gibbs free energy in
nonreactive systems.
The second term of eq 10 is identical to zero, based on the abandoned. Therefore, the numerical implementation of CS for
Gibbs−Duhem equation. Thus, the gradient of the uncon- global optimization is based on the following rules:21−23
strained objective function of a two-phase split problem (e.g., eq (1) Each cuckoo lays an egg in a random nest. The egg
7), is analytically obtained as represents a set of solutions for the optimization problem.
1 ∂Δg ⎡ Δμ Δμkβ ⎤ (2) The best eggs (i.e., solutions) are contained in a fraction of
= zknF ⎢ kα − ⎥ k = 1 ,..., c the nests and are carried over to the next iteration.
RT ∂χkα ⎣ RT RT ⎦ (13) (3) The number of nests does not change. A host bird can find
an alien egg with a specified probability pa ∈ [0,1]. If an
It is important to remark that the evaluation of eq 13 (i.e., the alien egg is found, the host can abandon the nest or discard
gradient of Δg/RT) does not involve any derivatives of the the egg, and then build a new nest elsewhere. This
chemical potential function and can be easily implemented condition is implemented in CS with the assumption that a
independent of the thermodynamic model used (i.e., EoS or local fraction pa of nh nests is replaced by new nests.
composition model). Finally, the computational cost associated
with the calculation of this gradient is insignificant, from a The use of Lévy flights in the CS algorithm makes its local and
practical point of view, since the chemical potentials are global search stages effective. A Lévy flight is a trajectory that
calculated in the course of the calculation of the objective consists of taking successive random steps. This sequence of
function. We will illustrate that the use of the gradient of the sudden jumps, which are chosen from a power-law tail
Gibbs free energy function may increase the effectiveness of probability density function, is a characteristic of the Lévy flight,
metaheuristics for PEC, because it provides the direction of which is considered as the optimum random search pattern. To
maximum improvement to search for the optimum of the generate a new egg, a Lévy flight is performed using the
objective function. Based on this fact, in the following section, we coordinates of a randomly selected egg. This step can be
describe the approach used to improve the numerical perform- represented by
ance of Cuckoo Search for the unconstrained minimization of Xit + 1 = Xit + α ⊕ Levy(
́ λ) (14)
Gibbs free energy in two-phase equilibrium calculations of
nonreactive systems. where ⊕ denotes entry-wise multiplication, α is the step size, and
Lévy (λ) is the Lévy distribution. The condition for displacing an
3. STRATEGY TO IMPROVE THE BALANCE OF egg to the new position is that the value of the objective function
DIVERSIFICATION AND INTENSIFICATION STAGES is found better than another randomly selected egg. The step size
OF CUCKOO SEARCH FOR THE UNCONSTRAINED α, which depends on the scale of the optimization problem,
MINIMIZATION OF THE GIBBS FREE ENERGY controls the scale of random search. A fraction (1 − pa) of the
In this study, we have used the Cuckoo Search (CS)21−23 as an nests selected at random is abandoned and replaced by new ones
optimization algorithm for the unconstrained minimization of at new locations via local random walks:
the Gibbs free energy for PEC in nonreactive systems. The use of Xit + 1 = Xit + α(X jt − Xkt ) (15)
CS and its variants for solving multimodal optimization problems
is gaining wide popularity, because of its ease of use and effective Xtj Xtk
where and are two different solutions selected randomly by
performance.21−25 This metaheuristic emulates the brood random permutation and α is a random number drawn from a
parasitism behavior of the cuckoo birds, which lay their eggs in uniform distribution. The only parameter to be tuned is the
the nests of other species. This nature parasitism behavior fraction of nests to be abandoned (1 − pa). However, this value is
implies that the cuckoo eggs evolved to mimic the egg not critical for the optimization algorithm and Yang and Deb21
appearance of local host birds to avoid being discovered and suggested using a value of pa = 0.25.
10828 dx.doi.org/10.1021/ie5016574 | Ind. Eng. Chem. Res. 2014, 53, 10826−10834
Industrial & Engineering Chemistry Research Research Note
Table 1. Description, Thermodynamic Models, and Feed Conditions of Selected Phase Equilibrium Problems
global
No. system feed conditions thermodynamic models optimum
1 n-butyl acetate + water nF = (0.5, 0.5) at 298 K and 101.325 kPa NRTL model −0.0201983
2 toluene + water + aniline nF = (0.29989, 0.20006, 0.50005) at 298 K and 101.325 kPa NRTL model −0.3529567
3 N 2 + C1 + C2 nF = (0.3, 0.1, 0.6) at 270 K and 7600 kPa SRK EoS with classical −0.5477911
mixing rules
4 C1 + H2S nF = (0.9813, 0.0187) at 190 K and 4053 kPa SRK EoS with classical −0.0198922
mixing rules
5 C2 + C3 + C4 + C5 + C6 nF = (0.401, 0.293, 0.199, 0.0707, 0.0363) at 390 K and 5583 kPa SRK EoS with classical −1.1836523
mixing rules
6 C1 + C2 + C3 + C4 + C5 + C6 + C7−16 nF = (0.7212, 0.09205, 0.04455, 0.03123, 0.01273, 0.01361, 0.07215, 0.01248) at SRK EoS with classical −0.8387826
+ C17+ 353 K and 38500 kPa mixing rules
7 C1 + C2 + C3 + iC4 + C4 + iC5 + C5 + nF = (0.614, 0.10259, 0.04985, 0.008989, 0.02116, 0.00722, 0.01187, 0.01435, SRK EoS with classical −0.7697724
C6 + iC15 0.16998) at 314 K and 2010.288 kPa mixing rules
8 C1 + C2 + C3 + C4 + C5 + C6 + C7 + nF = (0.6436, 0.0752, 0.0474, 0.0412, 0.0297, 0.0138, 0.0303, 0.0371, 0.0415, SRK EoS with classical −1.1211758
C8 + C9 + C10 0.0402) at 435.35 K and 19150 kPa mixing rules
Our previous study24 has indicated that the convergence Herein, it is convenient to remark that a comparison between a
performance of CS can be improved via the modification of the set of promising stochastic methods for solving phase
local random walk in which a fraction (1 − pa) of the nests is equilibrium problems has been recently published.18 Its outcome
replaced. In particular, the gradient of the objective function can clearly showed that CS is a reliable method for solving phase
be employed to determine the step direction and magnitude for stability and phase equilibrium problems and it suggested further
generating new solutions.24 Using the gradient information, new research to be directed toward the improvement of the efficiency
nests are generated randomly from the worse nests but in the of CS, especially for multicomponent systems. Thus, in this
direction of the minimum as seen from the point of view of the study, we limited the comparison of the results between the
old nests. Therefore, the new solutions can be obtained using original CS algorithm and the developed modified version of CS,
which made use of the readily available gradient of the
stepi = α(X jt − Xkt ) (16) unconstrained Gibbs free energy function, to probe the
improvements in algorithm efficiency.
⎛ stepi ⎞
Xit + 1 = Xit + stepi ⊗ sign⎜ − ⎟ 4. RESULTS AND DISCUSSION
⎝ dfi ⎠ (17)
In this study, the two optimization algorithms (CS and GBSC)
and the thermodynamic models were coded in MATLAB. For
where the sign function obtains the sign of its argument and dfi is
the gradient of the objective function at each decision variable, the comparison of two methods, we have used pa = 0.25 and nh =
∂f/∂xi. Note that if the objective function gradient is negative, the 10nvar, where nvar is the number of decision variables. We studied
step direction is made positive; otherwise, the step direction is eight PEC problems, whose details can be found in Table 1.
made negative. It is important to remark that traditional These problems are multimodal with the number of decision
metaheuristics do not utilize the gradient information in their variables ranging from 2 to 10. Note that these phase equilibrium
diversification and intensification schemes. On the other hand, problems have been used in previous studies for testing other
eqs 16 and 17 do not alter the structure of the optimization global optimization strategies, including classical metaheuris-
algorithm and no additional parameters are needed to implement tics.8,10,12,13,15,16 Each problem was solved 100 times independ-
them. ently with a different random number seed, for a robust
In a previous study,16 CS algorithm has proven its superiority performance analysis.
over other algorithms, in terms of reliability (i.e., the ability to GBCS and CS were evaluated according to the reliability and
find the global minimum), for PEC. However, its degree of efficiency for finding the global optimum of the unconstrained
diversification and intensification is far from optimal, especially in Gibbs free energy function. The efficiency is determined by
challenging PEC. Note that, in the vicinity of the global recording the number of function evaluations (NFE) for each
minimum of a phase equilibrium problem, the original CS is optimization algorithm, where a low value of NFE means a higher
advantageous over other methods, because of its use of the local efficiency. Note that NFE is an unbiased indicator of the
random search.18 Preliminary calculations performed using CS computational costs required by a certain algorithm and is
with eqs 16 and 17, instead of eq 15 in different phase equilibrium independent of the host hardware. On the other hand, the
problems suggested that it is more convenient to use an adaptive reliability was measured by the success rate (SR) at certain
scheme for the generation of new solutions, which may combine numerical effort. The success rate is defined as the ratio of
the gradient information and the local random walk. Thus, we number of runs in which the global minimum was attained within
propose that eqs 16 and 17 are used if the gradient of the a tolerance at this numerical effort to the total number of runs. In
unconstrained Gibbs free energy function was >10−3; otherwise, addition, we also report a plot of the average best value against
the traditional local random search is applied in the CS algorithm. NFE. The best values are averaged over all the runs and plotted
Pseudocode for this improved algorithm (gradient-based cuckoo against NFE, which was calculated at each iteration. Since the
search, GBCS) is given in Figure 1, which has been coded in NFE needed for each iteration differ among the metaheuristics,
MATLAB. In the following section, we will compare the the plot of average best value against NFE is a useful indication of
convergence performance of both CS and GBCS in selected reliability versus efficiency of the optimization method. Finally,
PEC. the performance profiles26 for the reliability and efficiency
10829 dx.doi.org/10.1021/ie5016574 | Ind. Eng. Chem. Res. 2014, 53, 10826−10834
Industrial & Engineering Chemistry Research Research Note
Figure 2. Evolution of the mean best function value with NFE for CS and GBCS in the unconstrained Gibbs free energy minimization of nonreactive
systems
Table 2. Minimum NFE for the Average Best Value To Reach a Tolerance Value (ε) from the Known Global Minimum Using CS
and GBCS in the Unconstrained Minimization of Gibbs Free Energy
Minimum Number of Function Evaluations, NFEa
tolerance, ε PEC No. 1 PEC No. 2 PEC No. 3 PEC No. 4 PEC No. 5 PEC No. 6 PEC No. 7 PEC No. 8
CS Method
1 × 10−3 140 930 390 60 1250 4560 11970 10100
1 × 10−4 540 1770 1410 60 2650 14160 24570 20300
1 × 10−5 980 2730 2670 1060 3850 29360 39690 33300
1 × 10−6 1540 5130 4170 1980 5450 51280 57870 51900
1 × 10−7 2260 9810 6030 2860 13650 75280 77490 80100
GBCS Method
1 × 10−3 100 1230 150 60 550 1040 2970 1700
1 × 10−4 580 2250 750 60 1150 4080 6030 4500
1 × 10−5 900 3150 1830 940 2350 16400 11610 10900
1 × 10−6 1300 4650 3330 2460 4150 39920 21690 26500
1 × 10−7 1900 9390 5250 3580 10450 65840 36270 51100
a
Boldface numbers represent the more efficient algorithm.
Table 3. Success Rate of CS and GBCS in the Unconstrained Minimization of the Gibbs Free Energy at Different Iterations
Success Rate (%)a
iteration PEC No. 1 PEC No. 2 PEC No. 3 PEC No. 4 PEC No. 5 PEC No. 6 PEC No. 7 PEC No. 8
CS Method
10 2 0 0 2 9 0 0 0
25 31 1 0 26 53 0 0 0
50 95 9 16 79 85 0 0 0
100 100 91 100 100 100 0 0 0
200 100 99 100 100 100 0 0 1
300 100 100 100 100 100 32 18 100
400 100 100 100 100 100 100 100 100
GBCS Method
10 2 0 0 5 0 0 0 0
25 51 0 0 23 4 0 0 0
50 100 3 40 87 93 0 0 0
100 100 95 100 100 100 0 7 2
200 100 98 100 100 100 6 100 100
300 100 100 100 100 100 99 100 100
400 100 100 100 100 100 100 100 100
a
Boldface numbers represent the more efficient algorithm.
of the performance metric for problem p and metaheuristic sm, the evaluation of the efficiency of both CS and GBCS in
rpsm is the performance ratio used to compare the performance obtaining the global minimum of the unconstrained Gibbs free
on problem p by metaheuristic sm with the best performance by energy. This metric is the minimum number of NFE needed to
any metaheuristic on this problem; and ρs(ς) is the fraction of the reach within 10−5 of the global minimum of Δg/RT. This
total number of problems for which metaheuristic sm has a efficiency performance profile compares how fast CS and GBCS
performance ratio rpsm within a factor of ς of the best possible can find the global minimum with a tolerance level of 10−5 and it
ratio. Note that rpsm = 1 for the metaheuristic that performs the is useful to identify the metaheuristic that reaches the solution
best on a specific problem p. fastest for the phase equilibrium problems tested.
The reliability of the metaheuristic in accurately finding the The performance results of both CS and GBCS are presented
global minimum of the unconstrained Gibbs free energy function
in three different ways. For each problem, the mean best values
is considered as the principal goal; hence, the metric used to
are plotted versus NFE for each of the eight phase equilibrium
obtain the reliability performance profile is defined as
problems. These plots are reported in Figure 2. The minimum
Δg Δg * NFE required to reach a certain tolerance from the known global
t psm = − minimum for each problem were calculated and presented in
RTcalc RT (20)
Table 2, while the reliability (i.e., success rates) of both
where f * and fcalc is the known global minimum and the mean metaheuristics for solving PEC are reported in Table 3 and
value of the unconstrained Gibbs free energy function (i.e., f = Figure 3, which shows the success rate at different number of
Δg/RT) calculated by the metaheuristic over several runs. This iterations. For the purpose of this study, the success rate is
reliability performance profile compares how accurately CS and defined as the percentage of runs that converged to within 10−6
GBCS can find the global optimum value of Δg/RT, relative to of the known global minimum. Finally, the performance profiles
each other. We have also used another performance metric for of CS and GBCS for the reliability and efficiency metrics are
10831 dx.doi.org/10.1021/ie5016574 | Ind. Eng. Chem. Res. 2014, 53, 10826−10834
Industrial & Engineering Chemistry Research Research Note
■
Research Note
■
Nature-Inspired Metaheuristic Algorithms for Performing Phase
AUTHOR INFORMATION Equilibrium Thermodynamic Calculations. Sci. World J. 2014, 2014,
Article ID 374510.
Corresponding Author (19) Bosman, P. A. N. On gradients and hybrid evolutionary
*E-mail: petriciolet@hotmail.com algorithms for real-valued multi-objective optimization. IEEE Trans.
Evol. Comput. 2012, 16, 51−69.
Notes (20) White, W. B.; Johnson, S. M.; Dantzing, G. B. Chemical
The authors declare no competing financial interest. equilibrium in complex mixtures. J. Chem. Phys. 1958, 28, 751−755.
(21) Yang, X. S.; Deb, S. Cuckoo search via Lévy flights. In Proceedings
of World Congress on Nature & Biologically Inspired Computing (NABIC
2009), December 9−11, 2009, Coimbatore, India; IEEE Publications:
New York, 2009; pp 210−214 (ISBN 978-1-4244-5053-4).
(22) Yang, X. S.; Deb, S. Engineering Optimisation by Cuckoo Search.
Int. J. Math. Modell. Numer. Optim. 2010, 1, 330−343.
(23) Yang, X. S.; Deb, S. Cuckoo search: Recent advances and
applications. Neural Comput. Appl. 2014, 24, 169−174.
(24) Fateen, S. E. K.; Bonilla-Petriciolet, A. Gradient-Based Cuckoo
Search for global optimization. Math. Probl. Eng. 2014, 2014, Article ID
493740.
(25) Fister, I, Jr.; Fister, D.; Fister, I. A comprehensive review of cuckoo
search: Variants and hybrids. Int. J. Math. Modell. Numer. Optim. 2013, 4,
387−409.
(26) Dolan, E. D.; More, J. J. Benchmarking optimization software with
performance profiles. Math. Progr., Ser. A 2002, 91, 201−213.
(27) Petitfrere, M.; Nichita, D. V. Robust and efficient trust-region
based stability analysis and multiphase flash calculations. Fluid Phase
Equilib. 2014, 362, 51−68.
(28) Gaganis, V.; Varotsis, N. An integrated approach for rapid phase
behavior calculations in compositional modeling. J. Pet. Sci. Eng. 2014,
118, 74−87.