問題
設(shè)計思路
先用傳統(tǒng)的基荷宪塔、腰荷、峰荷策略解決第一問脉顿,然后借助第一問的結(jié)果解決第二問蝌麸。最后后將第一問的策略用代碼實現(xiàn),解決第三問艾疟。
一.
1. 劃分負(fù)荷
明顯来吩,無論在任何負(fù)載率下敢辩,A、B弟疆、C發(fā)電的經(jīng)濟(jì)性是依次變差的戚长,再加上C機(jī)組的啟停都有額外的費(fèi)用。所以它們出力的優(yōu)先級也應(yīng)當(dāng)是依次遞減怠苔。
將日負(fù)荷曲線分為基荷同廉、腰荷和峰荷。在10%的旋轉(zhuǎn)備用率條件下柑司,只開A迫肖、B機(jī)組能夠達(dá)到的開機(jī)容量最多能到達(dá)10800MW,無法滿足所有負(fù)荷需求攒驰,所以C機(jī)組必須作為備用蟆湖,在峰荷時出力。
使A玻粪、B機(jī)組滿足基荷隅津、腰荷的負(fù)荷要求,A劲室、B伦仍、C機(jī)組滿足峰荷的負(fù)荷要求。
觀察日負(fù)荷直方圖很洋,有兩種劃分負(fù)荷的方案充蓝。
方案甲:5000MW以下為基荷,5000~8000MW為腰荷蹲缠,8000MW以上為峰荷棺克。
方案乙:5000MW以下為基荷,5000~9000MW為腰荷线定,9000MW以上為峰荷。
方案甲:
約束條件:
式中A确买、B分別表示A斤讥、B電站機(jī)組當(dāng)日開機(jī)的數(shù)量。
- A湾趾、B的開機(jī)容量必須大于腰荷芭商,然后提供10%的旋轉(zhuǎn)備用率。
- A搀缠、B的最小技術(shù)出力必須小于基荷铛楣,自動滿足10%的旋轉(zhuǎn)備用率。
- A艺普、B的數(shù)量滿足條件
- 峰荷時簸州,系統(tǒng)的開機(jī)容量需滿足旋轉(zhuǎn)備用率的要求鉴竭,假設(shè)負(fù)荷率為100%時,C機(jī)組全開岸浑。
解不等式組搏存,無解,下面尋找最接近的整數(shù)解矢洲。
因為A無論在何種條件下都是最經(jīng)濟(jì)的選擇璧眠,所以先假設(shè):
得:
此時,不滿足約束條件2:
實際系統(tǒng)中读虏,發(fā)電量可以略高于用電量责静。
方案乙:
約束條件:
式中A、B分別表示A盖桥、B電站機(jī)組當(dāng)日開機(jī)的數(shù)量泰演。
A、B的開機(jī)容量必須大于腰荷葱轩,然后提供10%的旋轉(zhuǎn)備用率睦焕。
A、B的最小技術(shù)出力必須小于基荷靴拱,自動滿足10%的旋轉(zhuǎn)備用率垃喊。
A、B的數(shù)量滿足條件袜炕。
峰荷時本谜,系統(tǒng)的開機(jī)容量需滿足旋轉(zhuǎn)備用率的要求,假設(shè)負(fù)荷率為100%時偎窘,C機(jī)組全開乌助。
解不等式組(1,2陌知,3)他托,無解。
所以選擇方案甲:
2. 計算A仆葡、B運(yùn)行成本
下面計算基荷和腰荷的各個工況下A赏参、B每臺發(fā)電機(jī)的出力,已解決在一定條件下成本最小的規(guī)劃問題沿盅。
約束條件:
可以發(fā)現(xiàn)把篓,此規(guī)劃問題的目標(biāo)函數(shù)是二次函數(shù),此問題為二次規(guī)劃問題腰涧,無法用線性規(guī)劃的單純形法韧掩。所以需采取其他方法。
B機(jī)組出力的調(diào)節(jié)范圍為:
A機(jī)組出力的調(diào)節(jié)范圍為:
由于B機(jī)組的單位成本始終高于A機(jī)組窖铡,所以盡量減小B機(jī)組的出力即可減小整體發(fā)電成本疗锐。于是坊谁,可以將基荷和腰荷時期不同的負(fù)荷率對應(yīng)到A、B不同的出力水平窒悔,如下:
負(fù)荷/MW | 5500 | 6500 | 8000 |
---|---|---|---|
A出力功率/MW | 3700 | 4700 | 6000 |
B出力功率/MW | 1800 | 1800 | 2000 |
使B的出力始終最小即可呜袁。
確定了A、B機(jī)組的出力之和简珠,下一步即需確定A阶界、B機(jī)組的每臺出力,即:在總出力確定的情況下聋庵,如何為每臺機(jī)組分配出力膘融,使得總成本最小。
對于A機(jī)組:
如某一小時的A機(jī)組運(yùn)行成本
是
的開口向下的二次函數(shù)祭玉,所以
是
的上凸函數(shù)氧映。
由琴生不等式及其推論可知,應(yīng)使機(jī)組的出力盡量集中于最大出力和最小技術(shù)出力處脱货,僅有一臺機(jī)組處于最大出力和最小技術(shù)出力之間時岛都,成本最小。
琴生不等式:
當(dāng)為凸函數(shù)時:
B機(jī)組同理
所以臼疫,可以得出基荷和腰荷時所有發(fā)電機(jī)的出力水平表如下:
負(fù)荷 | 5500 | 6500 | 8000 |
---|---|---|---|
840 | 1000 | 1000 | |
500 | 1000 | 1000 | |
500 | 840 | 1000 | |
500 | 500 | 1000 | |
500 | 500 | 1000 | |
500 | 500 | 840 | |
360 | 360 | 360 | |
360 | 360 | 360 | |
360 | 360 | 360 | |
360 | 360 | 360 | |
360 | 360 | 360 | |
360 | 360 | 360 | |
總成本 | 997447.2 | 1168447 | 1424947 |
3. 計算C啟停及運(yùn)行成本
下面考慮峰荷時即負(fù)荷率為90%和100%的的情況:
負(fù)荷率90%時
為了保證10%的旋轉(zhuǎn)備用率,必須使總開機(jī)容量到達(dá)
所以最少開啟2臺C機(jī)組扣孟,總開機(jī)容量達(dá)到
烫堤。
C機(jī)組出力調(diào)整為最小:
則C機(jī)組總共出力凤价,A鸽斟、B需出力:
負(fù)荷率100%時
為了保證10%的旋轉(zhuǎn)備用率,必須使總開機(jī)容量到達(dá)利诺,
所以最少開啟4臺C機(jī)組富蓄,總開機(jī)容量達(dá)到
。
目標(biāo)出力 | 5500 | 6500 | 8000 | 9000 | 10000 |
---|---|---|---|---|---|
840 | 1000 | 1000 | 1000 | 1000 | |
500 | 1000 | 1000 | 1000 | 1000 | |
500 | 840 | 1000 | 1000 | 1000 | |
500 | 500 | 1000 | 1000 | 1000 | |
500 | 500 | 1000 | 1000 | 1000 | |
500 | 500 | 1000 | 1000 | 1000 | |
360 | 360 | 600 | 600 | 600 | |
360 | 360 | 600 | 600 | 600 | |
360 | 360 | 600 | 600 | 600 | |
360 | 360 | 410 | 410 | 600 | |
360 | 360 | 360 | 360 | 600 | |
360 | 360 | 360 | 360 | 600 | |
0 | 0 | 0 | 70 | 190 | |
0 | 0 | 0 | 0 | 70 | |
0 | 0 | 0 | 0 | 70 | |
0 | 0 | 0 | 0 | 70 | |
總出力 | 5500 | 6500 | 8000 | 9000 | 10000 |
開機(jī)容量 | 9360 | 9360 | 9360 | 9950 | 11000 |
總成本 | 997447.2 | 1168447 | 1424947 | 1625101 | 1900940 |
\
4. 結(jié)論
得出電站日運(yùn)行規(guī)劃
時間(h) | 目標(biāo)出力(MW) | 各機(jī)組出力(MW) | 實際出力(MW) | 開機(jī)容量(MW) | 單位小時出力成本(元) | 開停機(jī)成本(元) | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | 6500 | 1000 | 1000 | 840 | 500 | 500 | 500 | 360 | 360 | 360 | 360 | 360 | 360 | 0 | 0 | 0 | 0 | 6500 | 9360 | 1168447 | |
2 | 5000 | 840 | 500 | 500 | 500 | 500 | 500 | 360 | 360 | 360 | 360 | 360 | 360 | 0 | 0 | 0 | 0 | 5500 | 9360 | 997447.2 | |
3 | 5000 | 840 | 500 | 500 | 500 | 500 | 500 | 360 | 360 | 360 | 360 | 360 | 360 | 0 | 0 | 0 | 0 | 5500 | 9360 | 997447.2 | |
4 | 5000 | 840 | 500 | 500 | 500 | 500 | 500 | 360 | 360 | 360 | 360 | 360 | 360 | 0 | 0 | 0 | 0 | 5500 | 9360 | 997447.2 | |
5 | 5000 | 840 | 500 | 500 | 500 | 500 | 500 | 360 | 360 | 360 | 360 | 360 | 360 | 0 | 0 | 0 | 0 | 5500 | 9360 | 997447.2 | |
6 | 6500 | 1000 | 1000 | 840 | 500 | 500 | 500 | 360 | 360 | 360 | 360 | 360 | 360 | 0 | 0 | 0 | 0 | 6500 | 9360 | 1168447 | |
7 | 6500 | 1000 | 1000 | 840 | 500 | 500 | 500 | 360 | 360 | 360 | 360 | 360 | 360 | 0 | 0 | 0 | 0 | 6500 | 9360 | 1168447 | |
8 | 8000 | 1000 | 1000 | 1000 | 1000 | 1000 | 840 | 360 | 360 | 360 | 360 | 360 | 360 | 0 | 0 | 0 | 0 | 8000 | 9360 | 1424947 | |
9 | 8000 | 1000 | 1000 | 1000 | 1000 | 1000 | 840 | 360 | 360 | 360 | 360 | 360 | 360 | 0 | 0 | 0 | 0 | 8000 | 9360 | 1424947 | |
10 | 9000 | 1000 | 1000 | 1000 | 1000 | 1000 | 1000 | 600 | 600 | 600 | 410 | 360 | 360 | 70 | 0 | 0 | 0 | 9000 | 9950 | 1625101 | 36000 |
11 | 9000 | 1000 | 1000 | 1000 | 1000 | 1000 | 1000 | 600 | 600 | 600 | 410 | 360 | 360 | 70 | 0 | 0 | 0 | 9000 | 9950 | 1625101 | |
12 | 8000 | 1000 | 1000 | 1000 | 1000 | 1000 | 840 | 360 | 360 | 360 | 360 | 360 | 360 | 0 | 0 | 0 | 0 | 8000 | 9360 | 1424947 | 36000 |
13 | 8000 | 1000 | 1000 | 1000 | 1000 | 1000 | 840 | 360 | 360 | 360 | 360 | 360 | 360 | 0 | 0 | 0 | 0 | 8000 | 9360 | 1424947 | |
14 | 8000 | 1000 | 1000 | 1000 | 1000 | 1000 | 840 | 360 | 360 | 360 | 360 | 360 | 360 | 0 | 0 | 0 | 0 | 8000 | 9360 | 1424947 | |
15 | 8000 | 1000 | 1000 | 1000 | 1000 | 1000 | 840 | 360 | 360 | 360 | 360 | 360 | 360 | 0 | 0 | 0 | 0 | 8000 | 9360 | 1424947 | |
16 | 8000 | 1000 | 1000 | 1000 | 1000 | 1000 | 840 | 360 | 360 | 360 | 360 | 360 | 360 | 0 | 0 | 0 | 0 | 8000 | 9360 | 1424947 | |
17 | 9000 | 1000 | 1000 | 1000 | 1000 | 1000 | 1000 | 600 | 600 | 600 | 410 | 360 | 360 | 70 | 0 | 0 | 0 | 9000 | 9950 | 1625101 | 36000 |
18 | 9000 | 1000 | 1000 | 1000 | 1000 | 1000 | 1000 | 600 | 600 | 600 | 410 | 360 | 360 | 70 | 0 | 0 | 0 | 9000 | 9950 | 1625101 | |
19 | 10000 | 1000 | 1000 | 1000 | 1000 | 1000 | 1000 | 600 | 600 | 600 | 600 | 600 | 600 | 190 | 70 | 70 | 70 | 10000 | 11000 | 1900940 | 108000 |
20 | 10000 | 1000 | 1000 | 1000 | 1000 | 1000 | 1000 | 600 | 600 | 600 | 600 | 600 | 600 | 190 | 70 | 70 | 70 | 10000 | 11000 | 1900940 | |
21 | 9000 | 1000 | 1000 | 1000 | 1000 | 1000 | 1000 | 600 | 600 | 600 | 410 | 360 | 360 | 70 | 0 | 0 | 0 | 9000 | 9950 | 1625101 | 108000 |
22 | 8000 | 1000 | 1000 | 1000 | 1000 | 1000 | 840 | 360 | 360 | 360 | 360 | 360 | 360 | 0 | 0 | 0 | 0 | 8000 | 9360 | 1424947 | 3600 |
23 | 8000 | 1000 | 1000 | 1000 | 1000 | 1000 | 840 | 360 | 360 | 360 | 360 | 360 | 360 | 0 | 0 | 0 | 0 | 8000 | 9360 | 1424947 | |
24 | 6500 | 1000 | 1000 | 840 | 500 | 500 | 500 | 360 | 360 | 360 | 360 | 360 | 360 | 0 | 0 | 0 | 0 | 6500 | 9360 | 1168447 | |
成本(元): | 33415488.17 | 396000 | |||||||||||||||||||
總成本(元): | 33811488.17 |
二.
1.建立停運(yùn)容量概率模型
- 對于確切狀態(tài)概率立轧,有遞推公式
為新增一臺機(jī)組(容量
格粪,
)后,系統(tǒng)停運(yùn)容量為
的確切概率氛改,
對于第一臺機(jī)組,
當(dāng)時比伏,
- 累積狀態(tài)概率公式
- 取步長為
編程迭代計算停運(yùn)概率胜卤。
2.matlab程序代碼
\main.m
%main.m
%華中科技大學(xué) 電氣與電子工程學(xué)院
%強(qiáng)電磁與新技術(shù)國家重點實驗室
%季天澤
%M201877109
clear
clc
cmat=[ones(6,1)*1000;ones(8,1)*600;ones(4,1)*350]';
rmat=[ones(6,1)*0.1;ones(8,1)*0.08;ones(4,1)*0.12]';
p=[];
p(1)=1;
for i=1:18
p2=[];%p2代表p(x)
c=cmat(i);
r=rmat(i);
p1=p;%p1代表p'(x)
p1(x2i(sum(cmat(1:i))))=0;
for x=0:50:sum(cmat(1:i))%x從0到裝機(jī)容量
if x<c
pxc=0;
else
pxc=p1(x2i(x-c));
end
px=p1(x2i(x));
p2=[p2,(1-r)*px+r*pxc];
end
p=p2;
end
P=p*(tril(ones(245)));
function i= x2i(x)
%此函數(shù)用于將x值轉(zhuǎn)換為i值
i=x/50+1;
end
三.
篩選出所有的可行的裝機(jī)組合,然后將其對應(yīng)的待機(jī)組合求出赁项。
將“一”中的策略用代碼實現(xiàn)葛躏,輸入待機(jī)組合澈段,輸出機(jī)組出力表和日運(yùn)行成本,
同時根據(jù)裝機(jī)組合求其裝機(jī)成本舰攒。
比較各種方案的總成本败富。
程序代碼
%main.m
%華中科技大學(xué) 電氣與電子工程學(xué)院
%強(qiáng)電磁與新技術(shù)國家重點實驗室
%季天澤
%M201877109
clc
clear
global PowerPlantCombine;%存放A、B摩窃、C電站的個數(shù)兽叮,(1x3)矩陣
LoadRate=[65,55,55,55,55,65,65,80,80,90,90,80,80,80,80,80,90,90,100,100,90,80,80,65]/100;
MaxLoad=12500;
Load=LoadRate*MaxLoad;
%PowerPlantNumberMat=[6;6;4];
PowerPlantCombineMat=candidatePowerPlantCombine();
dayCostmat=[];
for i = 1:length(PowerPlantCombineMat)%遍歷所有可能的電廠組合方式
PowerPlantCombine=PowerPlantCombineMat(:,i);
dayCost=0;
Outputmat=[];
for j=1:24%遍歷24小時,根據(jù)負(fù)載求每個電廠的出力組合
load=Load(j);
Output=output(load);%出力組合
Cost=cost(Output);%出力費(fèi)用
if j==1
dayCost=dayCost+Cost;
elseif j==24
dayCost=dayCost+Cost+CSwitchCost(Outputmat(1,:),Output);%考慮24點開1點關(guān)的C機(jī)組的開停機(jī)費(fèi)用
else
dayCost=dayCost+Cost+CSwitchCost(Outputmat(end,:),Output);%考慮C機(jī)組的開停機(jī)費(fèi)用
end
Outputmat=[Outputmat;Output];%24小時的出力表
end
dayCostmat=[dayCostmat,dayCost];
end
powerPlantBuildCombineMat=convert(PowerPlantCombineMat);%根據(jù)待機(jī)容量求相應(yīng)的裝機(jī)容量猾愿。(待機(jī)容量即為當(dāng)日開機(jī)了的所有機(jī)組的總?cè)萘浚?
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
buildCostMat=([44067.24,29745.387,12333.3]*10000)*(powerPlantBuildCombineMat-PowerPlantCombineMat);%計算裝機(jī)成本
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
costmat=dayCostmat*365+buildCostMat;%計算總成本
[min,index]=min(costmat);%找到所有費(fèi)用的最小值
%還需考慮如果最小值不滿足C機(jī)組的啟停約束鹦聪,需退而求其次
aim=[costmat;powerPlantBuildCombineMat;PowerPlantCombineMat];
aim(:,index)
%cost.m
%華中科技大學(xué) 電氣與電子工程學(xué)院
%強(qiáng)電磁與新技術(shù)國家重點實驗室
%季天澤
%M201877109
function cost = cost(output)
%此函數(shù)輸入每小時的output(出力)矩陣,輸出當(dāng)小時的發(fā)電成本
global PowerPlantCombine;
Anumber=PowerPlantCombine(1);
Bnumber=PowerPlantCombine(2);
Cnumber=PowerPlantCombine(3);
Aoutput=output(1:Anumber);
Boutput=output(Anumber+1:Anumber+Bnumber);
Coutput=output(Anumber+Bnumber+1:end);
Acost=sum((300-10.*Aoutput./1000).*600.*Aoutput./1000);
Bcost=sum((322-12.*Boutput./1000).*600.*Boutput./1000);
Ccost=sum((266-16.*Coutput./1000).*1800.*Coutput./1000);
cost=Acost+Bcost+Ccost;
end
%convert.m
%華中科技大學(xué) 電氣與電子工程學(xué)院
%強(qiáng)電磁與新技術(shù)國家重點實驗室
%季天澤
%M201877109
function powerPlantbuildCombineMat = convert(powerPlantonCombineMat)
%通過此函數(shù)輸入待機(jī)組合輸出對應(yīng)的裝機(jī)組合
powerPlantbuildCombineMat=[];
for i=1:length(powerPlantonCombineMat)
powerPlantOnCombine=powerPlantonCombineMat(:,i);
Anumber=powerPlantOnCombine(1);
Bnumber=powerPlantOnCombine(2);
Cnumber=powerPlantOnCombine(3);
if Anumber<6
Anumber=6;
end
if Bnumber<8
Bnumber=8;
end
if Cnumber<4
Cnumber=4;
end
powerPlantOnLoad=Anumber*1000+Bnumber*600+Cnumber*350;
if powerPlantOnLoad<15000
Cnumber=Cnumber+ceil((15000-powerPlantOnLoad)/350);
end
powerPlantbuildCombine=[Anumber;Bnumber;Cnumber];
powerPlantbuildCombineMat=[powerPlantbuildCombineMat,powerPlantbuildCombine];
end
%condidatePowerPlant.m
%華中科技大學(xué) 電氣與電子工程學(xué)院
%強(qiáng)電磁與新技術(shù)國家重點實驗室
%季天澤
%M201877109
function A = candidatePowerPlantCombine()
%此函數(shù)輸出可行的候選待機(jī)發(fā)電機(jī)組合
% 此處顯示詳細(xì)說明
T=[];
J=[];
K=[];
for j=1:8
for k=1:10
for t=1:7
if (1000*j+600*k>=11000)&(500*j+360*k<=6875)&(1000*j+600*k>=13750-350*t)
J=[J,j];
K=[K,k];
T=[T,t];
end
end
end
end
A=[J;K;T];
end
%CSwitchCost.m
%華中科技大學(xué) 電氣與電子工程學(xué)院
%強(qiáng)電磁與新技術(shù)國家重點實驗室
%季天澤
%M201877109
function switchCost = CSwitchCost(outputFormer,outputNow)
% 輸入兩個相鄰兩小時的機(jī)組出力狀態(tài)蒂秘,通過比較C機(jī)組啟停狀態(tài)泽本,計算C機(jī)組起停的費(fèi)用
% 此處顯示詳細(xì)說明
global PowerPlantCombine;
Anumber=PowerPlantCombine(1);
Bnumber=PowerPlantCombine(2);
Cnumber=PowerPlantCombine(3);
CoutputFormer=outputFormer(Anumber+Bnumber+1:end);
CoutputNow=outputNow(Anumber+Bnumber+1:end);
CBoolFormer=logical(CoutputFormer);
CBoolNow=logical(CoutputNow);
Switch=(CBoolFormer-CBoolNow).^2;%是否開/關(guān),若為“1”則開或關(guān)
switchNumber=sum(Switch);%總開/關(guān)次數(shù)
switchCost=switchNumber*10*1800;%費(fèi)用
end
%output.m
%華中科技大學(xué) 電氣與電子工程學(xué)院
%強(qiáng)電磁與新技術(shù)國家重點實驗室
%季天澤
%M201877109
function output = output(load)
%輸入負(fù)荷姻僧,輸出所有電站的出力水平矩陣规丽,也就是“一”中的部分
%將出力大小分為四個范圍,以0撇贺,M1赌莺,M2,M3显熏,M4為界雄嚣,分別考慮出力情況
%M1~M2為基荷
%M2~M3為腰荷
%M3~M4為峰荷
%其他范圍無解
global PowerPlantCombine
Anumber=PowerPlantCombine(1);%A機(jī)組的數(shù)量
Bnumber=PowerPlantCombine(2);%B機(jī)組的數(shù)量
Cnumber=PowerPlantCombine(3);%C機(jī)組的數(shù)量
MaxA=Anumber*1000;%A、B喘蟆、C所有機(jī)組的出力范圍
MaxB=Bnumber*600;
MaxC=Cnumber*350;
MinA=Anumber*500;
MinB=Bnumber*360;
MinC=Cnumber*70;
M1=MinA+MinB;%0~M1無解
M2=MaxA+MinB;%M1~M2,C停機(jī)缓升,B最小出力
M3=MaxA+MaxB;%M2~M3,C停機(jī)蕴轨,A最大出力
M4=MaxA+MaxB+MaxC;%M3~M4港谊,C開機(jī),A橙弱、B最大出力(B可能有一臺機(jī)組需減小出力)
%M4以上歧寺,無解
%通過總負(fù)荷來得到A、Bnumber棘脐、C機(jī)組分別的總負(fù)荷斜筐,對于相同機(jī)組,使更多的機(jī)組處于出力區(qū)間的端點處蛀缝,一臺機(jī)組處于出力區(qū)間之內(nèi)(琴生不等式)
if (M1<=load)&&(load<M2)
Aload=load-MinB;
Bload=MinB;
AmaxNumber=floor((Aload-500*Anumber)/500);
AchangableLoad=(Aload-500*Anumber)-500*AmaxNumber+500;
outputA=[ones(1,AmaxNumber)*1000,[AchangableLoad],ones(1,Anumber-AmaxNumber-1)*500];
outputB=ones(1,Bnumber)*360;
outputC=ones(1,Cnumber)*0;
elseif (M2<=load)&&(load<M3)
Aload=MaxA;
Bload=load-MaxA;
BmaxNumber=floor((Bload-360*Bnumber)/240);
BchangableLoad=(Bload-360*Bnumber)-240*BmaxNumber+360;
outputB=[ones(1,BmaxNumber)*600,BchangableLoad,ones(1,Bnumber-BmaxNumber-1)*360];
outputA=ones(1,Anumber)*1000;
outputC=ones(1,Cnumber)*0;
elseif (M3<=load)&&(load<M4)
Aload=MaxA;
Bload=MaxB;
Cload=load-MaxA-MaxB;
if Cload<70%如果A顷链、B都為最大出力將導(dǎo)致C的目標(biāo)出力小于其可能的最小出力,那么需將C設(shè)置為最小出力(一臺機(jī)為70屈梁,其余為0)嗤练,重新設(shè)置B的出力榛了。
Cload=70;
Bload=load-Aload-Cload;
BmaxNumber=floor((Bload-360*Bnumber)/240);
BchangableLoad=(Bload-360*Bnumber)-240*BmaxNumber+360;
outputB=[ones(1,BmaxNumber)*600,BchangableLoad,ones(1,Bnumber-BmaxNumber-1)*360];
outputA=ones(1,Anumber)*1000;
outputC=ones(1,Cnumber)*0;
outputC(1)=70;
% outputB=ones(1,Bnumber);
% outputB(end)=Bload-(Bnumber-1)*600;
else
ConNumber=ceil(Cload/350);%確認(rèn)C開機(jī)的數(shù)量
CmaxNumber=ceil((Cload-70*ConNumber)/280-1);
CchangableLoad=(Cload-70*ConNumber)-280*CmaxNumber+70;
outputC=[ones(1,CmaxNumber)*350,CchangableLoad,ones(1,ConNumber-CmaxNumber-1)*70,ones(1,Cnumber-ConNumber)*0];
outputB=ones(1,Bnumber)*600;
outputA=ones(1,Anumber)*1000;
end
else
'此發(fā)電機(jī)組合錯誤'
PowerPlantCombine
end
output=[outputA,outputB,outputC];
end