⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 psotest1.m

📁 利用PSO算法解决经济批量分发问题的matlab源代码
💻 M
字号:
clear
clc;
format long;
global data B Pd;

% the data matrix should have 5 columns of fuel cost coefficients and plant  limits.
% 1.a ($/MW^2) 2. b $/MW 3. c ($) 4.lower lomit(MW) 5.Upper limit(MW)
%no of rows denote the no of plants(n)
data=[0.007	7	240	100	500
0.0095	10	200	50	200
0.009	8.5	220	80	300
0.009	11	200	50	150
0.008	10.5	220	50	200
0.0075	12	120	50	120];
B=1e-4*[0.14	0.17	0.15	0.19	0.26	0.22
0.17	0.6	0.13	0.16	0.15	0.2
0.15	0.13	0.65	0.17	0.24	0.19
0.19	0.16	0.17	0.71	0.3	0.25
0.26	0.15	0.24	0.3	0.69	0.32
0.22	0.2	0.19	0.25	0.32	0.85
]; 
 Pd=700;
n=length(data(:,1));
l=data(:,4)';
u=data(:,5)';
ran=[l' u'];
% P1=[100 10000 100 2 2 .9 .4 1500 1e-25 200 1e50 0 0];
Pdef = [100 100000 100 2 2 0.9 0.4 1500 1e-10 5000 NaN 0 0];

 [OUT]=pso_Trelea_vectorized('f7',n,1,ran,0,Pdef);
 out=abs(OUT)
 P=out(1:6)
 [F Pl]=f7(P')

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -