在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):smkalami/ypea开源软件地址(OpenSource Url):https://github.com/smkalami/ypea开源编程语言(OpenSource Language):HTML 56.0%开源软件介绍(OpenSource Introduction):Yarpiz Evolutionary Algorithms (YPEA) Toolbox for MATLABYPEA for MATLAB is a general-purpose toolbox to define and solve optimization problems using Evolutionary Algorithms (EAs) and Metaheuristics. To use this toolbox, you just need to define your optimization problem and then, give the problem to one of the algorithms provided by YPEA, to get it solved. List of Provided AlgorithmsCurrently, YPEA supports these algorithms to solve optimization problems. The list is sorted in alphabetic order.
InstallationA MATLAB toolbox package file (*.mltbx) is available in the dist folder. You can right-click on this file inside MATLAB, and select the Install option to get it installed on your machine. This is the recommended way of installing YEPA. However, if you prefer, the source code for YPEA is available in src folder, and you can download it and add the ypea folder to the path of your MATLAB installation. The toolbox has its own documentation, which is accessible via the MATLAB documentation center. You may find it under the Supplemental Software section of MATLAB documentation center. To access the documentation from the command line, type doc ypea. The documentation for the toolbox will be shown. How YPEA Works?The main steps to set up your problem and solve it using YPEA are listed below:
A Classic ExampleProblem DefinitionAssume that we would like to find 20 real numbers in the range [-10,10], which minimize the value of the well-known sphere function, defined by: To define this problem, we run these commands in MATLAB: problem = ypea_problem();
problem.type = 'min';
problem.vars = ypea_var('x', 'real', 'size', 20, 'lower_bound', -10, 'upper_bound', 10);
sphere = ypea_test_function('sphere');
problem.obj_func = @(sol) sphere(sol.x); Particle Swarm Optimization (PSO)Now, we are ready to use any of the algorithms available in YPEA to solve the problem we just defined. Here we are going to use Particle Swarm Optimization (PSO). Let's create an instance of PSO ( pso = ypea_pso();
pso.max_iter = 100;
pso.pop_size = 100;
pso.w = 0.5;
pso.wdamp = 1;
pso.c1 = 1;
pso.c2 = 2; One may use so-called Constriction Coefficients for PSO, by running these commands: phi1 = 2.05;
phi2 = 2.05;
pso.use_constriction_coeffs(phi1, phi2); Now, we are ready to get our problem solved. Let's call the pso_best_sol = pso.solve(problem); The best solution found by PSO is accessible via: pso_best_sol.solution.x Differential Evolution (DE)It is possible to pass the problem to another algorithm to get it solved. For example, if we would like to use Differential Evolution (DE), we can create an instance of DE (
de = ypea_de('DE/best/2/bin');
de.max_iter = 1000;
de.pop_size = 20;
de.beta_min = 0.1;
de.beta_max = 0.9;
de.crossover_prob = 0.1; By calling the de_best_sol = de.solve(problem); The best solution found by Differential Evolution is given by: de_best_sol.solution.x Types of Decision VariablesOne of the difficulties in modeling and defining optimization problems is dealing with different kinds of decision variables. In YPEA, there several types of decision variables are supported and make the problem definition much easier. Supported variable types in YPEA, are listed below:
All of these variable types are encoded to real values in the range of [0,1]. Hence, all of the algorithms implemented in YPEA can be used to solve any defined problem, interchangeably. Citing YPEAYPEA Toolbox for MATLAB is open-source and free to use. If you are going to use the toolbox in your research projects and you want to cite that, please use the following format. Mostapha Kalami Heris, Yarpiz Evolutionary Algorithms Toolbox for MATLAB (YPEA), Yarpiz, 2020. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论