当前位置:网站首页>Matlab simulation of solving multi-objective optimal value based on PSO optimization
Matlab simulation of solving multi-objective optimal value based on PSO optimization
2022-07-23 15:04:00 【I love c programming】
Catalog
3. Preview of some simulation drawings
4. Source code acquisition method
1. Algorithm description
stay PSO in , Each particle in a group is represented as a vector . In the context of portfolio optimization , This is a weight vector , Represents the allocated capital of each asset . The vector is transformed into a position in the multidimensional search space . Each particle will also remember its best historical position . about PSO Every iteration of , Find the global optimal location . This is the best position in the group . Once the global optimal location is found , Each particle will be closer to its local optimal position and global optimal position . When executed in multiple iterations , The process produces a good solution to the problem , Because the particles converge on the near optimal solution .
Ray Wait for someone to pass PSO Algorithm and Pareto The sorting mechanism wants to be combined . use Pareto Sorting method to select a group of elite solutions , The global optimal particle is selected by roulette . In actual operation , Only a few individuals have a high probability of selection , The population diversity is not maintained well .Coello Wait in PSO In the algorithm, the best position of the group is selected by introducing Pareto Competition mechanism and particle knowledge base . This knowledge base is used to store the flight experience of particles after each flight cycle , The knowledge base is updated by considering a geography based system , The system is defined in terms of the objective function value of each particle . This knowledge base is used by particles to identify a leader who guides the search . At the same time, the non inferior solution is determined by comparing the candidate individuals with the comparison set randomly selected from the population , Therefore, the parameters of the comparison set have a crucial impact on the success of the algorithm . If the parameter is too large , Is prone to premature convergence , And the parameter is too small , Then the number of non inferior solutions selected in the population may be too small .
2. Partial procedure
for it=1:MaxIt
for i=1:nPop
rep_h=SelectLeader(rep,beta);
particle(i).Velocity=w*particle(i).Velocity ...
+c1*rand*(particle(i).Best.Position - particle(i).Position) ...
+c2*rand*(rep_h.Position - particle(i).Position);
particle(i).Velocity=min(max(particle(i).Velocity,-VelMax),+VelMax);
particle(i).Position=particle(i).Position + particle(i).Velocity;
flag=(particle(i).Position<VarMin | particle(i).Position>VarMax);
particle(i).Velocity(flag)=-particle(i).Velocity(flag);
particle(i).Position=min(max(particle(i).Position,VarMin),VarMax);
particle(i).Cost=CostFunction(particle(i).Position);
if Dominates(particle(i),particle(i).Best)
particle(i).Best.Position=particle(i).Position;
particle(i).Best.Cost=particle(i).Cost;
elseif ~Dominates(particle(i).Best,particle(i))
if rand<0.5
particle(i).Best.Position=particle(i).Position;
particle(i).Best.Cost=particle(i).Cost;
end
end
end
particle=DetermineDomination(particle);
nd_particle=GetNonDominatedParticles(particle);
rep=[rep
nd_particle];
rep=DetermineDomination(rep);
rep=GetNonDominatedParticles(rep);
for i=1:numel(rep)
[rep(i).GridIndex rep(i).GridSubIndex]=GetGridIndex(rep(i),G);
end
if numel(rep)>nRep
EXTRA=numel(rep)-nRep;
rep=DeleteFromRep(rep,EXTRA,gamma);
rep_costs=GetCosts(rep);
G=CreateHypercubes(rep_costs,nGrid,alpha);
end
disp(['Iteration ' num2str(it) ': Number of Repository Particles = ' num2str(numel(rep))]);
w=w*wdamp;
end3. Preview of some simulation drawings



4. Source code acquisition method
Click the download link :
Access method 2:
Blog resource item , Search for resources with the same name as blog .
Access method 3:
If the download link fails , Blogger wechat contact .
A_055
边栏推荐
- 多项式承诺Polynomial commitment方案汇总
- 21 - 二叉树的垂直遍历
- Linux scheduled database backup script
- The pit trodden by real people tells you to avoid the 10 mistakes often made in automated testing
- 452. 用最少数量的箭引爆气球
- NVIDIA vid2vid论文复现
- 初识C语言函数
- Advanced operation and maintenance 03
- 头部姿态估计原理及可视化_loveliuzz的博客-程序员宅基地_头部姿态估计
- 338. Bit count
猜你喜欢
![[record of question brushing] 19. Delete the penultimate node of the linked list](/img/be/7e81e9376cb04566d669db4c606309.png)
[record of question brushing] 19. Delete the penultimate node of the linked list

Redis布隆过滤器

OpenHarmony南向学习笔记——Hi3861+HC-SR04超声波检测

supervisord安装使用

How to realize 485 wireless communication between multiple sensors and Siemens PLC?

百度工程师眼中的云原生可观测性追踪技术

Activity的启动流程

@Feignclient detailed tutorial (illustration)

AVX指令集加速矩阵乘法

Zhongwang CAD professional 2022 software installation package download and installation tutorial
随机推荐
Supervisor installation and use
初识C语言函数
Kettle实现共享数据库连接及插入更新组件实例
基于nextcloud构建个人网盘
Leetcode: 17. letter combination of phone number
直播课堂系统03-model类及实体
易基因|靶基因DNA甲基化测序(Target-BS)
[record of question brushing] 19. Delete the penultimate node of the linked list
@FeignClient使用詳細教程(圖解)
Redis | 非常重要的中间件
[untitled]
Postgresql快照优化Globalvis新体系分析(性能大幅增强)
Map structure stored in the room of jetpack series
Simulation of BOC modulation signal acquisition based on MATLAB
Activity的启动流程
Opencv calculation outsourcing rectangle
Advanced operation and maintenance 02
用FFT加速特殊矩阵的矩阵向量乘运算
LeetCode-227-基本计算器||
Regular verification of ID number