package model;
//根据当前水位和来水量确定下泄流量
public class GetDischargeAmount {
//涨洪时对荆江进行补偿调度
public double DischargeAmountJingjiang(double A,double B,double B1,double B2,double B3,double C,double d,double F) //A当前水位;B当前入流量;F当前库容;d为前段时间泄流量
{
double f=F+(B-55000)*24*3600/1000/1000/100;//预计算库容
double ControlAmount=0;//控制下泄流量
double TOTAL=B1+B2+B3;//预报三天总来水量
double Y=0;//Y为逐步增加量
double D=0;//实际泄流量
if(A<171)
{
if(TOTAL>=76000*3)
{
ControlAmount=Math.min(76000, d+5000);
}
else if(f<171.5)
{
ControlAmount=((F-171.5)*1000*1000*100+B*24*3600)/24/3600;//当预算水位低于145米时下泄流量
}
else
{
//逐步提高下泄流量
if(d>55000)
{
ControlAmount=Math.max(d-5000, 55000);//前泄流量高于55000且后续来水不大时,逐步降低泄流量至55000
}
else
{
ControlAmount=55000;
}
}
}
else if(A<=175)
{
if(TOTAL>76000*3)
{
ControlAmount=Math.min(76000, d+5000);
}
//下泄流量逐步增加到76000,泄流量变幅约束
else
{
if(d>76000)
{
ControlAmount=Math.max(d-5000, 76000);
}
else
{
if(B>=85000)
{
Y=5000;
}
else if(B>=75000)
{
Y=5000;
}
else if(B>=65000)
{
Y=3000;
}
else if(B>=55000)
{
Y=1000;
}
else
{
Y=1000;
}
d=d+Y;
ControlAmount=Math.min(d, 76000);
}
}
}
else
{
if(B>=95000)
{
Y=5000;
}
else if(B>=80000)
{
Y=3000;
}
else
{
Y=2000;
}
d=d+Y;
if(d>=B)
{
ControlAmount=Math.max(B, 60000);
}
else
{
ControlAmount=Math.max(d, 60000);
}
}
if(ControlAmount<=C)
{
D=ControlAmount;
}
else
{
D=C;
}
return D;
}
//退洪时对荆江进行补偿调度
public double DischargeAmountJingjiangInRession(double A,double B,double B1,double B2,double B3,double C,double d,double F) //A当前水位;B当前入流量;F当前库容
{
double f=F+(B-55000)*24*3600/1000/1000/100;//预计算库容
double ControlAmount;//控制下泄流量
double TOTAL=B1+B2+B3;//预报三天总来水量
double X=0;//X为逐步降低量
double D;//实际下泄量
if(A<171)
{
if(TOTAL>=76000*3)
{
ControlAmount=Math.min(76000, d+5000);
}
else if(f<171.5)
{
ControlAmount=((F-171.5)*1000*1000*100+B*24*3600)/24/3600;//当预算水位低于145米时下泄流量
}
else
{
if(d>55000)
{//控制荆江下泄流量变幅
if(B>=85000)
{
X=2000;
}
else if(B>=75000)
{
X=3000;
}
else
{
X=5000;
}
d=d-X;
ControlAmount=Math.max(d, 55000);
}
else
{
ControlAmount=Math.max(d-5000, 55000);
}
}
}
else if(A<=175)//对荆江调度
{
if(TOTAL>=76000*3)
{
ControlAmount=Math.min(76000, d+5000);
}
else if(d>55000)
{
if(B>=85000)
{
X=2000;
}
else if(B>=75000)
{
X=3000;
}
else
{
X=5000;
}
d=d-X;
ControlAmount=Math.max(d, 55000);
}
else
{
ControlAmount=Math.max(d-5000, 55000);
}
}
else
{
double b;
if(d-B>5000)
{
b=d-5000;
}
else
{
b=B;
}
ControlAmount=Math.max(60000.0, b);
}
if(ControlAmount<=C)
{
D=ControlAmount;
}
else
{
D=C;
}
return D;
}
//涨洪时对城陵矶进行补偿调度
public double DischargeAmountChenglingji(double A,double B,double B1,double B2,double B3,double C,double d,double F) //A当前水位;B当前入流量;F当前库容
{
double f=F+(B-40000)*24*3600/1000/1000/100;//预计算库容
double ControlAmount=0;
double YA=0;//YA为对荆江调度逐步增加量
double XB=0;
double TOTAL=B1+B2+B3;
double D;
if(A<171)
{
if(A<=147.5)
{
/* if(TOTAL>=76000*3)
{
ControlAmount=Math.min(55000, d+5000);
}*/
if(f<171.5)
{
ControlAmount=((F-171.5)*1000*1000*100+B*24*3600)/24/3600;//当预算水位低于145米时下泄流量
}
else
{
if(d>40000)
{//对城陵矶控制下泄流量变幅
if(B>=85000)
{
XB=1000;
}
else if(B>=75000)
{
XB=3000;
}
else if(B>=55000)
{
XB=4000;
}
else
{
XB=2000;//待定
}
d=d-XB;
ControlAmount=Math.max(d, 40000);
}
else
{
ControlAmount=40000;
}
}
}
else if(A<=150)
{
if(d>43750)
{//对城陵矶控制下泄流量变幅
if(B>=85000)
{
XB=1000;
}
else if(B>=75000)
{
XB=3000;
}
else if(B>=55000)
{
XB=4000;
}
else
{
XB=2000;//待定
}
d=d-XB;
ControlAmount=Math.max(d, 43750);
}
else
{
ControlAmount=43750;
}
}
else if(A<=152.5)
{
if(d>47500)
{//对城陵矶控制下泄流量变幅
if(B>=85000)
{
XB=1000;
}
else if(B>=75000)
{
XB=3000;
}
else if(B>=55000)
{
XB=4000;
}
else
{
XB=2000;//待定
}
d=d-XB;
ControlAmount=Math.max(d, 47500);
}
else
{
ControlAmount=47500;
}
}
else if(A<=155)
{
if(TOTAL>=76000*3)
{
ControlAmount=Math.min(55000, d+5000);
}
else
{
if (d>51250)
{
d=d-2000;
ControlAmount=Math.max(51250, d);
}
else
{
ControlAmount=51250;
}
}
}
else
{
if(TOTAL>76000*3)
{
ControlAmount=Math.min(76000, d+5000);
}
else
{
//逐步提高下泄流量
if(d>55000)
{
ControlAmount=Math.max(d-6000, 55000);//前泄流量高于55000且后续来水不大时,逐步降低泄流量至55000
}
else
{
ControlAmount=Math.min(d+5000, 55000);
}
}
}
}
else if(A<=175)
{
if(TOTAL>76000*3)
{
ControlAmount=Math.min(76000, d+5000);
}
//下泄流量逐步增加到76000,泄流量变幅约束
else
{
if(d>76000)
{
ControlAmount=Math.max(d-5000, 76000);
}
else
{
if(B>=85000)
{
YA=5000;
}
else if(B>=75000)
{
YA=5000;
}
else if(B>=65000)
{
YA=3000;
}
else if(B>=55000)
{
YA=1000;
}
else
{
YA=1000;
}
d=d+YA;
ControlAmount=Math.min(d, 76000);
}
}
}
else
{
if(B>=95000)
{
YA=5000;
}
else if(B>=80000)
{
YA=3000;
}
else
{
YA=2000;
}
d=d+YA;
if(d>=B)
{
ControlAmount=Math.max(B, 60000);
}
else
{
ControlAmount=Math.max(d, 60000);
}
}
if(ControlAmount<=C)
{
D=ControlAmount;
}
else
{
D=C;
}
return D;
}
//退洪时对城陵矶进行补偿调度
public double DischargeAmountChenglingjiInRession(double A,double B,double B1,double B2,double B3,double C,double d,double F) //A当前水位;B当前入流量;F当前库容
{
double f=F+(B-40000)*24*3600/1000/1000/100;//预计算库容
double Co
评论0