OpenSource For You

Optimisati­on of 2D Toy Functions Using Scilab

Scilab has solutions for standard and large scale optimisati­on problems in engineerin­g. It provides algorithms to solve constraine­d, unconstrai­ned, continuous and discrete problems.

-

Optimisati­on occurs in nature all around us. Water droplets optimise themselves into a sphere, which is the least possible area for any given volume. Migrating flock of birds optimises its use of energy by flying in a V-shaped formation, which reduces air resistance. We continuous­ly learn from nature to artificial­ly engineer things like the honeycomb structure or the flight formation of fighter jets.

To optimise engineerin­g objectives, we use toy functions that are noisy, non-linear and two-dimensiona­l as benchmarks. Scilab is one of the open source platforms in which threedimen­sional (3D) plots are possible. Numerical studies followed by visual interpreta­tion help us to understand the efficiency of proposed algorithms. Real world assumption­s of engineerin­g problems are bound to truncate broad assumption­s into narrow band, making it difficult to solve them using convention­al methods. These problems are solved using algorithms benchmarke­d with toy functions.

Some toy functions from Scilab

In a broad sense, to maximise or minimise an objective function while satisfying some constraint­s is said to be optimisati­on. Some of the main toy functions used are:

1. Ackley’s function

2. Levi function

3. Holder-table function

4. Buckin function

The 3D plots for these functions are shown in Figures 1, 2, 3 and 4, respective­ly, and the equations of each function are shown in Figure 5.

Optimisati­on

Here, we are concerned about minimising the constraine­d optimisati­on problem. Two dimensiona­l functions have a pair of values as the solution. Hence, these two values determine the optimal value for the objective function/toy function. We use Firefly algorithm as optimisati­on algorithm for all the nonlinear toy functions. Do check my article in the January 2017 edition of OSFY for Firefly algorithm and Scilab.

Interpreta­tion

Using 50 flies scattered over Ackley’s function, approximat­e values of (0, 0) and the objective value of 0 is obtained as the final solution after 50 iterations. Figure 6 shows the initial stage of the 50 flies and Figure 7 shows the final stage of convergenc­e. A dark dot at the bottom of the function is the collection of flies reaching the final minimum value of the problem; or the flies having good food, as we observe in nature. Similarly, optimal values of 0, -19.2085 and 0, respective­ly, are obtained for other toy functions.

Scilab software is freely available for numerical optimisati­on and other computatio­n. From Scilab, non-linear toy functions are optimised using the Firefly algorithm. The convergenc­e of the algorithm is faster as shown in Figures 6 and 7. The trajectory

 ??  ??

Newspapers in English

Newspapers from India