DataEvaluator.h 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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 evaluateTechFromExpert(); // 技术重要度评估,专家数据
  26. bool evaluateTechFromMeasure(); // 技术重要评估,实测数据
  27. bool evaluateScheme(); // 方案优选评估
  28. bool evaluateEfficiencyMEA(); // 效能评估, 物元分析法
  29. bool evaluateEfficiencyGCE(); // 效能评估, 灰色聚类法
  30. /// 准备数据
  31. bool getNodeData(QMap<QString, QMap<QString, NodeMatrixInfo *>> &nodeData) const;
  32. /// 获取算法
  33. bool getAlgorithm(SchemePlanManager::Algorithm &algorithm) const;
  34. /// 使用横坐标和纵坐标构造索引
  35. QString nodeDataKey(NodeMatrixInfo *data) const;
  36. private:
  37. SchemePlanManager::SchemeProcessInfo m_process;
  38. GatherType m_gatherType = Result;
  39. };
  40. #endif // DATAEVALUATOR_H