DataEvaluator.h 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. #ifndef DATAEVALUATOR_H
  2. #define DATAEVALUATOR_H
  3. #include <QObject>
  4. #include "SchemePlanManager.h"
  5. class NodeMatrixInfo;
  6. class DataEvaluator : public QObject
  7. {
  8. Q_OBJECT
  9. public:
  10. enum GatherType
  11. {
  12. Result, // 结果集结
  13. Matrix // 矩阵集结
  14. };
  15. explicit DataEvaluator(QObject *parent = nullptr);
  16. void setProcess(SchemePlanManager::SchemeProcessInfo process);
  17. SchemePlanManager::SchemeProcessInfo process() const;
  18. void setGatherType(GatherType type);
  19. GatherType gatherType() const;
  20. bool evaluate();
  21. private:
  22. /// 运行算法
  23. bool evaluateWeightFromExpert(); // 权重分析,专家数据
  24. bool evaluateWeightFromMeasure(); // 权重分析,实测数据
  25. bool evaluateTech(); // 技术重要度评估, 指标得分
  26. bool evaluateScheme(); // 方案优选评估
  27. bool evaluateEfficiencyMEA(); // 效能评估, 物元分析法
  28. bool evaluateEfficiencyGCE(); // 效能评估, 灰色聚类法
  29. /// 准备数据
  30. bool getNodeData(QMap<QString, QMap<QString, NodeMatrixInfo *>> &nodeData) const;
  31. /// 获取算法
  32. bool getAlgorithm(SchemePlanManager::Algorithm &algorithm) const;
  33. /// 获取专家配置
  34. bool getUserConfig(QMap<QString, double> &cfg) const;
  35. /// 获取指标权重
  36. bool getWeight(QMap<QString, double> &weight) const;
  37. /// 使用横坐标和纵坐标构造索引
  38. QString nodeDataKey(NodeMatrixInfo *data) const;
  39. private:
  40. SchemePlanManager::SchemeProcessInfo m_process;
  41. GatherType m_gatherType = Result;
  42. };
  43. #endif // DATAEVALUATOR_H