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

📄 plant.h

📁 求解梯级水库群优化调度
💻 H
字号:
#ifndef  _PLANT_H_
#define  _PLANT_H_
#pragma warning(disable:4786)
#include <vector>
#include <algorithm>
#include <string>
#include <iostream>
#include <math.h>
#include <windows.h>
using namespace std;

class CPlant
{
public:

	static int SectionNum;//时段数
	static int PlantNum;//电站数
	static int ParamNum;//库容水位,发电流量尾水位曲线参数个数
	double SectionTime;//时段时间,新增加////////////////////////////
//private:	
	string PlantName;//电站名称
	int PlantSerial;//电站序号
	int StartSectionSerial;//电站开始时段序号
	double EvageCoeff;  //电站综合出力系数
    double StartLevel;  //初始水位
	double StoredPrice;//存水价值,只有调度期末存水才有价值
	double NormalLevel;//正常蓄水位
	double DeadLevel;//死水位
	double LimitLevel;//汛期限制水位
	double DesignLevel;//设计洪水位
	double CheckLevel;//校核洪水位
	double HighLevel;//防洪高水位
	double LevelLostParam;//水头损失参数新增参数///////////////////////////////
	double EvageLevelLost;//平均水头损失,新增参数/////////////////////////////
	vector<double > MaxWaterLevel;//时段最大水位
	vector<double > MinWaterLevel;//时段最小水位
	vector<double > MaxPower;//时段最大出力
	vector<double > MinPower;//时段最小出力
	vector<double > MaxDownFlow;//最大下泄流量
	vector<double > MinDownFlow;//最小下泄流量
	vector<double > MaxPowerFlow;//最大发电引用流量
	vector<double > MinPowerFlow;//最小发电引用流量
	vector<double > SectionIntervalFlow;//时段区间来水流量
	vector<double > SectionPowerPrice;//时段电价
	vector<double > VolumeLevelParam;//库容水位关系参数表,由水位求库容,
	vector<double > TailFlowParam;//尾水位下泄流量参数表,由下泄流量求尾水位	
	vector<double > LevelVolumeParam;//水位库容关系参数表,由库容求水位
	vector<double > SectionPower;//电站时段出力/////////////////init
	vector<double > SectionPowerFlow;//电站时段发电流量///////////init
    vector<double > SectionDischarge;//电站那时段弃水流量/////////init
	vector<double > SectionWaterLevel;//电站期末水位///////////init
	double StepLength;//电站步长///////////////
	double WaterRate;//耗水率//////////////////
	double RatePowerLevel;/////////
	double EvageTailLevel;////
public:

	CPlant();//默认构造函数
	CPlant(string name,int serial,double coeff,double level,double storedprice);
	CPlant(string name,string filepath);
	CPlant(const CPlant &cpt);//复制构造函数
	~CPlant();
	void Init();//初始化
	int FloadPlantParam(string plant,string filepath);//读取电站参数,
	int FloadPlantParam(string dbname,string userid,string password,int modelid);//从数据库读取电站参数信息
    void InitVector(vector<double > &vec,int n);//初始化vec为n个0

	int GetSectionNum();//获取时段时间
	int GetPlantNum();//获取参与电站数
    int GetParamNum();//获取参数个数
	double GetSectionTime();//获取时段时间
	string GetPlantName();//获取电站名称
	int GetStartSectionSerial();//获取开始序号
	double GetEvageCoeff();//获取综合出力系数
	double GetStartLevel();//获取开始水位
	double GetStoredPrice();//获取存水价格
	double GetNormalLevel();//正常蓄水位
	double GetDeadLevel();//死水位
	double GetLimitLevel();//汛期限制水位
	double GetDesignLevel();//设计洪水位
	double GetCheckLevel();//校核洪水位
	double GetHighLevel();//防洪高水位
	double GetLevelLostParam();//获取水头损失系数
    double GetMaxWaterLevel(int m);//
	double GetMinWaterLevel(int m);
	double GetMaxPower(int m);
	double GetMinPower(int m);
	double GetMaxPowerFlow(int m);
	double GetMinPowerFlow(int m);
	double GetMaxDownFLow(int m);
	double GetMinDownFlow(int m);
	double GetSectionIntervalFlow(int m);
	double GetVolumeLevelParam(int m);
	double GetTailFlowParam(int m);
	double GetSectionPowerPrice(int m);
	double GetLevelVolumeParam(int m);
	double GetSectionPower(int m);//得到电站时段出力//////////////////////////////////
	double GetSectionPowerFlow(int m);
	double GetSectionDischarge(int m);
	double GetSectionWaterLevel(int m);
    double GetEvageLevelLost();//得到平均水头损失
	double GetPowerFlow(double power,double start_level,double end_level,double last_down,int section);//由水库起初期末水位求其平均发电流量
	double GetPowerFlow(int section,double last_down);//给订时段,和下泄流量由期初水位期末水位求电站发电流量
	double GetPlantVolume(double level);//返回电站level水位时库容
	double GetPlantLevel(double volume);//返回电站volume库容时水位
	double GetPlantTailLevel(double downflow);//返回电站downflow下泄时尾水位
	double GetPlantLostLevel(double powerflow);//返回电站powerflow发电流量时水头损失
	double GetPlantStepLength();//返回电站步长
	double GetEvageTailLevel();//获取平均尾水位
	double GetRatePowerLevel();	//额定发电水头?
	double GetPlantDownFlow(double sl,double el,int section,double lastdown);
	void GetMaxMinLevel(double &max,double &min,int section,double lastdown);
	void GetMaxMinLevel(double &max, double &min,double sl,double lastdown,int section);//获取最大最小水位限制
	double GetStoredValue(double volume,double userate);
	double GetWaterRate();//获取耗水率
	double GetProfitOfPower();//获取发电效益
	int SetConfiguration();
	void SetPlantStepLength(double length);//设置电站步长
	void SetSectionDischarge(int section,double discharge);
	void SetSectionWaterLevel(int section,double level);
	void SetSectionPowerFlow(int section,double powerflow);
	void SetSectionPower(int section,double power);
};
#endif

⌨️ 快捷键说明

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