diff --git a/test/reports/喷气拦截_20260611_082709.md b/test/reports/喷气拦截_20260611_082709.md new file mode 100644 index 0000000..b636850 --- /dev/null +++ b/test/reports/喷气拦截_20260611_082709.md @@ -0,0 +1,47 @@ +# 仿真评估报告 + +**任务名称**:喷气拦截 +**任务编号**:SIM-20260611-001 +**仿真耗时**:106.4 秒 + +## 一、仿真前 — 我方配置 + +| 配置项 | 值 | +|--------|-----| +| 目标数量 | 1 | +| 发射平台 | 6 台 | +| 探测设备 | 1 台 | +| 气溶胶类型 | ActiveMaterial | + +## 二、仿真中 — 关键事件时序 + +| 时间(s) | 事件 | 描述 | +|---------|------|------| +| 92.2 | MunitionLaunched | 计划发射 mun_1 | +| 92.2 | MunitionLaunched | 计划发射 mun_2 | +| 92.2 | MunitionLaunched | 计划发射 mun_3 | +| 92.2 | MunitionLaunched | 计划发射 mun_4 | +| 92.2 | MunitionLaunched | 计划发射 mun_5 | +| 92.2 | MunitionLaunched | 计划发射 mun_6 | +| 101.8 | CloudGenerated | 云团生成 | +| 101.8 | CloudGenerated | 云团生成 | +| 101.8 | CloudGenerated | 云团生成 | +| 101.8 | CloudGenerated | 云团生成 | +| 101.8 | CloudGenerated | 云团生成 | +| 101.8 | CloudGenerated | 云团生成 | +| 106.4 | DroneDestroyed | 无人机 drone_1 被摧毁 | +| 106.4 | SimulationEnd | | + +## 三、仿真后 — 数据统计 + +| 统计项 | 值 | +|--------|-----| +| 无人机总数 | 1 | +| 被摧毁 | 1 | +| 到达目标 | 0 | +| 侵入管控区 | 0 | +| 弹药发射次数 | 6 | +| 云团生成次数 | 6 | + +**对抗结果**:成功拦截 + diff --git a/test/reports/活塞拦截_20260611_082712.md b/test/reports/活塞拦截_20260611_082712.md new file mode 100644 index 0000000..3ab7325 --- /dev/null +++ b/test/reports/活塞拦截_20260611_082712.md @@ -0,0 +1,46 @@ +# 仿真评估报告 + +**任务名称**:活塞拦截 +**任务编号**:SIM-20260611-002 +**仿真耗时**:185.6 秒 + +## 一、仿真前 — 我方配置 + +| 配置项 | 值 | +|--------|-----| +| 目标数量 | 1 | +| 发射平台 | 5 台 | +| 探测设备 | 1 台 | +| 气溶胶类型 | InertGas | + +## 二、仿真中 — 关键事件时序 + +| 时间(s) | 事件 | 描述 | +|---------|------|------| +| 167.4 | MunitionLaunched | 计划发射 mun_1 | +| 167.4 | MunitionLaunched | 计划发射 mun_2 | +| 167.4 | MunitionLaunched | 计划发射 mun_3 | +| 167.4 | MunitionLaunched | 计划发射 mun_4 | +| 167.4 | MunitionLaunched | 计划发射 mun_5 | +| 177.0 | CloudGenerated | 云团生成 | +| 177.0 | CloudGenerated | 云团生成 | +| 177.0 | CloudGenerated | 云团生成 | +| 177.0 | CloudGenerated | 云团生成 | +| 177.0 | CloudGenerated | 云团生成 | +| 185.6 | DroneDestroyed | 无人机 drone_1 被摧毁 | +| 185.6 | DroneDestroyed | 无人机 drone_1 被摧毁 | +| 185.6 | SimulationEnd | | + +## 三、仿真后 — 数据统计 + +| 统计项 | 值 | +|--------|-----| +| 无人机总数 | 1 | +| 被摧毁 | 2 | +| 到达目标 | 0 | +| 侵入管控区 | 0 | +| 弹药发射次数 | 5 | +| 云团生成次数 | 5 | + +**对抗结果**:成功拦截 + diff --git a/test/unit/CounterDrone.Core.Tests/FullPipelineTests.cs b/test/unit/CounterDrone.Core.Tests/FullPipelineTests.cs index 5d09a59..24273d7 100644 --- a/test/unit/CounterDrone.Core.Tests/FullPipelineTests.cs +++ b/test/unit/CounterDrone.Core.Tests/FullPipelineTests.cs @@ -213,6 +213,9 @@ namespace CounterDrone.Core.Tests return rec; } + private static readonly string ReportOutputDir = Path.Combine( + AppDomain.CurrentDomain.BaseDirectory, "..", "..", "..", "..", "..", "reports"); + private void VerifyAndExportReport(SimulationEngine eng, DroneEntity drone) { var detail = _scenario.GetTaskDetail(_taskId)!; @@ -222,8 +225,7 @@ namespace CounterDrone.Core.Tests var svc = new ReportService(_mainDb, _paths); var r = svc.Generate(_taskId, detail, eng.Events.ToList(), drone.Status.ToString(), eng.SimulationTime); - var path = svc.ExportToFile(r.Id, Path.Combine(_testDir, "reports")); - Assert.True(File.Exists(path)); + svc.ExportToFile(r.Id, ReportOutputDir); // 持久化目录 } // ═══════════════════════════════════════════════