🍒🍒🍒欢迎关注🌈🌈🌈
📝个人主页:我爱Matlab
👍点赞➕评论➕收藏 == 养成习惯(一键三连)🌻🌻🌻🍌希望大家多多支持🍓~一起加油 🤗
💬语录:将来的我一定会感谢现在奋斗的自己!
🍁🥬🕒摘要🕒🥬🍁
蝙蝠使用回声定位技术检测猎物、避开障碍物以及在黑暗的环境中找到栖息地。其可以发出非常响亮的脉冲并听取从周围物体反弹回来的回声,根据回声到双耳的不同时间与强度判断物体所在的方向和位置;还可以根据目标猎物或者障碍物的特征发出不同性质的脉冲。
大多数蝙蝠使用恒定频率信号进行回声定位,信号的大小取决于目标猎物。蝙蝠发出的脉冲持续时间很短,一般在8~10 ms之间,其频率通常在25~150 kHz的范围内。正常飞行的过程中,蝙蝠每秒发射10~20个脉冲;而在寻找猎物的过程中,尤其在靠近猎物飞行时,每秒可以发射约200个脉冲。
蝙蝠算法(Bat Algorithm,BA)是受蝙蝠回声定位捕食行为启发,提出的一种基于迭代优化技术的新型群智能优化算法。该算法自2010年由Yang教授提出以来,因其具有模型简单、收敛速度快、参数少等优点 ,已在工程优化 、模型识别等问题中得到较好的应用,很快得到了国内外学者的广泛关注,成为智能优化算法领域新的研究热点。
✨🔎⚡运行结果⚡🔎✨
💂♨️👨🎓Matlab代码👨🎓♨️💂
clc; % clear any work or data in the command window
clear all; % clear all varriable values before use
close all; % close all open figures
doc_name = 'ED_result.doc';
plot_Fcost = 'FuelCostCurve.png';
plot_Iterr = 'ItterationsCurve.png';
plot_Ploss = 'PowerLossCurve.png';
bar_Ploss = 'PowerLossChart.png';
bar_Fcost = 'FuelCostBar.png';
hvdc_Losses = 'HVDC_loses.png';
transmission_modes = ["HVAC","HVDC"];
source = ["6thermal","4thermal","2wind"];
% prelocating matrices that change in length
[power_loss,F_cost,iterrations,sw_loss,cond_loss,tl_loss,F_cost_inst] = deal(zeros);
demand = [120 150 180 210 240 270 300 330 360 390 420]; % load demands
load_demand_values = numel(demand); % numel counts the elements of matrix
print = fopen(doc_name,'w+');
% variables available to all functions
global fuel_coefficients B power_demand Pg_limits transmission_type ...
Cond_loss SW_loss TL_loss convergence_time start_timing DRi URi ...
n f_cost beta tao time instability inst_const
% fuel_coefficients matrix having 5 columns of fuel cost coefficients
fuel_coefficients = [0.00375 2.00 240 0 0;
0.01750 1.75 200 0 0;
0.06250 1.00 220 40 0.008;
0.00834 3.25 200 30 0.009;
0.02500 3.00 220 0 0;
0.02500 3.00 190 0 0];
generator_limits = [50 200;20 80;15 50;10 35;10 30;12 40];
%RAMP RATE CONSTRAINTS
DRi= [85 22 15 16 9 16];
URi= [65 12 12 8 6 8];
beta = 1.75;
tao = 2.85;
time = 10; % instability time in seconds
instability = false(); % set the first calculations to be without instability
n = length(fuel_coefficients(:,1)); %Returns the length of the fuel_coefficients variable
for type = 1:numel(transmission_modes)% looping through each mode
transmission_type = transmission_modes(type);
fprintf(print,strcat('ECONOMIC DISPATCH FOR _',transmission_type,...
' USING NOVEL BAT OPTIMIZATION ALGORITHM \n'));
%% Step 1:finding the B matrix
loss_coef = [0.000218 0.000103 0.000009 -0.000010 0.000002 0.000027
0.000103 0.000181 0.000004 -0.000015 0.000002 0.000030
0.000009 0.000004 0.000417 -0.000131 -0.000153 -0.000107
-0.000010 -0.000015 -0.000131 0.000221 0.000094 0.000050
0.000002 0.000002 -0.000153 0.000094 0.000243 -0.000000
0.000027 0.000030 -0.000107 0.000050 -0.000000 0.000358];
%% Step 2: getting power demand and setting incremental cost(lamda)
for idx = 1:load_demand_values
power_demand = demand(idx);
disp(strcat('Computing dispatch for >',num2str(power_demand),...
'MW in >',transmission_type,', ',num2str(load_demand_values...
-idx),' more values to go...'))
disp('Working please wait ...')
%% Step3: Deploying Novel Bat Algorithm (NBA)
if (min(generator_limits(:,1)) <= power_demand)&&(power_demand <= sum(generator_limits(:,2)))
% setting the parameters in the basic Novel Bat Algorithm (NBA)
M = 1000; %number of iterations
pop = 30;
gamma = 0.9;
alpha = 0.99;
r0Max = 1;
r0Min = 0;
AMax = 2;
AMin = 1;
freqDMax = 1.5;
freqDMin = 0;
% setting the additional parameters in Novel Bat Algorithm (NBA)
G = 10;
probMax = 0.9;
probMin = 0.6;
thetaMax = 1;
thetaMin = 0.5;
wMax = 0.9;
wMin = 0.5;
CMax = 0.9;
CMin = 0.1;
if strcmp(transmission_type,'HVDC') %assigning a different B for HVDC
B = 0.45*loss_coef;
else
B = loss_coef;
end
完整代码:多目标优化生态调度结果的预测方法研究——基于新蝙蝠算法
📜📢🌈参考文献🌈📢📜
[1]姜晨. 面向云制造多目标优化资源调度结果的预测方法研究[D].浙江工业大学,2019.DOI:10.27463/d.cnki.gzgyu.2019.000567.