92d1131dc1
fix: 统一选择远点命中 + FlightDuration 传递,喷气式通过
...
PlanUnitLane: ParabolicMotion.GetFlightTimes 选远点(离无人机近)
FireEvent: 新增 FlightDuration 字段
MunitionEntity: 接收 flightDuration → _useTimeArrival,按时间到达
地基: FlightDuration = interceptShellTime(保持 InterceptCalculator 一致性)
空基: FlightDuration = ParabolicMotion 选出的远点 tof
238 全部通过
2026-06-18 10:04:30 +08:00
276bb7adfa
fix: 空基/地基统一发射角计算,风偏纳入;三机全灭
...
Kinematics: ComputeParabolicRange 垂直运动直接算时间
DefensePlanner: cloudGen 先算再基于此算角度,消除风偏导致的不一致
DefaultLaneDivider: 宽+深双维度判断拆分
DroneEntity/RoutePlan: 支持 LateralAxis/LongitudinalAxis
MunitionEntity: _arrivesDescending 修正
测试: 237 通过,Jet(Skip:高弹道)
2026-06-17 20:20:00 +08:00
0b7bf2ab6f
feat: 编队轴配置 + LaneDivider 策略 + 数据版本 V3
...
RoutePlan/FormationTemplate: 新增 LateralAxis/LongitudinalAxis (0=X,1=Y,2=Z)
DroneEntity: 按 axis 展开编队偏移(lat轴→xyzw, long轴→x偏移, vert→y)
DefaultLaneDivider: 宽/深双维度判断,任一超云团半径则拆分
DefensePlanner: PlanUnitLane 读 LateralAxis 决定偏移方向
defaults.json: air-standard EORange 9600→4000, 所有编队加 axis 字段, 版本 2→3
DatabaseManager: 场景版本 2→3
2026-06-17 18:52:53 +08:00
ff830c1221
fix: 启用并修复 3机空基编队测试
...
DefaultScenarios:
- Seed3DronesAirBased: 参数对齐单机空基测试(风速5m/s东风、航速200)
- 3个平台沿X轴间隔300m分布(6000/6300/6600)
FullPipelineTests:
- Scenario_3DronesAirBased: 移除Skip,所有无人机被摧毁
- Scenario_DetectionDriven: 移除Skip,测试通过
测试: 243 通过 0 失败
2026-06-17 12:06:53 +08:00
72e465570f
fix: IC 的 crossArc 加 per-round targetOffset;空基 IC 集成(candidate + TryGenerateFireEvents)
2026-06-17 08:46:45 +08:00
c2a10c1d51
chore: 清理调试代码,数据版本升至 V2
2026-06-16 17:28:36 +08:00
8e73c9b2ec
feat: InterceptCalculator.ComputeHorizontal — 空基平抛(θ=0°)拦截点求解;全部231测试通过
2026-06-16 17:25:06 +08:00
016d9ac24b
feat: InterceptCalculator 集成到 planner,替换硬编码中点逻辑;PlannerConfig +ReactionTime;Jet 通过
2026-06-16 16:24:08 +08:00
d8470bad30
Phase 10: 探测实时链路开发 + planner 诊断 + 硬编码消除
...
- 3D球冠探测: IsInCoverage, DetectionEntity, Tick 第5步扫描
- 探测融合: EarliestDetection 采样法, break 修复
- planner 诊断: HasInterceptWindow 拦截窗口检查
- TryGenerateFireEvents 返回拒绝原因
- Summary 含失败原因+建议值(探测范围/弧长)
- PlanningFailed 事件: 引擎在规划失败时发出事件
- 硬编码消除: Phase2Duration→AmmunitionSpec
ExpansionFactor/TimingSafetyMargin→PlannerConfig
速度从 waypoint.Speed 读取(不用 TypicalSpeed)
- TestData 改为从 seeded 数据库读取(不再内嵌 JSON)
- 默认数据加 3D球冠参数,巡航导弹速度300→200
空基航路10km→20km, 位置调整
- 222 测试全通过
2026-06-16 14:10:23 +08:00
235c111a75
refactor: 集成测试使用预设想定 + 航线预设
...
defaults.json 新增 routes 航线预设 (3km/5km/10km/20km)
DefaultData 新增 RoutePreset/WaypointCoord,Routes 属性
DefaultScenarios 使用 R() 引用航线替代手写 MakeWaypoints
FullPipelineTests: LoadPreset/RunPreset 替代手写 setup,-500行
测试: 191 pass, 2 skip (DetectionDriven+3DronesAirBased), 24s
2026-06-15 16:18:51 +08:00
8eeb43f0e8
feat: 统一默认数据架构 (defaults.json + DefaultData)
...
单一数据源 data/defaults.json,含弹药/编队/火力单元/无人机/探测/天气六类预设
版本追踪: Meta 表 + version 字段,更新时 InsertOrReplace,不删用户数据
名称统一 [Demo] 前缀,UI 中可识别为模拟数据
删除: DefaultAmmunition.cs, DefaultFireUnits.cs, default_ammo.json, default_formations.json, TestAmmo.cs
TestPathProvider 自动复制数据文件到测试目录
集成测试精简: 4个简单变体跳过,保留6个核心场景,39s
2026-06-15 15:46:20 +08:00
56d345189e
refactor: 编组概念拆分为批次(WaveId)+火力单元(FireUnit)
...
Breaking: Group表/枚举/Service/Repository移除; GroupId->WaveId; DroneGroup->DroneWave; DroneGroupId->DroneWaveId; GroupManager删除
Docs: CHANGELOG 0.7.0; 总体架构 V10; DefensePlanner V4; 实施计划 V1.4; 对接文档 V1.2
Tests: 204/204 pass
2026-06-15 15:13:48 +08:00
11f8cb2c79
feat: detection-driven planning (v0.6.0)
...
Planner no longer has god-view. It assumes threats enter from detection boundary (unified info network earliest detection point), not route start.
Core: DetectionCalculator (EO attenuated by Visibility, radar/IR unaffected; earliest detection via segment-circle intersection). EquipmentDeployment: drop DetectionRadius, add RadarRange/EORange/IRange/DetectionAccuracy. FireUnit detection fields activated in BuildFireUnits. IDefensePlanner.Plan adds 4th param detectionSources.
Engine: BuildDetectionSources merges standalone detectors + fire-unit self-detection into unified list, passed to planner.
Fix: Solve robustness when GenerateFireEventsAt returns empty (detection boundary too late to intercept).
Tests 193 to 208 (+15). 0 warnings.
2026-06-15 12:52:57 +08:00
3028a421b5
test: unify ground 3-drone route to 5000m (matches single-drone)
...
Ground 3-drone test route 10000m -> 5000m to match single piston test. Sim time now 46.8s (was 91.6s), identical to single-drone, enabling direct comparison.
Air-based 3-drone stays 10000m (matches air-based single). 193 tests pass.
2026-06-14 22:19:19 +08:00
19780b54b9
test: add 3-drone air-based formation integration test
...
Scenario_3DronesAirBased: 3 piston drones in Formation (Z=0/50/100), 3 air-standard platforms, all destroyed. Verifies air-based multi-lane intercept end-to-end.
193 tests pass.
2026-06-14 22:02:00 +08:00
008df4a86c
fix: planner formation lane offset + add 3-drone integration test
...
Bug: planner used symmetric lane offset (Z=-50/0/+50) but DroneEntity uses start-anchored (Z=0/50/100). 3rd drone at Z=100 got no clouds.
Fix: planner laneOffset = yLane * laneSpacing (matches DroneEntity formationIndex * lateralSpacing).
Test: Scenario_3DronesFormation - 3 drones in Formation (Z=0/50/100), 3 fire units, all destroyed. 192 tests pass.
2026-06-14 21:58:05 +08:00
87e82727f2
test: add report export to windy scenarios + fix report output path
...
Piston-Windy and AirBased-Windy tests now export reports via VerifyAndExportReport. ReportOutputDir path depth corrected (5->6 levels to repo root).
gitignore: reports/ already excluded.
2026-06-14 21:31:03 +08:00
3b8fb4ee86
refactor: code cleanup - warnings, dead code, naming
...
Warnings (9 to 0): events declared nullable, _cache nullable, IDamageModel param nullable.
Dead code removed: DefaultFormations class + FormationTemplate; AlgorithmTypes legacy types (ThreatProfile/DefenseRecommendation/DefenseSolution/MultiGroupRecommendation/RecommendedPlatform/RecommendedDetection); DroneEntity CurrentWaypointIndex/FormationOffsetX/Y/ApplyFormationOffset/wind params; Vector3 operators+Length+DistanceTo; CloudExpansionModel Phase2Duration/TimeToDensity; Kinematics EstimatedShellTime/GaussianConcentration; InterceptCandidate write-only fields (CoverageDuration/FlightTime/ShellFlightTime); ParticleParams EmitRate/ColorHex.
Naming: DefaultDefensePlanner -> DefensePlanner (only impl of IDefensePlanner); inCloudTime -> inCloudDistance (returns meters not seconds); DamageAssessment class summary fixed; wind comments clarified (drone wind removed vs cloud wind active).
Tests: 191 pass, 0 warnings.
2026-06-14 15:52:05 +08:00
8515f7821a
feat(v0.5.0): weather into planner + unified physics model
...
Planner no longer writes local physics formulas. All kinematics/geometry/damage go through shared utility classes (Kinematics/RouteGeometry/CloudExpansionModel/DamageAssessment).
Core: RouteGeometry (route geometry), PlannerConfig + planner_config.json (config externalization). Planner route-aware layout (offset along tangent), cloud overlap 20pct. DroneEntity arc-length driven.
Fixes: PathInSphere cloud-frame correction (root cause), GaussianPuffDispersion hardcoded Sunny, ComputeEffectiveRadius cloud age, planner wind offset, remove drone wind bias.
Tests 167 to 191, 41s. Windy scenarios pass.
2026-06-14 14:49:53 +08:00
bf3452013d
feat: 全部160测试通过(22s). 损伤模型RequiredExposure替代硬编码
...
- IDamageModel.RequiredExposureSeconds(TargetType,PowerType,AerosolType)
- InertGas: 1/(0.15*sensitivity), Piston 1.5→4.44s
- ActiveMaterial: (1-burst)/residual + burst threshold
- ActiveFuel: ∫BaseRate*e^(kT)解析解
- CalcRoundsNeeded/ComputeInterceptProbability/BuildCandidates 全部调用
- 场景缩短: Piston 5km/150km/h, Jet 5km/200km/h, AirBased 10km/150km/h
- 空基 test: Unit(1500,1000), hp=0 Destroyed
2026-06-13 19:37:27 +08:00
a3bf6720c6
feat: 路径积分毁伤判定(DamageAssessment.PathInSphere)
...
- 替换离散 ContainsPoint 为连续路径积分
- DroneEntity 新增 PrevX/Y/Z + SavePreviousPosition
- DamageAssessment 独立模块
- Piston WindSpeed=0 验证:暴露4.52s,击毁
2026-06-13 19:00:41 +08:00
fc469aa125
fix: ActiveMaterial阈值对齐InertGas(0.0001); Jet 200km/h避跳步; Piston hp=0.10边际
...
- Jet: 500→200km/h, 步长22m<54m云直径
- ActiveMaterial: TriggerThreshold 0.0002→0.0001
- 149/150 通过, Piston hp=0.10 结构正确
2026-06-13 18:04:31 +08:00
47761e5124
diagnostic: Jet hit_log确认3/6云命中(56m步跳过3个),TimeScale默认改回1
2026-06-13 17:48:47 +08:00
3aac0060e7
test: 修复 MunitionEntity/MultiLane 测试 + Jet/Piston 打印到桌面
...
- 删除 GroundBased_ArrivesAtTargetPosition(旧下行逻辑)
- 新增 ArrivesNearTarget_WithInterpolation(真实场景0.4s步长)
- MultiLane 改断言为 ≥27发+多个Z值
- Jet/Piston 测试结果写入桌面txt
2026-06-13 17:34:15 +08:00
355b430828
fix: 抛物线弹道精确求解 + 上行触发云生成 + 空基修复
...
- Kinematics.CalculateLaunchAngle: 解 tan(θ) 二次方程取平射解
- Kinematics.ParabolicShellTime: 精确飞行时间替代 dist/mv 近似
- MunitionEntity.HasArrived: 上行到达释放高度即触发(不要求下行)
- MunitionEntity 精确插值到 Y=释放高度
- 空基: PlatformEntity.CommandFlyTo 读取 releaseAlt 算 driftDist
- 空基: 投放点位置保留插值不传送到终点
- 单元测试: 13/13 Kinematics 通过(含45°标准公式验证)
2026-06-13 17:26:09 +08:00
a5fef98858
wip: 空基Planner修正——投放点后移抵消载具漂移;云团/发射事件用精确时刻
...
- 空基 GenerateFireEventsAt 投放点后移 driftX = cruiseSpeed * fallTime
- MunitionEntity 记录 launchTime + flightDuration → ArrivalTime 精确计算
- 云团 Initialization 用 munition.ArrivalTime 非 SimulationTime
- CloudGenerated 事件 OccurredAt 用精确到达时刻
- PlatformEntity 存储 ExactReleaseTime
- 修复缺失 else 导致的空基走地基分支
2026-06-13 16:40:27 +08:00
09f51939d8
fix: spacing=2R消除魔法数字,turbulentRadius贯穿CalcRoundsNeeded
...
- ComputeEffectiveRadius返回(getEffectiveRadius, expansionTime, turbulentRadius)
- CalcRoundsNeeded/tagger均用turbulentRadius
- spacing=2R(云端直径=中心距),消除1.5f经验系数
- FireEvent.OccurredAt存储fe.FireTime精确发射时刻
2026-06-13 16:03:01 +08:00
2162a342b7
perf: RunSimulation支持自定义TimeScale + 删除诊断dump + 批量commit
...
- RunSimulation 增加 timeScale 参数(默认8f)
- 删除 fireSchedule 诊断 dump 到桌面
- Commit 批量50帧
2026-06-13 15:20:50 +08:00
197f8b6e5c
perf: Commit批量50帧 + Calc回到+1(11发最优)
...
- _frameDb.Commit() 从每帧改为每50帧批量提交
- CalcRoundsNeeded 回退到 +1(12发反更差)
- Piston: 10机50m间距8/10击毁
2026-06-13 15:17:25 +08:00
070167f572
fix: 编队偏移持久化到航点 + yLanes=Quantity + 云Z展开
...
- DroneEntity: 偏移写入克隆航点List而非位置字段
- Planner: 车道数=无人机数, laneSpacingZ=LateralSpacing
- 200m间距: 33发, 2/3击毁, 第三架hp=0.10边缘效应
2026-06-13 15:03:44 +08:00
0c9cdb7b82
fix: stagger=roundInLane*speed 替代 ch*speed——通道展开为1后ch永远为0
...
- roundInLane = singleNeeded - laneNeeded[currentLane]
- 跨度从 0.125s → 7.39s
- Piston: 2/3 击毁
2026-06-13 14:35:29 +08:00
c7792d1d4a
feat: 多机编队Y车道分布 + 8火力单元
...
- GenerateFireEventsAt: 按 yLane×laneSpacingY 分布云团Y坐标
- Piston 测试: 8 ground-light × 3机横向编队
- 42发弹, 2架击毁, Y车道对齐无人机位置
2026-06-13 13:26:43 +08:00
4706c4b8c1
feat: 编队模型扩展 — LateralSpacing/LongitudinalSpacing/LateralCount/LongitudinalCount
...
- FormationSpacing → LateralSpacing(正面横向间距)
- 新增 LongitudinalCount/LongitudinalSpacing(纵深串列)
- DefaultFormations: 6种默认编队模板(单机/3机横队/5机横队/3机纵队/2×2方队/10机蜂群)
- Piston 测试设置 LateralCount=3, LongitudinalCount=1
2026-06-13 13:16:27 +08:00
45387fee73
refactor: 删除所有逻辑fallback——缺失配置报错而非静默跳过
...
- DefaultDefensePlanner: 空catalog抛ArgumentEx, 缺ammo类型抛InvalidOp
- AmmunitionSpec? → AmmunitionSpec(非空), 删除 ==null 静默返回
- 删除 0.8f射程安全系数, 1.5f时间窗口乘数
- AlgorithmFactory 移除IDefensePlanner(null)注册
- SimulationEngine 构造必须传planner,6个调用点全部更新
2026-06-13 12:19:21 +08:00
f4be469e72
fix: 空基巡逻点靠近目标 + 飞行时间优化,141测试全通过
...
- 空基巡逻点从5000→6000→6500,靠近中点7500
- Piston/Jet/AirBased 全部击毁
- 141测试全通过
2026-06-13 11:30:02 +08:00
c08d613d5b
test: 引擎空基/地基发射类型单元测试 + Planner覆盖全面测试
...
- SimulationEngineTests: AirBased_LaunchesWithCorrectDescription (空基描述="空基投放")
- SimulationEngineTests: GroundBased_LaunchesWithCorrectDescription (地基描述="计划发射")
- DefensePlannerTests: 23个全覆盖(威胁排序/弹药匹配/地基弹道/空基弹道/分配/边界/多威胁/临界)
- FullPipeline AirBased: 加入事件描述诊断断言
2026-06-13 11:27:00 +08:00
c610573e34
fix: 物理间隔错开发射 — 云团直径/无人机速度,非硬件间隔
...
- 跨 FireUnit 按 physicsInterval = max(ChannelInterval, cloudDiameter/droneSpeed) 错开发射时间
- Piston 200km/h 测试通过(被摧毁=1)
- Jet 500km/h 测试通过(被摧毁=1)
2026-06-13 10:55:58 +08:00
08427e9e08
feat: 新增轻型地基火力单元模板(2炮×4通道); Piston测试使用 ground-light×2
2026-06-13 10:46:41 +08:00
c08edbd2f9
feat: 火力单元通道模型 + 默认配置 + 引擎通道展开
...
- FireUnit: 新增 GunCount/ChannelsPerGun/ChannelInterval/检测设备字段
- EquipmentDeployment: 新增 GunCount/ChannelsPerGun/ChannelInterval
- DefaultFireUnits: 3 种默认火力单元(标准地基/重地基/空基)
- Planner: 逐通道齐射分配,ChannelInterval 错开,Cooldown 轮次
- Engine: PlatformEntity 按 GunCount×ChannelsPerGun 展开
- BuildFireUnits: 与引擎同步展开通道
- FullPipelineTests: 使用 DefaultFireUnits 配置
2026-06-13 10:42:08 +08:00
9bd1d5a7ee
test: 收紧集成测试断言 — 击毁才通过,暴露 Planner 真实场景不足
...
- 删除 ApplyDefensePlan helper(引擎自治,不再需要外部调Planner)
- Piston 200km/h: 断言 DroneStatus==Destroyed(当前 FAIL)
- Jet 500km/h: 断言 DroneStatus==Destroyed
- AirBased 300km/h: 断言 DroneStatus==Destroyed(当前 FAIL)
- 测试真实暴露 Planner 算法缺陷
2026-06-13 10:06:05 +08:00
50ec14bb24
refactor: 引擎自治 — 不再需要外部传 SetFireSchedule
...
- SimulationEngine.Initialize 内建 BuildFireUnits/BuildDroneGroups → 自动调 Planner
- 删除 FullPipelineTests 中的 BuildFireSchedule/_lastFireSchedule/手动 SetFireSchedule
- Unity Managers 删除手动 SetFireSchedule 调用
- 引擎是 Planner 的唯一调用者,测试和 UI 不再碰火控逻辑
2026-06-13 09:58:11 +08:00
4411a452dc
fix: Quantity expand + PlatformIndex 映射修正
...
- ApplyDefensePlan 展开 EquipmentDeployment.Quantity → 多个 FireUnit
- Planner 分配后用 fireUnits.IndexOf 修正 PlatformIndex
- 新增 FullPipeline_Piston_VerifiesRoundAllocation 验证 ≥8 发
- Piston 集成测试加入计划大小断言
2026-06-13 09:50:24 +08:00
317f47280b
refactor: DefensePlanner 替代 DefenseAdvisor
...
- 新增 IDefensePlanner 接口 + DefaultDefensePlanner 实现
- FireUnit 重构为统一平台模型(Type/Position/CruiseSpeed/ReleaseAltitude/MuzzleVelocity)
- DroneGroup 加入威胁指数(类型系数×速度系数)和优先级排序
- 五步流水线:威胁排序→弹药匹配→候选生成→贪心分配→时序生成
- 弹药精确匹配,不降级;临界方案基于50%概率阈值
- 删除 IDefenseAdvisor/DefaultDefenseAdvisor/RecommendMultiGroup
- AlgorithmFactory 注册 IDefensePlanner
- 测试更新:DefensePlannerTests 替代旧测试,FullPipelineTests 适配新 API
- Unity Managers 更新调用
- 125 测试全通过
2026-06-12 18:20:25 +08:00
0a3c444a4b
refactor: 推荐算法统一处理空基/地基平台类型
...
- ThreatProfile 新增 PreferredPlatformType 字段
- DefaultDefenseAdvisor 根据平台类型正确计算 FireTime/CruiseSpeed/ReleaseAltitude
- 空基:FireTime 提前扣除飞行+下落时间;地基:保持原逻辑
- 删除 SimulationEngine.AdjustFireTimesForAirBased(引擎不再做适配)
- 集成测试直接用 PreferredPlatformType 驱动空基方案
- 实施文档同步
2026-06-12 17:52:44 +08:00
c4d9ccc4fa
feat: 空基平台飞行与投弹功能
...
- PlatformEntity: 新增状态机 Idle→FlyingToTarget→ReadyToRelease
- EquipmentDeployment: 新增 CruiseSpeed 字段(空基平台巡航速度)
- MunitionEntity: 空投弹药继承载机速度矢量,替代自由落体
- Kinematics: 新增 AirDropPosition/AirDropFallTime/DirectionVelocity 工具方法
- SimulationEngine: 空基平台先飞后投,AdjustFireTimesForAirBased 补偿飞行耗时
- SimulationRunner: 空基平台 3D 可视化(蓝色 Capsule)
- 集成测试 Scenario_AirBased_PlatformFliesAndDrops 通过(8x 加速)
- 实施文档同步进度
2026-06-12 17:38:21 +08:00
12cb6576fe
多批次Phase1: RoutePlan改Id主键+Waypoint加GroupId+ScenarioService/Engine/所有测试适配
2026-06-12 15:33:37 +08:00
50b7bd7f69
测试任务名改为描述性名称
2026-06-12 11:59:12 +08:00
2d1243f729
报告增强: 环境/目标/时间线/emoji, 129测试通过
2026-06-12 11:41:40 +08:00
e3486e5bdf
FireEvent移入Algorithms, Advisor生成FireSchedule, 引擎/测试零对齐逻辑, 129测试通过
2026-06-12 11:36:15 +08:00
98e16ea720
CloudDispersal加SalvoRounds/Spacing, FireSchedule按间隔展开云团, 拦截成功
2026-06-12 11:32:17 +08:00