Optimization of load of structure in order to obtain desired shape of letter T
(formulation for maximization)
GRADE algorithm extended by CERAF strategy
(formulation for maximization)

### Stochastic optimization tool

• GRADE algorithm is a real-coded stochastic optimization algorithm combining principles of genetic algorithms and differential evolution
• It is similar to elder SADE algorithm
• It works with population of solutions - real-coded vectors, size of population is given as Dim × pop_rate, where Dim is dimension of problem (number of optimized variables) and pop_rate is parameter of algorithm
• The pseudo code of the algorithm is shown in following table:

 1 Generate_initial_population(); 2 for ( i=0; i

• It uses 3 genetic operators: mutation, crossing and selection. Mutation and crossing are applied to actual population to create the same number of offsprings. After their execution, the population size is doubled. Last operator selection is applied to select new population from parents and offsprings. New population has than the initial population size.
• Mutation operator is applied to all members of parental population. For each parent P, random number p is generated from the unit interval. If this number is smaller than radioactivity, than this parent P is used to create one offspring O by mutation. In such a case, new random point RP is generated inside of given domain and new offspring O is created on a random position on line connecting the parent P and the random point RP. The pseudo code of this operator is shown in following table:

 1 void MUTATE (void){ 2 for ( i=0; i

This operator creates each time different number of offsprings n_Offsprings, but in average this number should converge to population_size * radioactivity. radioactivity is control parameter of GRADE algorithm defining the part of offsprings created by mutation.
• Crossing operator is designated to create such a number of new offsprings, that total number of offsprings n_Offsprings will be the same as parents n_Parents (population will be doubled). To create an offspring, two members P1 and P2 of parental population are randomly chosen. Then the vector of their difference is computed, multiplied by cross_rate and added to the better one bettween P1 and P2. cross_rate is each time randomly generated number from the interval <0;cross_limit>. cross_limit is another control parameter of GRADE algorithm The corresponding pseudo code is shown in next table:

 1 void CROSS (void){ 2 while ( n_Offsprings

There are two possible scenarios of creating new offspring by crossing depending on which parent bettween P1 and P2 is better:

 P1 is better than P2 P1 is worse than P2

• Operator selection should select new population from parents and offsprings or more precisely, it eliminate chosen offsprings and parents, until the complete population has its initial size. Each time one member should be rejected, two members are randomly chosen for tournament and the worse of them is discarded or in other words:

 1 void SELECT (void){ 2 n_Pop = n_Offsprings + n_Parents; 3 while (n_Pop > n_initPop) { 4 P1 = random_member; 5 P2 = random_member; 6 Pworse = worse_of(P1,P2); 7 discard_from_population(Pworse); 8 n_Pop--; }}}

This inverse tournament has two advantages. It ensures that the best member will survive to next generation even it won't be chosen for tournament. Even very bad member has a possibility to survive and certain diversity of population remains.
• To conclude the algorithm description, let's sumarize algorithm's control parameters:

parameterdescriptionrecommended value
pop_ratecontrol the size of population10
radioactivitycontrol the number of offsprings created by mutation0.2
cross_limitcontrol the distance of offsprings from its better parent created by crossing1.0

### Published applications

• Comparison with diffuse approximation method in optimal control and optimal desing of structures undergoing finite rotations and elastic deformations is presented in paper [1] and in my Master thesis [2] in french.
• Comparison with elder SADE algorithm, GRBFN strategy and combination of GRADE algorithm with CERAF strategy on a set of twenty functions (ANDRE) is presented in my Ph.D. thesis [3]
• Application to neural network training is presented in [4]
• Combination with Radial Basis Function Network (GRBFN)to damage model parameters identification is presented in [5]
• Application to inverse analysis of heat and moisture transport in building materials is presented in Master thesis of Jan Kočí [6] in czech

### C++ implementation

• it is considered for maximization of functions
• C++ implementation of GRADE algorithm consists basicaly of 3 following files:
• grade.h(1.28kB, version 0.0.1, released 19 Mar 2009) - definition of GRADE class
grade.cpp(5.22kB, version 0.0.1, released 19 Mar 2009) - definition of GRADE class functions
vilog.cpp(1.14kB, version 0.0.1, released 19 Mar 2009) - definition of some function for generating outputs
• the algorithm is working with object of general objective function defined in function.h(1.13kB, version 0.0.1, released 16 Mar 2009) - any particular objective function to be optimized should be then defined as an offspring of this class, for examples:
Branin.h(304B, version 0.0.1, released 16 Mar 2009)
Branin.cpp(1.16kB, version 0.0.1, released 16 Mar 2009)
• this implementation uses also some mathematical functions and definitions given in :
general.h(545B, version 0.0.1, released 16 Mar 2009)
general.cpp(828B, version 0.0.1, released 16 Mar 2009)
• to download all above mentioned files together with main function and makefile: grade-cpp.zip (6.27kB, released 19 Mar 2009)

### Matlab implementation

• this implementation is developped for Matlab 7.6.0 and it uses randsample function from Statistics Toolbox
• it is considered for minimization of functions
• matlab implementation of GRADE algorithm consists of 4 following files:
• GRADEoptimization.m(499B, version 0.0.2, released 6 Feb 2009) - main function of the algorithm
GRADEinit.m(2.39kB, version 0.0.3, released 23 Mar 2009) - initialization script of the algorithm
GRADEnewpop.m(1kB, version 0.0.2, released 6 Feb 2009) - script generating new population using mutation and cross operators
GRADEselect.m(1.17kB, version 0.0.3, released 23 Mar 2009) - script evaluationg new solutions and selecting new popution
• to use matlab version of GRADE algorithm, use must define 3 matlab files specifying your function to be minimized, for example like following files defining Branin function:
• Branin.m(110B, version 0.0.2, released 6 Feb 2009) - definition of cost function
Braninconfig.m(1.03kB, version 0.0.2, released 6 Feb 2009) - configuration script specifying some cost function properties
Branineval.m(378B, version 0.0.2, released 6 Feb 2009) - script defining what should happend when new better solution is found, e.g. print or save the solution
• an example of using optimization by GRADE algorithm in Matlab is shown in file example.m(197B, version 0.0.2, released 10 Feb 2009)