1.软件版本

matlab2013b

2.本算法理论知识

公式中，表示的是新建线路的集合；表示的是所有线路的集合；W表示的是总的规划费用；表示的是资金回收系数；表示的是工程固定运行费率；

而在一个中长期电网规划中，需要考虑每一年的成本，那么电网规划总成本由新建线路总成本以及历年运行费用之和，那么公式中的目标函数可以改写为：

公式3.3中，X表示的是整个新建线路的总成本，相当于公式3.1的第一项；

3.部分核心代码

rng(1); %编号 NO = [1,2,3,4,5,6,7,8,9,10,11,12,13,14,15]'; %线路首端号 START =
[1,1,1,1,1,2,2,2,2,3,3,3,4,4,5]'; %线路末端号 ENDS =
[2,3,4,5,6,3,4,5,6,4,5,6,5,6,6]'; %支路电抗 ZDK =
[40,50,60,20,10,20,20,40,20,20,30,48,30,20,10]'; %容量限制 Vmax =
[100,100,80,100,70,100,100,100,100,82,100,100,75,100,78]'; %线路长度 Len =
[40,38,60,20,68,20,40,31,30,59,20,48,63,30,61]'; %电抗 DZ =
[0.1,0.09,0.15,0.05,0.17,0.05,0.1,0.08,0.08,0.15,0.05,0.12,0.16,0.08,0.15]';
%电抗 DK = [0.4,0.38,0.6,0.2,0.68,0.2,0.4,0.31,0.3,0.59,0.2,0.48,0.63,0.3,0.61]';
tmps =[NO,START,ENDS,ZDK,Vmax,Len,DZ,DK]; %整理 IEEE6
=[tmps([1,3,4,6,7,11],:);tmps([9,11,14],:)]; %初始线路 Nline =[1,1,1,1,1,1,0,0,0];
%初始邻接矩阵 Connect=[0 1 0 1 1 0; 1 0 1 1 0 0; 0 1 0 0 1 0; 1 1 0 0 0 0; 1 0 1 0 0
0; 0 0 0 0 0 0]; %各节点注入功率 P = [-30,-240,125,-160,-240]'; %节点数 N = 6; tic;
%定义遗传算法参数 %种群规模 NIND = 1000; %迭代次数 MAXGEN = 200; Price = zeros(MAXGEN,1); %基向量
BaseV = 5*ones(1,length(Nline)); Chrom = crtbp(20,BaseV); gen = 0; %初始种群函数值
ObjV = func_obj(Chrom,IEEE6,Nline,Connect,P,N); df = 1000; while gen< MAXGEN
gen if gen == 0 Pe = 0.92; else Pe = 1/(1+exp(-df/10)); end gen = gen+1; FitnV
= ranking(ObjV); %选择 SelCh = select('sus',Chrom,FitnV); SelCh =
recombin('xovmp',SelCh,Pe); %重组 f =
[zeros(1,length(Nline));5*ones(1,length(Nline))]; %变异 SelCh = mutbga(SelCh,f);
SelCh = fix(SelCh); ObjV2 = func_obj(SelCh,IEEE6,Nline,Connect,P,N);
[Chrom,ObjV] = reins(Chrom,SelCh,1,1,ObjV,ObjV2); indx = find(isnan(ObjV) ==
1); ObjV3 = ObjV; ObjV3(indx) = []; Price(gen) = min(ObjV3); if gen > 1 df =
abs(Price(gen) - Price(gen-1)); end end [Y,I] = min(ObjV); %规划 Net_new =
Chrom(I,:); Net_new Y figure; plot(Price,'b','linewidth',2); grid on
xlabel('Iteration times'); ylabel('Total cost'); toc; save R2.mat Price
4.仿真结论

5.参考文献

[01]Valenzuela  Jorge,  Wang  Jianhui.  A  probabilistic  model  for
assessing  the  long-term economics of wind energy. Electric power systems
research, 2011, 81(4): 853~861.

[02]C.W.Fu, T. T.Nguyen. Models for Long-Term Energy Forecasting[J].IEEE
Power  Engineering  Society  General  Meeting,2003,13-17  July, Volume
1:235.239.

[03]顾金弟,吴旭鹏等。输电网规划方案的可靠性评估研究[J].华东电力,2010,38(12):184-187.

A06-48

6.完整源码获得方式

GitHub

Gitee