eis/eqpalg/.do_not_use/no_need/AlgCarJam.h

43 lines
935 B
C
Raw Normal View History

#ifndef _H_ALGORITHM_CAR_JAM_H
#define _H_ALGORITHM_CAR_JAM_H
#include <eqpalg/AlgCommonDefine.h>
#include <eqpalg/alg_base.h>
#include <queue>
const int SAMPLE_NUM = 1000;
const int BACK_WORD = 1;
class AlgCarJam:virtual public AlgBase
{
public:
AlgCarJam(const string name,const Json::Value rulejson, const string ruleId);
virtual ~AlgCarJam();
public:
virtual int init() override;
virtual int calculate(string& outjson);
private:
//slide avg queue cache
double m_sum;
std::shared_ptr<IHDBTools> ihdb;
//CMemTable<T_LOV_FDAAITEM::STR_T_LOV_FDAAITEM>* pFDAA;
//
HD3TimeRegion timeRegion;
HD3Record **records_queried_;
private:
bool have_sample;
time_t m_curr, m_start, m_end;
double ave_curr_noload[SAMPLE_NUM];
double ave_curr_load[SAMPLE_NUM];
double limit_curr_noload[SAMPLE_NUM];
double limit_curr_load[SAMPLE_NUM];
bool work_finished;
};
#endif