Full text
Direct Sequential Based Firefly Algorithm for the α-Pinene Isomerization Problem Ana Maria A.C. Rocha1, Marisa C. Martins1, M. Fernanda P. Costa2, and Edite M.G.P. Fernandes1 1Algoritmi Research Centre, University of Minho, 4710-057 Braga, Portugal [email protected],[email protected],[email protected] 2Centre of Mathematics, University of Minho, 4800-058 Guimar˜aes, Portugal, [email protected] Abstract. The problem herein addressed is a parameter estimation problem of the α-pinene process. The state variables of this bioengineering process satisfy a set of differential equations and depend on a set of unknown parameters. A dynamic system based parameter estimation problem aiming to estimate the model parameter values in a way that the predicted state variables best fit the experimentally observed state values is used. A numerical direct method, known as direct sequential procedure, is implemented giving rise to a finite bound constrained nonlinear optimization problem, which is solved by the metaheuristic firefly algorithm (FA). A MatlabTM programming environment is developed with the mathematical model and the computational application of the method. The results produced by FA, when compared to those of the fmincon function and other metaheuristics, are competitive. Keywords: α-pinene isomerization, parameter estimation, direct sequential procedure, Firefly algorithm 1 Introduction Bioinformatics expertise is usually required to address some issues related with slow and expensive processes from the biotechnology area. This type of skills may be used to understand the behavior of certain organisms or biochemicals, such as the case of the parameter estimation problem on the α-pinene isomerization dynamic model. A parameter estimation problem aims to find the parameter values of a mathematical model that gives the best possible fit with existing experimental data [1]. Thus, in a dynamic model based parameter estimation process, an objective functional that gives the mean squared error between the model predicted state values and the observed values (within a fixed time interval) is minimized, subject to a set of differential equations. In a dynamic system, the parameter estimation concept may lead to confusion since the parameters are not usually time-dependent in the mathematical model. Nevertheless, in a problem like this, the parameters are the decision variables of the optimization process, although they are constant throughout the entire simulation process.
The general form of a first order ordinary differential equation (ODE) is given by dy dt =g(t, y) (1) where tis the independent variable (here, it is assumed that trepresents time) and y≡y(t) is the dependent variable. The equation is called ODE since the unknown function depends on a single independent variable and the order of the ODE is defined by the highest derivative order that appears in the equation. The equation is called linear if the function g(t, y) is linear on y. Further, a solution of the ODE is a function y(t) that satisfies the equation (1) for all values of tin the domain of y. Most of the time, we are not interested in all solutions to a differential equation, but only in a particular solution satisfying an extra condition. If the extra condition provides the value of yat the initial instant of time, the problem is called ‘initial value problem’. Hereinafter the more compact notation y0(t) = dy/dt is used. Numerical methods for solving ordinary differential equations are discretization methods that compute approximations to the solution y(t) at a finite set of points t0, t1, t2, . . . , tnof the independent variable interval ti≤t≤tf, where ti and tfare the initial and final values of the interval, respectively. A variety of numerical methods for solving a system of ODEs is available in the literature, being the most known the Euler’s method, the Runge-Kutta method and the backward differentiation formula [2]. A dynamic mathematical model emerges when the optimization and control of industrial bioprocesses [3] are carried out. The construction of the model involves several stages. First, the objectives are defined based on theoretical and/or empirical knowledge of the process under study. In general, the mathematical model depends on a set of unknown parameters that require to be investigated. Second, the values for the parameters are estimated based on experimental data, assuming that the mathematical model simulates the process the best possible way. The goal of the parameter estimation problem is to calibrate the model so that it can reproduce the experimental results as close as possible. This is performed by minimizing an objective function that measures the goodness of the fit. Finally, the model with the estimated parameter values may be validated [4,5]. In general, the mathematical modeling of bioprocess engineering problems involves nonlinear dynamic equations as constraints and a nonlinear objective function to be optimized, giving the so called dynamic optimization (DO) problem. Nonconvex and multimodal functions frequently arise in DO. Moreover, some kind of noise and/or discontinuities may be present making the problem even more complex. Therefore, robustness and efficiency are crucial properties of an optimization solver so that it is capable of computing a good approximation to a global solution to the DO problem without an excessive computational effort. Gradient-based local methods are generally very efficient to solve finitedimensional constrained nonlinear programming (NLP) problems, although they
can only deal with problems where the objective function and the constraint functions are continuously differentiable [6]. In general, they may lead to suboptimal solutions if multiple local optima are present. The alternative to compute a global optimal solution to a NLP problem is to use a global optimization method [1,7,8,9,10]. There has been a growing interest in developing algorithms that converge to the global optimal solution. Global search algorithms often emerge from the modifications introduced in local search algorithms. A common practice is to introduce some stochastic components to force the algorithm to diversify the search for other solutions and explore the search space. Then, they become stochastic algorithms. The stochastic component can be introduced in various form, such as for example, a simple random generation of solutions in the search space, and the use of random numbers to define the path of solutions. Most stochastic algorithms are also known as metaheuristics since they combine random components with historical knowledge of previous search in regions that have been explored and are in the neighborhood of local solutions. This is an important issue since premature convergence to local optimal solutions can be avoided. Metaheuristics are approximate methods or heuristics that are designed to search for good solutions, known as near-optimal solutions, with less computational effort and time than the more classical algorithms. Algorithms that simulate the behavior of animals in nature have been widely used to solve complex mathematical problems. Classical examples of this type of algorithms are the particle swarm optimization [11] and more recently the firefly algorithm (FA) [12]. Deterministic global optimization techniques have also been used to find a global solution that best reconciles the model parameters and measurements [13,14,15]. Although the convergence to the global optimal solution is guaranteed, a deterministic method is only feasible for a small number of decision variables. Since stochastic methods are able to converge rapidly to the vicinity of the global solution, although they are very expensive to locate a global solution with high quality, hybrid methods that combine global and local strategies have recently become very popular [16]. Since the problem of estimating the parameters of dynamic models of complex biological systems is becoming increasingly important, the contribution of the present study is focused on the implementation of the metaheuristic FA to solve the finite NLP problem that arises from using a numerical direct approach to locate a global optimal solution of a specific DO problem - the parameter estimation problem on the α-pinene isomerization. A powerful direct method that transcribes the dynamic model parameter estimation problem in a small finite-dimensional optimization problem through the discretization of the decision variables only is used. The remaining part of this paper is organized as follows. In Section 2, we describe the α-pinene isomerization problem and in Section 3 we present the selected methodology for solving the α-pinene problem. Section 4 presents the results of the numerical experiments and comparisons and Section 5 contains the conclusions of the present study.
2 Isomerization of α-pinene The α-pinene isomerization was studied in 1973 by Box, Hunter, MacGregor and Erjavec in [17] and goals the estimation of a set of five velocity parameters p1, . . . , p5of a homogeneous chemical reaction. The reaction scheme for this chemical reaction that describes the thermal isomerization of α-pinene, y1, to dipentene, y2, and allo-ocimen, y3, which in turn produces α- and β-pyronene, y4, and a dimer, y5, is shown in Fig. 1. Fig. 1. α-pinene isomerization mechanism (adapted from [18]). Fuguitt and Hawkins, in [19], observed the concentrations of the reactant and the four products in eight time instants of the interval [0,36420]. After the chemical reaction orders having been defined, the formulation of the mathematical model describing the concentration of each compound over time may be set. In [20], a first order kinetics is assumed and the following system of first order ODEs to describe the dynamics of the concentration of the compounds over time is proposed: y0 1=−(p1+p2)y1 y0 2=p1y1 y0 3=p2y1−(p3+p4)y3+p5y5 y0 4=p3y3 y0 5=p4y3−p5y5 (2) for t∈[0,36420], with the initial conditions y1(0) = 100, y2(0) = 0, y3(0) = 0, y4(0) = 0, y5(0) = 0.(3) The velocity parameters p1, . . . , p5are unknown but can be estimated through the minimization of an objective functional which measures the distance between the experimental observed values and the model predicted values over the entire
time interval. Thus, the formulation of α-pinene isomerization problem is the following: min pJ(p)≡Ztf 0 (y(t)−yobs(t))T(y(t)−yobs(t))dt subject to y0(t) = g(t, y(t), p) ODEs listed in (2) pL≤p≤pU y(0) = (100,0,0,0,0) (4) where y(t) denotes the vector (y1(t), y2(t), y3(t), y4(t), y5(t)) of the state variable functions (predicted by the model), Jis the objective functional to be minimized, pis the vector that contains the parameters to be estimated, also referred to as the vector of the decision variables, yobs contains the experimentally observed values of the state variables, pLand pUrepresent the vectors with the lower and upper bounds on the parameters, respectively, and y(0) is the vector with the initial conditions. This type of parameter estimation problem belongs to a class of DO problems where the decision variables are not time-dependent. 3 Methodology The α-pinene isomerization problem (4) consists of estimating a set of five parameters (p1,...,,p5) in a way that the state variables y1, y2, y3, y4, y5that satisfy the system of ODEs shown in (2), with initial conditions (3), best fit the experimentally observed state values. This dynamic system based parameter estimation problem is solved by a numerical direct method and the resulting finite bound constrained nonlinear programming (BCNLP) problem is solved to global optimality by a metaheuristic, known as FA. In the remaining part of this section, the numerical direct approach is briefly described and the main ideas behind the FA are presented. 3.1 A Direct Sequential Approach To solve the dynamic system based parameter estimation problem, a numerical direct method is used. This type of method discretizes the problem (4) and applies nonlinear programming techniques to the resulting finite-dimensional optimization problem. Methods for solving DO problems like (4) can be classified into indirect methods and direct methods [21]. Indirect methods use the first order necessary conditions from the Pontryagin’s Minimum Principle to reformulate the problem as a two-point boundary value problem. Although this is a widely used technique, the resulting boundary value problems may become difficult to solve specially if the problem contains state variable constraints [22,23]. In direct methods, the optimization (4) is performed directly. Depending on whether the system of ODEs are integrated explicitly or implicitly, two different approaches emerge, the direct sequential approach and the direct simultaneous approach, respectively. In the direct sequential approach, also denoted by singleshooting or control vector parametrization (specially if the decision variables
are time-dependent), the optimization is carried out in the space of the input variables only. Given a set of values for the decision variables, the system of ODEs are accurately integrated (over the entire time interval) using specific numerical integration formulae so that the objective functional can be evaluated. Thus, the differential equations are satisfied at each iteration of the optimization procedure [22,23,24]. This is the main characteristic of the sequential approach, also coined as ‘feasible path’ approach. The strategy may lead to a slow convergence process since the differential equations are solved again and again. On the other hand, the direct simultaneous approach (orthogonal collocation, complete parametrization or full discretization) is computationally less expensive since an approximation to the solution of the ODEs is used instead. The optimization itself is carried out in the full space of discretized inputs and state variables leading to a large-dimensional finite NLP problem, in particular if a fine grid of points is required to obtain high level of integration accuracy. Furthermore, the number of time stages and collocation points as well as the position of the collocation points have to be chosen before using the NLP solver. Thus, efficient NLP solvers are crucial when solving the finite optimization problem. The ODEs are satisfied only at a finite number of time instants in the interval (at the solution of the optimization problem), which is why it is called ‘infeasible path’ approach [21,22]. To summarize, the advantages of the direct sequential approach over the direct simultaneous are highlighted as follows: –the NLP problem is relatively small-dimensional; –an error control mechanism within the numerical integration formula is able to enforce the accuracy of the state variable values; –the ODEs are satisfied at each iteration of the NLP algorithm, although this may lead to a computationally demanding process. It is recognized that a direct sequential framework is easily constructed and may link reliable and efficient ODEs numerical integration and NLP solvers. However, its implementation requires repeated numerical integration of the ODEs. In the context of solving the herein studied optimization problem, the ODEs (model (2)) with the initial conditions (3) are solved by the MatlabTM3 function ode15s. This function implements a variable order method for solving stiff differential equations and is appropriate since the equations include some terms that might lead to dramatic changes and oscillations in the solutions, in a small time interval, when compared to the interval of integration. The direct sequential optimization process can be described schematically as shown in Fig. 2. Therefore, the direct sequential approach transcribes the problem (4) into a small finitedimensional BCNLP problem through the discretization of the decision variables p1, . . . , p5only, while the system of ordinary differential equations is embedded in the NLP problem. The experimental data provided by [19] in the interval t∈[0, tf] consider the set of eight time instants {1230, 3060, 4920, 7800, 10680, 15030, 22620, 3Matlab is a registered trademark of the MathWorks, Inc.
Fig. 2. Direct sequential process. 36420}and the corresponding observed concentrations of the reactant and the four products (yobs 1,i , yobs 2,i , yobs 3,i , yobs 4,i , yobs 5,i ,i= 1,...,8) are shown in Table 1. Thus, based on the information herein presented, the α-pinene isomerization parameter estimation problem is formulated as min pJ(p)≡ 5 X j=1 8 X i=1 yj(ti)−yobs j,i 2 subject to y0(t) = g(t, y(t), p) ODEs listed in (2) pL≤p≤pU y(0) = (100,0,0,0,0) . (5) Table 1. Experimental values of the concentration of the reactant and the four products, for eight time instants. 1230.0 3060.0 4920.0 7800.0 10680.0 15030.0 22620.0 36420.0 yobs 188.35 76.4 65.1 50.4 37.5 25.9 14.0 4.5 yobs 27.3 15.6 23.1 32.9 42.7 49.1 57.4 63.1 yobs 32.3 4.5 5.3 6.0 6.0 5.9 5.1 3.8 yobs 40.4 0.7 1.1 1.5 1.9 2.2 2.6 2.9 yobs 51.75 2.8 5.8 9.3 12.0 17.0 21.0 25.7 3.2 The Firefly Algorithm In order to avoid the convergence to a local solution of a BCNLP problem without providing a good initial approximation, a global optimization (GO) method is usually selected [8,9]. There are deterministic and stochastic methods for GO [25,26]. Stochastic methods have been showing to be robust alternatives to the
deterministic and exact methods. The stochastic alternatives to solve GO problems are usually general-purpose, population-based and are normally referred to as evolutionary algorithms since they are motivated by biological evolution [27]. The genetic algorithm [28,29] is the most known evolutionary strategy, although other swarm intelligence based algorithms [30,31,32,33] are common in the literature. A recent strategy successfully used in biological and engineering applications is the FA [34]. The FA [12] is a stochastic approach for GO that is inspired by the collective behavior of fireflies, specifically in how they attract each other. Several variants of FA have been designed so far, but the main simple rules that define the firefly movement are the following [35]: –all fireflies are unisex, meaning that any firefly will be attracted to other fireflies regardless of their sex; –the brightness of a firefly is determined by the value of the objective function; –attractiveness of a firefly is proportional to their brightness; thus for any two fireflies, the less brighter will move towards the brighter one; the attractiveness is directly proportional to the brightness but decreases with distance. Hereafter, to represent the position of the firefly ithe following vector notation is used pi= (pi 1, . . . , pi 5). Initially, the positions of the population of mfireflies are randomly generated in the search space defined by the bound constraints on the decision variables, as follows pi s=pL s+randi(pU s−pL s),for s= 1,...,5 and i= 1, . . . , m (6) where istands for the firefly iin the population of mfireflies, srepresents the component of the vector, pLand pUare the vectors of lower and upper bounds on the decision variables, and randiis a vector of random numbers from a uniform distribution on the interval [0,1]. The movement of firefly i, in direction to a brighter firefly jis defined by pi=pi+β(pj−pi) + α randi,j (7) where 0 ≤α≤1 is the randomness parameter and randi,j is a vector of uniformly distributed numbers in the range [−1,1], and βis given by: β=β0e−γ||pi−pj||vfor v≥1,(8) being β0the attraction when the distance is zero. The parameter γ∈[0,∞) characterizes the variation of the attractiveness and it is crucial to determine the algorithm convergence speed. When γ→0, attractiveness is constant which means that the brightness of the firefly can be seen from any position of the space. On the other hand, when γ→ ∞ the attractiveness is almost zero and each firefly moves randomly. Note that, in the movement described by (7), the second term is due to the attraction and the third term is due to randomization.
4 Numerical Experiments In this section, the practical performance of the metaheuristic FA for solving the BCNLP problem that emerges from the implementation of the direct sequential procedure to the α-pinene isomerization problem, is analyzed. The mathematical model was coded in the Matlab programming language and the computational application of the direct sequential procedure with the FA was developed in Matlab programming environment. The computational tests were performed on a PC with a 2.7 GHz Core i7-4600U and 8 Gb of memory. 4.1 FA Parameter Tuning First, an experimental study was conducted to tune some of the FA parameters, in the context of the α-pinene problem. The parameter in the randomization term is made to depend on the allowed maximum number of iterations and decreases from an initial value, α, to a near zero value. Four values are tested, ranging from the largest possible to a rather small one, α={1,0.5,0.25,0.05}, being 0.25 the most common value used in the literature. The parameter γis kept fixed over the iterative process. To analyze the effect of the attractiveness in the algorithm, four moderate values have been selected: γ={2,1,0.5,0.25}. Only eight combinations of αand γhave been tested in these experiments. A population of 20 points is used and the problem is solved 10 times with independent randomly generated initial populations. The iterative FA terminates when the absolute difference between the obtained solution, at the current iteration, and the best known optimal solution is below a small tolerance, for instance 1.0e-4, or when a maximum of 500 iterations is reached. The lower and upper bounds for the decision variables are pL i=0 and pU i=5.0e-4 for i= 1,...,5. The best known solution for this problem is p∗ 1= 5.9256e-5, p∗ 2= 2.9632e-5, p∗ 3= 2.0450e-5, p∗ 4= 2.7473e-4, p∗ 5= 4.0073e-5, with the optimum objective function value J(p∗) = 19.872, as reported in [36]. Table 2 contains the results produced by the proposed algorithm and correspond to the best function value, Jbest, the average of the function values, over the 10 runs, Javg, the median of the function values, Jmed, and the average number of iterations, N.Itavg. From the table, it can be concluded that combining α= 0.25 with γ= 1 gives the best results in terms of best, average and median Jvalues, and a lower average number of iterations. The run that produced the best value Jbest = 19.8772 required 294 iterations and 5860 function evaluations. From the table, it is possible to conclude that the two best sets of results correspond to a small value of α, meaning that the randomness characteristic of the FA is somehow controlled, and to a moderate value of γ(0.5 and 1) which promotes the local search ability of the FA. We note that a very small value of α(for example, 0.05) is harmful since the algorithm is not capable of exploring the search space for the region where the global solution lies. Figure 3 shows the evolution of the objective function along the iterations, relative to the best and worst runs for the case where α= 0.25 and γ= 1. For comparative purposes, the evolution of the objective function of the worst run,
31. Kennedy, J., Eberhart, R.C.: Swarm Intelligence. Morgan Kaufmann Publishers Inc., San Francisco, USA (2001) 32. Millonas, M.M.: Swarms, phase transitions, and collective intelligence. In: Langton, C.G. (ed.), Artificial Life III, vol. XVII, pp. 417–445, Addison-Wesley, Reading, MA (1994) 33. Yang, X.-S.: Nature-Inspired Metaheuristic Algorithms. 2nd edition, Luniver Press (2010) 34. Yang, X.-S.: Biology-derived algorithms in engineering optimization. In: Olariu, S., Zomaya, A. Y. (eds.), Handbook of Bioinspired Algorithms and Applications, pp. 589–600, Chapman & Hall (2005) 35. Yang, X.-S.: Firefly algorithm, stochastic test functions and design optimisation. Int. J. Bio-Inspired Computation, 2(2), 78–84 (2010) 36. Egea, J.A., Rodr´ıguez-Fern´andez, M., Banga, J.R., Marti, R.: Scatter search for chemical and bioprocess optimization. J. Glob. Optim. 37(3), 481–503 (2007) 37. Rocha, A.M.A.C., Silva, A., Rocha, J.G.: A new competitive implementation of the electromagnetism-like algorithm for global optimization. In: Gervasi, O. et al. (eds.), ICCSA 2015, Part II, Lect. Notes Comput. Sc., vol. 9156, pp. 506–521, Springer (2015) 38. Dolan, E.D., Mor´e, J.J., Munson, T.S.: Benchmarking Optimization Software with COPS 3.0. Argonne National Laboratory Technical Report ANL/MCS-TM-273 (2004)