Commit Graph

10 Commits

Author SHA1 Message Date
6d56dec9a9 测试迁移:ScenarioDrone/ScenarioUnit 精简后测试适配
- TestData 新增 CreateScenarioDrone/CreateScenarioUnit 等辅助方法
- 批量替换旧字段构造为 spec 引用
- 230/238 通过,8 个边缘测试待修
2026-06-18 17:01:13 +08:00
537671ab3a DroneProfile→ScenarioDrone / EquipmentDeployment→ScenarioUnit 重命名
- 模型表: ScenarioDrone(原DroneProfile) / ScenarioUnit(原EquipmentDeployment)
- ScenarioConfig.Equipment→Units
- 数据库旧表清理 + scenariosVersion 4→5
- 238 测试全过
2026-06-18 16:36:25 +08:00
ca0ce8aa52 重命名核心模型:TargetConfig→DroneProfile, SimTask→Scenario, TaskFullConfig→ScenarioConfig, TaskId→ScenarioId
- DroneType 枚举清理:移除 Electric/Piston,重编号 HighSpeed=2
- planner_config.json / defaults.json 同步迁移
- 238 单元测试全部通过
2026-06-18 15:02:58 +08:00
b3dec77e92 fix: DispersionModelTests 共享状态污染导致随机失败
Dissipates_AfterMaxDuration 直接用 Ammo() 返回的共享引用并修改 MaxDuration=2,后续 Phase2/Phase3 测试拿到被污染的数据

改为独立 new AmmunitionSpec 避免修改共享对象
2026-06-15 19:11:44 +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
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
a9339c36e3 feat: 编队2D模型 — LateralSpacing/LongitudinalSpacing + DroneEntity 纵向偏移
- RoutePlan: FormationSpacing→LateralSpacing, 新增LateralCount/LongitudinalCount/LongitudinalSpacing
- DroneEntity: 2D编队(latIdx/longIdx), 横向Y展开+纵向X落后
- DefaultFormations: 6种编队模板
- DroneEntityTests: 11个(含2D编队/2×2方队/蜂群)
- Planner: yLanes=ceil(formationWidth/cloudDiam), totalNeeded=single×lanes
2026-06-13 13:20:18 +08:00
be671c132e Phase 7: 删死代码DetectionEntity + TestPathProvider测试 + Swarm测试, 覆盖率93.5%, 123测试 2026-06-11 16:38:14 +08:00
2ef16d083c Phase 4 重构: 仿真引擎改为纯执行器 + Kinematics工具类 + 4个端到端场景(2个通过) 2026-06-11 15:09:53 +08:00