parent
a6198f09c2
commit
1e2ef91da8
@ -0,0 +1,83 @@
|
||||
#ifndef DECISION_SUPPORT_SYSTEM_H
|
||||
#define DECISION_SUPPORT_SYSTEM_H
|
||||
|
||||
#include "DataStructures.h"
|
||||
#include <vector>
|
||||
#include <memory>
|
||||
#include <map>
|
||||
|
||||
namespace Battlefield {
|
||||
|
||||
class DecisionSupportSystem {
|
||||
public:
|
||||
DecisionSupportSystem();
|
||||
virtual ~DecisionSupportSystem() = default;
|
||||
|
||||
// 生成决策建议
|
||||
virtual std::vector<DecisionSuggestion> generateSuggestions(
|
||||
const BattlefieldSituation& situation,
|
||||
const std::map<std::string, double>& constraints) = 0;
|
||||
|
||||
// 评估决策效果
|
||||
virtual double evaluateDecision(const DecisionSuggestion& decision,
|
||||
const BattlefieldSituation& situation) = 0;
|
||||
|
||||
// 设置决策规则
|
||||
virtual void setRules(const std::map<std::string, std::string>& rules) = 0;
|
||||
|
||||
protected:
|
||||
std::map<std::string, double> ruleWeights_;
|
||||
double timeHorizon_{300.0}; // 决策时间范围(秒)
|
||||
};
|
||||
|
||||
// 战术决策系统
|
||||
class TacticalDecisionSystem : public DecisionSupportSystem {
|
||||
public:
|
||||
TacticalDecisionSystem();
|
||||
|
||||
std::vector<DecisionSuggestion> generateSuggestions(
|
||||
const BattlefieldSituation& situation,
|
||||
const std::map<std::string, double>& constraints) override;
|
||||
|
||||
double evaluateDecision(const DecisionSuggestion& decision,
|
||||
const BattlefieldSituation& situation) override;
|
||||
|
||||
void setRules(const std::map<std::string, std::string>& rules) override;
|
||||
|
||||
private:
|
||||
// 威胁应对决策
|
||||
DecisionSuggestion generateThreatResponse(
|
||||
const BattlefieldSituation& situation,
|
||||
const std::vector<IdentifiedTarget>& highThreatTargets);
|
||||
|
||||
// 侦察任务决策
|
||||
DecisionSuggestion generateReconnaissanceMission(
|
||||
const BattlefieldSituation& situation,
|
||||
const std::vector<GeoCoordinate>& unknownAreas);
|
||||
|
||||
// 防御部署决策
|
||||
DecisionSuggestion generateDefenseDeployment(
|
||||
const BattlefieldSituation& situation,
|
||||
const std::vector<GeoCoordinate>& criticalPoints);
|
||||
|
||||
// 古代防御工事保护决策
|
||||
DecisionSuggestion generateAncientFortificationProtection(
|
||||
const BattlefieldSituation& situation);
|
||||
|
||||
// 计算最优路径
|
||||
std::vector<GeoCoordinate> calculateOptimalPath(
|
||||
const GeoCoordinate& start,
|
||||
const GeoCoordinate& end,
|
||||
const std::vector<GeoCoordinate>& obstacles);
|
||||
|
||||
// 计算火力覆盖范围
|
||||
double calculateCoverageArea(const std::vector<GeoCoordinate>& positions,
|
||||
double effectiveRange) const;
|
||||
|
||||
std::vector<std::string> decisionTemplates_;
|
||||
std::map<std::string, double> resourceAvailability_;
|
||||
};
|
||||
|
||||
} // namespace Battlefield
|
||||
|
||||
#endif // DECISION_SUPPORT_SYSTEM_H
|
||||
Loading…
Reference in new issue