报告加推荐方案段落:弹药数/间距/拦截概率, 129测试通过

This commit is contained in:
tian 2026-06-12 11:53:17 +08:00
parent bf3f403b81
commit 5369c2a6aa
3 changed files with 30 additions and 6 deletions

View File

@ -133,6 +133,9 @@ namespace CounterDrone.Core.Algorithms
Source = "Algorithm",
PositionMode = (int)PositionMode.AlgorithmRecommended,
RecommendedTiming = recommendedTiming,
SalvoRounds = roundsNeeded,
SalvoSpacing = spacing,
EstimatedProbability = prob,
};
// 平台部署:假设齐射(同时发射),每门炮打一发后冷却 5s

View File

@ -45,5 +45,12 @@ namespace CounterDrone.Core.Models
public double? CriticalPosY { get; set; }
public double? CriticalPosZ { get; set; }
public double? CriticalTiming { get; set; }
/// <summary>推荐弹药数(算法填充)</summary>
public int SalvoRounds { get; set; }
/// <summary>云团展开间距m算法填充</summary>
public double SalvoSpacing { get; set; }
/// <summary>算法估计拦截概率(算法填充)</summary>
public double? EstimatedProbability { get; set; }
}
}

View File

@ -27,7 +27,6 @@ namespace CounterDrone.Core.Services
sb.AppendLine($"| 任务编号 | {config.Task.TaskNumber} |");
sb.AppendLine($"| 仿真耗时 | {simulationDuration:F1} 秒 |");
sb.AppendLine($"| 气溶胶类型 | {TranslateAerosol((AerosolType)config.Cloud.AerosolType)} |");
sb.AppendLine($"| 拦截概率(算法估计) | {(config.Cloud.Source == "Algorithm" ? "" : "")} |");
sb.AppendLine();
// === 一、环境 ===
@ -54,8 +53,23 @@ namespace CounterDrone.Core.Services
sb.AppendLine($"| 动力 | {TranslatePower((PowerType)(target?.PowerType ?? 0))} |");
sb.AppendLine();
// === 二、我方部署 ===
sb.AppendLine("## 三、我方部署");
// === 三、推荐方案 ===
if (config.Cloud.Source == "Algorithm" && config.Cloud.EstimatedProbability.HasValue)
{
sb.AppendLine("## 三、推荐方案");
sb.AppendLine();
sb.AppendLine($"| 参数 | 值 |");
sb.AppendLine($"|------|-----|");
sb.AppendLine($"| 气溶胶类型 | {TranslateAerosol((AerosolType)config.Cloud.AerosolType)} |");
sb.AppendLine($"| 弹药数 | {config.Cloud.SalvoRounds} 发 |");
sb.AppendLine($"| 云团间距 | {config.Cloud.SalvoSpacing:F0} m |");
sb.AppendLine($"| 拦截概率(算法估计) | {config.Cloud.EstimatedProbability.Value:P0} |");
sb.AppendLine($"| 抛撒时机 | {config.Cloud.RecommendedTiming:F0}s |");
sb.AppendLine();
}
// === 四、我方部署 ===
sb.AppendLine("## 四、我方部署");
sb.AppendLine();
sb.AppendLine($"| 装备 | 数量 |");
sb.AppendLine($"|------|------|");
@ -66,7 +80,7 @@ namespace CounterDrone.Core.Services
sb.AppendLine();
// === 三、事件时序 ===
sb.AppendLine("## 、事件时序");
sb.AppendLine("## 、事件时序");
sb.AppendLine();
sb.AppendLine("| 时间(s) | 事件 | 详情 |");
sb.AppendLine("|---------|------|------|");
@ -91,7 +105,7 @@ namespace CounterDrone.Core.Services
var launchTime = events.Where(e => e.Type == SimEventType.MunitionLaunched).Select(e => e.OccurredAt).DefaultIfEmpty(0).Min();
var cloudTime = events.Where(e => e.Type == SimEventType.CloudGenerated).Select(e => e.OccurredAt).DefaultIfEmpty(0).Min();
var destroyTime = events.Where(e => e.Type == SimEventType.DroneDestroyed).Select(e => e.OccurredAt).DefaultIfEmpty(0).Min();
sb.AppendLine("## 、时间线");
sb.AppendLine("## 、时间线");
sb.AppendLine();
sb.AppendLine($"| 阶段 | 时间 | 耗时 |");
sb.AppendLine($"|------|------|------|");
@ -109,7 +123,7 @@ namespace CounterDrone.Core.Services
var totalDrones = config.Targets.Sum(t => t.Quantity);
var result = DetermineInterceptResult(destroyed, reached + intruded, totalDrones);
sb.AppendLine("## 、结果统计");
sb.AppendLine("## 、结果统计");
sb.AppendLine();
sb.AppendLine($"| 统计项 | 值 |");
sb.AppendLine($"|--------|-----|");