欢迎光临散文网 会员登陆 & 注册

【优化调度】基于粒子群算法求解水电厂优化调度购电最小问题含Matlab源码

2022-04-02 15:56 作者:Matlab工程师  | 我要投稿

 1 简介

以洪家渡水电站为例,探讨了粒子群算法在水电站中长期优化调度的应用方法及效果。实例计算结果表明,该算法可以求解复杂约束条件的非线性水库优化调度,精度高、收敛速度快,为解决水电站中长期优化调度问题提供了一种有效的方法。

2 部分代码

function pop=renew(pop,PBEST,GBEST)global popsizeglobal 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 PGminPGmin=[0.2 0.15 0.1 0.1 0.12];global PGmax PGmax=[1.0 0.8 0.55 0.8 0.6];global c1global c2global wcmaxglobal wcminglobal generationglobal maxgenerationxmin=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     endendpop;

3 仿真结果

4 参考文献

[1]芮钧, 陈守伦. MATLAB粒子群算法工具箱求解水电站优化调度问题[J]. 中国农村水利水电, 2009(1):3.

博主简介:擅长智能优化算法、神经网络预测、信号处理、元胞自动机、图像处理、路径规划、无人机等多种领域的Matlab仿真,相关matlab代码问题可私信交流。

部分理论引用网络文献,若有侵权联系博主删除。


【优化调度】基于粒子群算法求解水电厂优化调度购电最小问题含Matlab源码的评论 (共 条)

分享到微博请遵守国家法律