eis/eqpalg/.do_not_use/alg_to_transfer/AlgExpHS.h

71 lines
1.7 KiB
C
Raw Normal View History

/******************************************************************************************************************
* Action instruction algorithm
*
* arg[0] data determination expression
*
*
*
* 1.0 2020-12-17 zoufuzhou
******************************************************************************************************************/
#ifndef _H_ALGORITHM_HS_EXPRESSION_H
#define _H_ALGORITHM_HSL_EXPRESSION_H
#include <eqpalg/AlgCommonDefine.h>
#include <eqpalg/algs/AlgExp.h>
#include <eqpalg/stat_tools/NormalDistribution.h>
#include <glob/MathExpression.h>
#include <iomanip>
#include <iostream>
#include <mix_cc/db2.h>
#include <string>
#include <zcus/IHDBTools.h>
#include <zlib/MemTable.hpp>
#include <zlib/MemTrk.h>
#include <zlib/coilDef.h>
class AlgExpHS : virtual public AlgExp // AlgBase
{
public:
AlgExpHS(const string name, const Json::Value rulejson, const string ruleId);
virtual ~AlgExpHS();
public:
virtual int init() override;
virtual Json::Value exec_mon();
private:
CMemTrk *mp_trk;
CMemTable<PDI> *pt_pdi;
string m_entId;
int m_startpos;
int m_endpos;
int m_zone;
std::string sample_tag_str_;
std::string temp_tag_str_;
struct SampleDataPolyfit {
bool calculated_;
std::vector<double> coeff_;
std::vector<double> x_;
std::vector<double> y_;
};
MathExpression *exp_act_;
NormalDistribution nd_;
int LoadData();
int StorageData(std::string steel_grade, double thickness, double width,
double speed, double temp, std::string tag_name, double data);
std::tuple<std::string, int, int> GetSteelGrade(std::string EntId);
mix_cc::DBCom db_com_;
// 规格 数据
std::map<std::string, SampleDataPolyfit> inner_data_;
};
#endif