123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- #ifndef DATAEVALUATOR_H
- #define DATAEVALUATOR_H
- #include <QObject>
- #include "SchemePlanManager.h"
- class NodeMatrixInfo;
- class DataEvaluator : public QObject
- {
- Q_OBJECT
- public:
- enum GatherType
- {
- Result, // 结果集结
- Matrix // 矩阵集结
- };
- explicit DataEvaluator(QObject *parent = nullptr);
- void setProcess(SchemePlanManager::SchemeProcessInfo process);
- SchemePlanManager::SchemeProcessInfo process() const;
- void setGatherType(GatherType type);
- GatherType gatherType() const;
- bool evaluate();
- private:
- /// 运行算法
- bool evaluateWeightFromExpert(); // 权重分析,专家数据
- bool evaluateWeightFromMeasure(); // 权重分析,实测数据
- bool evaluateTech(); // 技术重要度评估, 指标得分
- bool evaluateScheme(); // 方案优选评估
- bool evaluateEfficiencyMEA(); // 效能评估, 物元分析法
- bool evaluateEfficiencyGCE(); // 效能评估, 灰色聚类法
- /// 准备数据
- bool getNodeData(QMap<QString, QMap<QString, NodeMatrixInfo *>> &nodeData) const;
- /// 获取算法
- bool getAlgorithm(SchemePlanManager::Algorithm &algorithm) const;
- /// 获取专家配置
- bool getUserConfig(QMap<QString, double> &cfg) const;
- /// 获取指标权重
- bool getWeightData(QMap<QString, double> &weightData) const;
- /// 获取方案数据
- /// int key: 方案 id
- /// QString key: 指标名称
- /// double value: 指标权重
- bool getSchemeData(QMap<int, QMap<QString, double>> &schemeData, QMap<int, QString> &schemeNames) const;
- /// 使用横坐标和纵坐标构造索引
- QString nodeDataKey(NodeMatrixInfo *data) const;
- private:
- SchemePlanManager::SchemeProcessInfo m_process;
- GatherType m_gatherType = Result;
- };
- #endif // DATAEVALUATOR_H
|