好文档 - 专业文书写作范文服务资料分享网站

2008数学建模论文大全(优秀)好的东西值得下载

天下 分享 时间: 加入收藏 我要投稿 点赞

-0.0008 -0.003 0 -0.0001 -0.0001 -0.0002 -0.0002 -0.0002 -0.0002 -0.0003 -0.0003 -0.0003 -0.0003 -0.0003 -0.0004 -0.0003 -0.0003 -0.0005 -0.0006 -0.0005 -0.0004 -0.0004 -0.0003 -0.0004 -0.0004 -0.0004 -0.0004 -0.0004 -0.0004 -0.0004 -0.0004 -0.0004 -0.0004 0.1249 0.1029 0.1028 -0.0042 0.1253 0.0065

0.11 0.1119 0.1092 0.1052 0.1045 0.1088 0.1104 0.096 0.096 0.096 0.1116 0.1131 0.1207 0.1231 0.1509 0.1175 0.1271 0.1719 0.2158 0.1857 0.1638 0.1389 0.098 0.083 0.0945 0.09 0.1065 0.1094 0.1126 0.0799 0.1137 0.1085 0.0469 -0.0944 -0.0848 -0.0875 -0.0718 -0.0093 -0.0633 -0.0584 -0.0545 -0.0436 -0.073 -0.0417 -0.0302 -0.022 -0.0166 -0.0186 -0.0177 -0.0168 -0.0158 -0.0155 -0.0148 -0.0143 -0.0141 -0.0142 -0.0153 -0.0151 -0.0114 -0.0104 -0.0102 -0.0105 -0.0101 -0.0095 -0.0077 -0.0119 -0.0113 -0.0046 0 0.0202 0.0256 0.0531 0.0256 0.0115 0.0089 0.0055 0.0007 0.0005 0.0002 -0.0008 -0.0033 0 0 -0.0001 -0.0001 -0.0001 -0.0001 -0.0002 -0.0003 -0.0003 -0.0003 -0.0003 -0.0003 -0.0004 -0.0003 -0.0003 -0.0005 -0.0007 -0.0005 -0.0004 -0.0004 -0.0003 -0.0004 -0.0004 -0.0004 -0.0004 -0.0004 -0.0004 -0.0004 -0.0004 -0.0004 -0.0004 0.1247 0.1077 0.1075 -0.0046 0.1131 0.0073

0.514 0.5093 0.516 0.5256 0.5275 0.517 0.513 0.5486 0.5486 0.5486 0.5097 0.5064 0.4863 0.4802 0.4081 0.4979 0.4796 0.4305 0.3826 0.3865 0.3893 0.3925 0.3978 0.3367 0.4675 0.5047 0.4507 0.453 0.4555 0.5885 0.4563 0.4443 0.1992 -0.0253 -0.0313 -0.0296 -0.0393 -0.1646 -0.0382 -0.0376 -0.0371 -0.0357 -0.0269 -0.0292 -0.03 -0.0295 -0.0273 -0.0318 -0.0325 -0.0334 -0.0345 -0.0348 -0.0355 -0.0361 -0.0363 -0.0362 -0.035 -0.0352 -0.0392 -0.0403 -0.0405 -0.0401 -0.0406 -0.0413 -0.0433 -0.0387 -0.0394 -0.0266 0 0.0813 0.1033 0.2151 0.1033 0.0456 0.0346 0.0201 -0.0007 -0.0016 -0.0032 -0.008 -0.02 -0.004 -0.0042 -0.0046 -0.0048 -0.0048 -0.0048 -0.0052 -0.0054 -0.0055 -0.0055 -0.0056 -0.0057 -0.0058 -0.0057 -0.0056 -0.0068 -0.0073 -0.0068 -0.0063 -0.006 -0.0058 -0.0063 -0.0063 -0.0063 -0.0063 -0.0063 -0.0063 -0.0063 -0.0063 -0.0063 -0.0063 0.475 0.447 0.4475 -0.0266 0.5064 0.0278

0.2547 0.255 0.2546 0.2539 0.2538 0.2545 0.2548 0.2525 0.2525 0.2525 0.2548 0.2552 0.2552 0.2556 0.2567 0.2584 0.2653 0.2627 0.2601 0.3001 0.3291 0.3622 0.4165 -0.494 0.3489 0.3185 0.3409 0.3323 0.3227 0.25 0.3194 0.3435 0.2227 0.1848 0.1844 0.1845 0.1839 0.1829 0.1653 0.1546 0.1461 0.1225 0.1511 0.1018 0.0837 0.0696 0.0583 0.0666 0.0658 0.0651 0.0643 0.0641 0.0636 0.0632 0.063 0.0631 0.0639 0.0638 0.0608 0.06 0.0599 0.0602 0.0598 0.0593 0.0579 0.0612 0.0607 0.0353 0 -0.1196 -0.1519 -0.3156 -0.1519 -0.0674 -0.0514 -0.0306 -0.0006 0.0006 0.0029 0.0095 0.0262 0.0039 0.0043 0.0048 0.0051 0.0051 0.0051 0.0056 0.0059 0.006 0.0061 0.0063 0.0064 0.0065 0.0064 0.0062 0.0078 0.0086 0.0078 0.0072 0.0068 0.0064 0.0072 0.0072 0.0072 0.0072 0.0072 0.0072 0.0072 0.0072 0.0072 0.0072 0.2754 0.3424 0.3422 0.0353 0.2552 -0.0416]; %系统备用要求

bei_power = [50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50 50];

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % 发电机组的分段成本和 for i = 1:54

35

result(i, 1) = load0(i) + cp(i, 1) * rp(i, 1);

result(i, 2) = cp(i, 2) * (rp(i, 2) - rp(i, 1)) + result(i, 1); result(i, 3) = cp(i, 3) * (rp(i, 3) - rp(i, 2)) + result(i, 2); result(i, 4) = cp(i, 4) * (rp(i, 4) - rp(i, 3)) + result(i, 3); result(i, 5) = cp(i, 5) * (rp(i, 5) - rp(i, 4)) + result(i, 4); end

% 横坐标 发电机组的发电量 xdata=[zeros(54,1),rp]; % 总坐标 发电机组的成本 ydata=[load0,result]; for i = 1:54 % 二次拟合系数

factor(i, 1:3) = polyfit(xdata(i,1:6),ydata(i,1:6),2); end

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% n为机组总数,T为第几时段 n = 54; T = 24;

%生成随机数矩阵 n*T for i = 1:n for t = 1:T

r(i, t) = unifrnd(0, P_MAX(i)); end end

%计算百分比系数数组 for t = 1:T

R(t) = sum(r(1:n,t)); end for i = 1:n for t = 1:T

PER(i, t) = r(i, t)/R(t); end end

%初始化各台发电机组的发电量 %l 负载数 l = 90;

% 列求和 各时段负载总和 for t = 1:T

L(t) = sum(load(1:l, t)); end for i = 1:n

36

for t = 1:T

c(i, t) = PER(i, t) * L(t); end end

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

% 种群中个体数量 N个 N = 200;

for i = 1:N % 适度函数

[Fit(i),C] = fitness(c, P_MAX, P_MIN, PCMAX, PDMAX, ini_power, bei_power, start_money, factor, min_s_time, min_r_time, ini_time, L); % 种群样本 for j=1:n for k=1:T

C1(i,j,k) = C(j,k); end end end

[C3] = yichuan(Fit, C1); % 遗传迭代

G=50; % 遗传迭代次数G % 最小花费总成本,初始设为2500000 Tc0=2500000; % 遗传迭代G代数 for l = 1 :G for i = 1:N

C4(1:n,1:T) = C3(i,1:n,1:T);

[Fitness(i),c2,Tc] = fitness(C4(1:n,1:T), P_MAX, P_MIN, PCMAX, PDMAX, ini_power, bei_power, start_money, factor, min_s_time, min_r_time, ini_time, L); for j = 1:n for k = 1:T

C3(i,j,k) = c2(j,k); end end if Tc < Tc0

% 记录最小花费的成本值 Tc0 = Tc;

%mark = round(c2);%对结果四舍五入取整 mark = c2; %为最优发电机组启停计划 %break;

37

end

% 记录所有发电机组发电成本值 Tc0(l) = Tc; end

[C5] = yichuan(Fitness, C3); C3 = C5; end

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %迭代G代后的运行结果图: g=1:50;

plot(g,log10(Tc0+0.01),'o') %发电机组发电总成本F取对数,加上0.01避免初值Tc0=0时取对数无意义 %plot(g,Tc0,'o') %发电机组发电总成本F grid on

xlabel('迭代次数');ylabel('发电机组发电总成本F(取对数)'); title('迭代50次的运行结果');

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

2.2 遗传算法核心,用于进行样本的遗传操作:选择-复制、交叉、变异 [C3] = yichuan(Fit, C1);

% 遗传迭代

G=50; % 遗传迭代次数G

% 最小花费总成本,初始设为2500000 Tc0=2500000; % 遗传迭代G代数 for l = 1 :G for i = 1:N

C4(1:n,1:T) = C3(i,1:n,1:T);

[Fitness(i),c2,Tc] = fitness(C4(1:n,1:T), P_MAX, P_MIN, PCMAX, PDMAX, ini_power, bei_power, start_money, factor, min_s_time, min_r_time, ini_time, L); for j = 1:n for k = 1:T

C3(i,j,k) = c2(j,k); end end if Tc < Tc0

% 记录最小花费的成本值 Tc0 = Tc;

%mark = round(c2);%对结果四舍五入取整 mark = c2; %为最优发电机组启停计划 %break; end

% 记录所有发电机组发电成本值

38

Tc0(l) = Tc; end

[C5] = yichuan(Fitness, C3); C3 = C5; end

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %迭代G代后的运行结果图: g=1:50;plot(g,log10(Tc0+eps),'o') grid on

xlabel('迭代次数');ylabel('发电机组发电总成本F(取对数)'); title('迭代50次的运行结果');

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

2.3 计算适度值,并且使生成的样本满足各种约束 % 遗传种群初始化,并返回适应度等大小

function [Fitness,c2,Tc] = fitness(c, P_MAX, P_MIN, PCMAX, PDMAX, ini_power, bei_power, start_money, factor, min_s_time, min_r_time, ini_time, L)

% n为机组总数,T为第几时段 n = 54; T = 24;

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% %调整列中的元素取值,使其满足发电机组出力范围约束 for i = 1:n for t = 1:T

if c(i, t) > P_MAX(i) c1(i, t) = P_MAX(i); elseif c(i, t) >= P_MIN(i) c1(i, t) = c(i,t); elseif c(i, t) >= 0.6*P_MIN(i) c1(i, t) = P_MIN(i); else

c1(i, t) = 0; end end end

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

%调整列中的元素取值,使其满足发电机组的增出力和降出力约束 % 第一列特殊处理 for i = 1:n

if c1(i, 1) > ini_power(i) + PCMAX(i) c2(i, 1) = ini_power(i) + PCMAX(i);

39

2008数学建模论文大全(优秀)好的东西值得下载

-0.0008-0.0030-0.0001-0.0001-0.0002-0.0002-0.0002-0.0002-0.0003-0.0003-0.0003-0.0003-0.0003-0.0004-0.0003-0.0003-0.0005-0.0006-0.0005-0.0004-0.0004-0.0003-0.0004-
推荐度:
点击下载文档文档为doc格式
0plxx0pqkz5136q5shn8
领取福利

微信扫码领取福利

微信扫码分享