简介
本程序参考文献《基于改进二进制粒子群算法的机组组合问题》,是一篇硕士学位论文,程序中算例丰富,注释清晰,干货满满,下面对论文和程序作简要介绍。
文中结果
程序结果
部分程序
%%%Swarm size
POPN=SWARM_SZ; %%%POP_N provided by swarm_generator.m
%%%Particles in the swarm
swarm=population;
%%%%Parameters for the BPSO
VMAX=2;VMIN=-2;
WMAX=0.9;WMIN=0.4;
C1=2;C2=2;
v=zeros(POPN,N*T); %%%Velocity vector
m=zeros(POPN,N*T); %%%Mapping function vector
x=zeros(POPN,N*T); %%%Position vector
MAX_K=100;
[F,idx_gb]=sort(total_COST);conv_beh=zeros(1,MAX_K)
%%%Inertia weight update
w=WMAX-i*((WMAX-WMIN)/MAX_K);
x=swarm; %%% Initial position is the population by swarm generator
pbest=swarm; %%% Previous best position is initial position
gbest=swarm(idx_gb(1),:); %%%Global best position in current swar
fit=1./F;
pbest_v=fit;
gbest_v=fit(idx_gb(1));
v(j,k)=w*v(j,k)+C1*rand*(pbest(j,k)-x(j,k))+C2*rand*(gbest(k)-x(j,k));
%%%Optimal Schedule
OPT_SOL=reshape(gbest,N,T)';
%%%Economic Dispatch
% %Ramping rates and POZ neglected
[P_SOL_OPT,P_srv_opt,P_COST_opt,tot_gen_COST_opt,itt_opt] = F_LIM_ED(OPT_SOL',T,I,P_D,OPTS);
%Ramping Rate and POZ constraints included
% [P_SOL_OPT,P_srv_opt,P_COST_opt,tot_gen_COST_opt,itt_opt,~] = F_LIM_ED_RR(OPT_SOL',T,I,P_D,IDX_INS,OPTS,POZ);
%%%Startup-cost
[su_COST_opt,tot_su_COST_opt,~] = SU_COST(N,OPT_SOL',init_status,SU_H,SU_C,CSH,MUT,MDT);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%Plotting the results%%%%%%%%%%%%%%%%%%%%%%%%%%%
部分内容源自网络,侵权联系删除!
欢迎感兴趣的小伙伴点击文末阅读原文获取完整版代码,小编会不定期更新高质量的学习资料、文章和程序代码,为您的科研加油助力!
更多创新性预测及优化程序请点击公众号首页:《预测优化》|《综合能源》链接!