【优化调度】基于粒子群算法求解水电厂优化调度购电最小问题含Matlab源码
【优化调度】基于粒子群算法求解水电厂优化调度购电最小问题含Matlab源码
TT_Matlab
博主简介:擅长智能优化算法、神经网络预测、信号处理、元胞自动机、图像处理、路径规划、无人机等多种领域的Matlab仿真,完整matlab代码或者程序定制加qq1575304183。
1 简介
以洪家渡水电站为例,探讨了粒子群算法在水电站中长期优化调度的应用方法及效果。实例计算结果表明,该算法可以求解复杂约束条件的非线性水库优化调度,精度高、收敛速度快,为解决水电站中长期优化调度问题提供了一种有效的方法。
2 部分代码
function
pop=renew(pop,PBEST,GBEST)
global
popsize
global
dimsize
%
global QCmin
%
global QCmax
%
global KTmin
%
global KTmax
%
global PGmin;
%
PGmin=[0.2 0.15 0.1 0.1 0.12];
%
global PGmax;
%
PGmax=[0.8 0.5 0.35 0.3 0.4];
global
PGmin
PGmin
=
[0.2 0.15 0.1 0.1 0.12];
global
PGmax
PGmax
=
[1.0 0.8 0.55 0.8 0.6];
global
c1
global
c2
global
wcmax
global
wcmin
global
generation
global
maxgeneration
xmin
=
PGmin;
xmax
=
PGmax;
speedmin
=
(PGmin-PGmax)*0.1;
speedmax
=
(PGmax-PGmin)*0.2;
for
t=1:popsize %%%每个粒子逐个进化
for
dimIndex =1:dimsize %%每个参数进行进化
w
=
wcmax-(wcmax-wcmin)*(generation/maxgeneration);
sub1
=
PBEST(t,dimIndex)-pop(t,dimIndex);
sub2
=
GBEST(1,dimIndex)-pop(t,dimIndex);
tempV
=
w*pop(t,dimsize+dimIndex)+c1*unifrnd(0,1)*sub1 + c2*unifrnd(0, 1)*sub2; %%速度进化
if
tempV>speedmax(dimIndex)
pop(t,dimsize+dimIndex)
=
speedmax(dimIndex);
elseif
tempV<speedmin(dimIndex)
pop(t,dimsize+dimIndex)
=
speedmin(dimIndex);
else
pop(t,dimsize+dimIndex)
=
tempV;
end
tempV;
tempposition
=
pop(t,dimIndex) + pop(t,dimsize+dimIndex); %%位置进化
if
tempposition>xmax(dimIndex)
pop(t,dimIndex)
=
xmax(dimIndex);
elseif
tempposition<xmin(dimIndex)
pop(t,dimIndex)
=
xmin(dimIndex);
else
pop(t,dimIndex)
=
tempposition;
end
end
end
pop;
3 仿真结果
4 参考文献
[1]芮钧, 陈守伦. MATLAB粒子群算法工具箱求解水电站优化调度问题[J]. 中国农村水利水电, 2009(1):3.
博主简介:擅长智能优化算法、神经网络预测、信号处理、元胞自动机、图像处理、路径规划、无人机等多种领域的Matlab仿真,相关matlab代码问题可私信交流。
部分理论引用网络文献,若有侵权联系博主删除。
-
2023年血糖新标准公布,不是3.9-6.1,快来看看你的血糖正常吗? 2023-02-07
-
2023年各省最新电价一览!8省中午执行谷段电价! 2023-01-03
-
GB 55009-2021《燃气工程项目规范》(含条文说明),2022年1月1日起实施 2021-11-07
-
PPT导出高分辨率图片的四种方法 2022-09-22
-
2023年最新!国家电网27家省级电力公司负责人大盘点 2023-03-14
-
全国消防救援总队主官及简历(2023.2) 2023-02-10
-
盘点 l 中国石油大庆油田现任领导班子 2023-02-28
-
我们的前辈!历届全国工程勘察设计大师完整名单! 2022-11-18
-
关于某送变电公司“4·22”人身死亡事故的快报 2022-04-26
