-
Notifications
You must be signed in to change notification settings - Fork 15
Model files
Maykon Michel Palma edited this page Sep 30, 2019
·
60 revisions
This document aims at explaining the model file used for each optimization technique. Let's get started!
Since all optimization techniques require the number of agents and decision variables, as well as the number of iterations for convergence, the first line of the model file is the very same one for all techniques implemented in LibOPT.
- Particle Swarm Optimization (PSO). Suppose we have the following model file:
- Particle Swarm Optimization with Adaptive Inertia Weight (AIWPSO). We can use the above example with a minor modification:
- Bat Algorithm (BA). Suppose we have a similar model file:
- Flower Pollination Algorithm (FPA). Suppose we have a similar model file:
- Firefly Algorithm (FA). Suppose we have a similar model file:
- Cuckoo Search (CS). Suppose we have a similar model file:
- Genetic Programming (GP). Suppose we have a similar model file:
- Black Hole Algorithm (BHA). Suppose we have a similar model file:
- Migrating Birds Optimization (MBO). Suppose we have a similar model file:
- Geometric Semantic Genetic Programming (GSGP). Suppose we have a similar model file:
- Artificial Bee Colony (ABC). Suppose we have a similar model file:
- Water Cycle Algorithm (WCA). Suppose we have a similar model file:
- Harmony Search (HS), Improved Harmony Search (IHS) and Parameter-setting-free Harmony Search (PSF-HS). Suppose we have a similar model file:
- Brain Storm Optimization (BSO). Suppose we have the following model file:
- Lion Optimization Algorithm (LOA). Suppose we have the following model file:
- Backtracking Search Optimization Algorithm (BSA). Suppose the following model file:
- Adaptive Differential Evolution with Optional External Archive (JADE). Suppose the following model file:
- Artificial Butterfly Optimization (ABO). Suppose the following model file:
- Cartesian Genetic Programming(CGP). Suppose we have the following model file:
- Differential Evolution (DE). Suppose we have the following model file:
10 2 10 #<n_particles> <dimension> <max_iterations>
1.7 1.7 #<c1> <c2>
0.7 0.0 0.0 #<w> <w_min> <w_max>
-5.12 5.12 #<LB> <UB> x[0]
-5.12 5.12 #<LB> <UB> x[1]The next two lines configure PSO parameters c1 and c2, and the inertia weight w. Since LibOPT implements the naïve PSO, it does not employ adaptive inertia weight. Therefore, there is no need to set w_min and w_max.
The last two lines aim at setting up the range of each decision variable. Since we have two dimensions in the example, each line stands for one variable, say x[0] and later x[1].
10 2 10 #<n_particles> <dimension> <max_iterations>
1.7 1.7 #<c1> <c2>
0.7 0.1 0.9 #<w> <w_min> <w_max>
-5.12 5.12 #<LB> <UB> x[0]
-5.12 5.12 #<LB> <UB> x[1]10 2 10 #<n_particles> <dimension> <max_iterations>
0.0 2.0 #<f_min> <fmax>
0.5 0.5 #<A> <r>
-5.12 5.12 #<LB> <UB> x[0]
-5.12 5.12 #<LB> <UB> x[1]10 2 10 #<n_particles> <dimension> <max_iterations>
1.5 0.3 #<beta> <p>
-5.12 5.12 #<LB> <UB> x[0]
-5.12 5.12 #<LB> <UB> x[1]10 2 10 #<n_particles> <dimension> <max_iterations>
0.2 1 1 #<alpha> <beta_0> <gamma>
-5.12 5.12 #<LB> <UB> x[0]
-5.12 5.12 #<LB> <UB> x[1]10 2 10 #<n_particles> <dimension> <max_iterations>
1.5 0.3 0.2 #<beta> <p> <alpha>
-5.12 5.12 #<LB> <UB> x[0]
-5.12 5.12 #<LB> <UB> x[1]10 2 7 #<n_trees> <dimension> <max_iterations>
0.3 0.3 0.4 #<probability_of_reproduction> <probability_of_mutation> <probability_of_crossover>
2 5 #<minimum_depth_tree> <maximum_depth_tree>
SUM MUL DIV SUB #function nodes
PARAM CONST #terminal nodes
1 1 #<integer(binary)-optimization problem> <the variables have different ranges>
-5.0 5.0 #<LB> <UB> x[0]
-7.0 7.0 #<LB> <UB> x[1]Regarding the function nodes, there is a need to set what functions are going to be used to build up the trees. For now, we have the following possible functions: SUM, SUB, MUL, DIV, ABS, SQRT, LOG, EXP, AND, OR, XOR, NOT. However, it is possible to add more functions.
For the terminals, it is possible to use a parameter terminal (PARAM) or a constant (CONST) terminal. If you chose to use CONST in this line, the library generates 1,000 constant values automatically to enrich the diversity of the trees. If you want to change the number of constants, please refer to the variable N_CONSTANTS in include/opt.h. If you have an optimization problem with 2 decision variables, for instance, the CONST flag will generate two-dimensional constants, being each one within the range specified below for each decision variable. Therefore, do not worry about the ranges of the constants generated by the library. We take care of that for you!
Considering the next line, if you have an integer-valued optimization problem, you must set it to 1. Hence, for a real-valued problem, you just need to set this value to 0. If your decision variables fall into a different range, you must set the next parameter to 1. Conversely, if they are in the same range, you just set it to 0, and the library considers the very same range for all decision variables. This tool is useful when you have hundreds of decision variables, and we know you do not want to set all these ranges, for sure!
Finally, just set the lower and upper bound of your decision variables, and you are ready to go!
10 2 10 #<n_particles> <dimension> <max_iterations>
-5.12 5.12 #<LB> <UB> x[0]
-5.12 5.12 #<LB> <UB> x[1]10 2 10 #<n_particles> <dimension> <max_iterations>
10 8 10 #<k> <X> <M>
-4.5 4.5 #<LB> <UB> x[0]
-4.5 4.5 #<LB> <UB> x[1]10 2 7 #<n_trees> <dimension> <max_iterations>
0.3 0.3 0.4 #<probability_of_reproduction> <probability_of_mutation> <probability_of_crossover>
2 5 #<minimum_depth_tree> <maximum_depth_tree>
AND OR XOR NOT #function nodes
PARAM CONST #terminal nodes
1 1 #<integer(binary)-optimization problem> <the variables have different ranges>
-5.0 5.0 #<LB> <UB> x[0]
-7.0 7.0 #<LB> <UB> x[1]10 2 10 #<n_particles> <dimension> <max_iterations>
10 #<number of trial limits>
-5.12 5.12 #<LB> <UB> x[0]
-5.12 5.12 #<LB> <UB> x[1]10 2 10 # <n_particles> <dimension> <max_iterations>
1.5 0.8 # <nsr> <dmax>
-30 30 # <LB> <UB> x[0]
-30 30 # <LB> <UB> x[1]10 2 10 # <n_particles> <dimension> <max_iterations>
0.7 # <HMCR>
0.7 0 1 # <PAR> <PAR_min> <PAR_max>
10 0 20 # <bw> <bw_min> <bw_max>
-30 30 # <LB> <UB> x[0]
-30 30 # <LB> <UB> x[1]10 2 10 #<n_particles> <dimension> <max_iterations>
3 # <k>
0.3 0.4 0.3 # <p_one_cluster> <p_one_center> <p_two_centers>
-5.12 5.12 # <LB> <UB> x[0]
-5.12 5.12 # <LB> <UB> x[1]The next two lines configure BSO parameters: k (i.e., the number of clusters), p_one_cluster (i.e., the probability of selecting a cluster center), p_one_center (i.e., the probability of randomly selecting an idea from a probabilistic selected cluster), and p_two_centers (i.e, the probability of of creating a random combination of two probabilistic selected clusters).
10 2 10 # <n_particles> <dimension> <max_iterations>
0.8 0.2 0.2 0.3 0.2 0.4 4 # <sex rate> <percent of nomad lions> <roaming percent> <mating probability> <mutate probability> <immigrate rate> <number of prides>
-5.12 5.12 # <LB> <UB> x[0]
-5.12 5.12 # <LB> <UB> x[1]The last two lines aim at setting up the range of each decision variable. Since we have two dimensions in the example, each line stands for one variable, say x[0] and later x[1].
10 2 10 # <n_particles> <dimension> <max_iterations>
1.0 3 # <mix_rate> <F>
-30 30 # <LB> <UB> x[0]
-30 30 # <LB> <UB> x[1]10 2 10 # <n_particles> <dimension> <max_iterations>
0.1 0.05 # <c> <p>
-30 30 # <LB> <UB> x[0]
-30 30 # <LB> <UB> x[1]10 2 10 # <n_butterflies> <dimension> <max_iterations>
0.2 0.05 # <ratio_e> <step_e>
-30 30 # <LB> <UB> x[0]
-30 30 # <LB> <UB> x[1]10 2 10 # <n_particles> <dimension> <max_iterations>
5 100 1 500 # <n_rows> <n_collumns> <levels_back> <n_input_values>
0.3 # <probability_of_mutation>
-5.12 5.12 # <LB> <UB> x[0]
-5.12 5.12 # <LB> <UB> x[1]The last two lines aim at setting up the range of each decision variable. Since we have two dimensions in the example, each line stands for one variable, say x[0] and later x[1].
10 2 10 # <n_particles> <dimension> <max_iterations>
0.8 0.7 # <mutation_factor> <cross_probability>
-5.12 5.12 # <LB> <UB> x[0]
-5.12 5.12 # <LB> <UB> x[1]The next line configure DE parameters mutation_factor and cross_probability.
The last two lines aim at setting up the range of each decision variable. Since we have two dimensions in the example, each line stands for one variable, say x[0] and later x[1].