📄 base.h
字号:
/****************************************************************
*****************************************************************
* *
* 水资源优化调度基础类 作者:张景瑞 时间:2008.7.29 *
* *
*****************************************************************
****************************************************************/
# ifndef _BASE_H_
# define _BASE_H_
#include <math.h>
#include <iostream>
#include <time.h>
#define ERR_WATER_LEVEL 1
#define ERR_POWER_FLOW 1
#define ERR_DISCHARGE 1
using namespace std;
class StepVector
{
public:
StepVector();
StepVector(const StepVector &st);
StepVector(double m,double n,double k);
~StepVector();
double GetStepWaterLevel();
double GetStepPowerFlow();
double GetStepDischarge();
void SetStepWaterLevel(double sw);
void SetStepPowerFlow(double sp);
void SetStepDischarge(double sd);
void SetStep(double sw,double sp,double sd);
private:
double StepWaterLevel; //期末水位步长
double StepPowerFlow; //发电流量步长
double StepDischarge; //弃水流量步长
};
class Status
{
public:
Status();
Status(const Status &st);
Status(double m,double n,double k);
~Status();
bool operator==(const Status &st);
double GetWaterLevel();
double GetPowerFlow();
double GetDischarge();
void SetWaterLevel(double w);
void SetPowerFlow(double p);
void SetDischarge(double d);
void SetStatus(double w,double p,double d);
private:
double WaterLevel; //期末水库水位
double PowerFlow; //时段内发电引用流量
double Discharge;//时段内弃水流量
};
# endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -