| | 1 | | using System; |
| | 2 | | using System.Collections; |
| | 3 | | using System.Collections.Generic; |
| | 4 | | using System.IO; |
| | 5 | | using System.Linq; |
| | 6 | | using UnityEngine; |
| | 7 | |
|
| | 8 | | // Integrated Air Defense System. |
| | 9 | | public class IADS : MonoBehaviour { |
| 0 | 10 | | public static IADS Instance { get; private set; } |
| | 11 | |
|
| | 12 | | private const float LaunchInterceptorsPeriod = 0.4f; |
| | 13 | | private const float CheckForEscapingThreatsPeriod = 5.0f; |
| | 14 | | private const float ClusterThreatsPeriod = 2.0f; |
| | 15 | |
|
| | 16 | | // TODO(titan): Choose the CSV file based on the interceptor type. |
| 0 | 17 | | private ILaunchAnglePlanner _launchAnglePlanner = |
| | 18 | | new LaunchAngleCsvInterpolator(Path.Combine("Planning", "hydra70_launch_angle.csv")); |
| 0 | 19 | | private IAssignment _assignmentScheme = new MaxSpeedAssignment(); |
| | 20 | | private Coroutine _launchInterceptorsCoroutine; |
| | 21 | |
|
| | 22 | | [SerializeField] |
| 0 | 23 | | private List<TrackFileData> _trackFiles = new List<TrackFileData>(); |
| 0 | 24 | | private Dictionary<Agent, TrackFileData> _trackFileMap = new Dictionary<Agent, TrackFileData>(); |
| | 25 | |
|
| 0 | 26 | | private List<Interceptor> _assignmentQueue = new List<Interceptor>(); |
| 0 | 27 | | private List<Cluster> _threatClusters = new List<Cluster>(); |
| 0 | 28 | | private Dictionary<Cluster, ThreatClusterData> _threatClusterMap = |
| | 29 | | new Dictionary<Cluster, ThreatClusterData>(); |
| 0 | 30 | | private Dictionary<Interceptor, Cluster> _interceptorClusterMap = |
| | 31 | | new Dictionary<Interceptor, Cluster>(); |
| 0 | 32 | | private HashSet<Interceptor> _assignableInterceptors = new HashSet<Interceptor>(); |
| | 33 | |
|
| 0 | 34 | | private HashSet<Threat> _threatsToCluster = new HashSet<Threat>(); |
| | 35 | | private Coroutine _checkForEscapingThreatsCoroutine; |
| | 36 | | private Coroutine _clusterThreatsCoroutine; |
| | 37 | |
|
| 0 | 38 | | private int _trackFileIdTicker = 0; |
| | 39 | |
|
| 0 | 40 | | private void Awake() { |
| 0 | 41 | | if (Instance == null) { |
| 0 | 42 | | Instance = this; |
| 0 | 43 | | } else { |
| 0 | 44 | | Destroy(gameObject); |
| 0 | 45 | | } |
| 0 | 46 | | } |
| | 47 | |
|
| 0 | 48 | | private void OnDestroy() { |
| 0 | 49 | | if (_launchInterceptorsCoroutine != null) { |
| 0 | 50 | | StopCoroutine(_launchInterceptorsCoroutine); |
| 0 | 51 | | } |
| 0 | 52 | | if (_checkForEscapingThreatsCoroutine != null) { |
| 0 | 53 | | StopCoroutine(_checkForEscapingThreatsCoroutine); |
| 0 | 54 | | } |
| 0 | 55 | | if (_clusterThreatsCoroutine != null) { |
| 0 | 56 | | StopCoroutine(_clusterThreatsCoroutine); |
| 0 | 57 | | } |
| 0 | 58 | | } |
| | 59 | |
|
| 0 | 60 | | public void Start() { |
| 0 | 61 | | SimManager.Instance.OnSimulationStarted += RegisterSimulationStarted; |
| 0 | 62 | | SimManager.Instance.OnSimulationEnded += RegisterSimulationEnded; |
| 0 | 63 | | SimManager.Instance.OnNewThreat += RegisterNewThreat; |
| 0 | 64 | | SimManager.Instance.OnNewInterceptor += RegisterNewInterceptor; |
| 0 | 65 | | } |
| | 66 | |
|
| 0 | 67 | | public void LateUpdate() { |
| | 68 | | // Update the cluster centroids. |
| 0 | 69 | | foreach (var cluster in _threatClusters) { |
| 0 | 70 | | cluster.Recenter(); |
| 0 | 71 | | _threatClusterMap[cluster].UpdateCentroid(); |
| 0 | 72 | | } |
| | 73 | |
|
| | 74 | | // Assign any interceptors that are no longer assigned to any threat. |
| 0 | 75 | | AssignInterceptorToThreat( |
| 0 | 76 | | _assignableInterceptors.Where(interceptor => !interceptor.HasTerminated()).ToList()); |
| 0 | 77 | | } |
| | 78 | |
|
| 0 | 79 | | private void RegisterSimulationStarted() { |
| 0 | 80 | | _launchInterceptorsCoroutine = |
| | 81 | | StartCoroutine(LaunchInterceptorsManager(LaunchInterceptorsPeriod)); |
| 0 | 82 | | _checkForEscapingThreatsCoroutine = |
| | 83 | | StartCoroutine(CheckForEscapingThreatsManager(CheckForEscapingThreatsPeriod)); |
| 0 | 84 | | _clusterThreatsCoroutine = StartCoroutine(ClusterThreatsManager(ClusterThreatsPeriod)); |
| 0 | 85 | | } |
| | 86 | |
|
| 0 | 87 | | private IEnumerator LaunchInterceptorsManager(float period) { |
| 0 | 88 | | while (true) { |
| | 89 | | // Check whether an interceptor should be launched at a cluster and launch it. |
| 0 | 90 | | CheckAndLaunchInterceptors(); |
| 0 | 91 | | yield return new WaitForSeconds(period); |
| 0 | 92 | | } |
| | 93 | | } |
| | 94 | |
|
| 0 | 95 | | private void CheckAndLaunchInterceptors() { |
| 0 | 96 | | foreach (var cluster in _threatClusters) { |
| | 97 | | // Check whether an interceptor has already been assigned to the cluster. |
| 0 | 98 | | if (_threatClusterMap[cluster].Status != ThreatClusterStatus.UNASSIGNED) { |
| 0 | 99 | | continue; |
| | 100 | | } |
| | 101 | |
|
| | 102 | | // Check whether all threats in the cluster have terminated. |
| 0 | 103 | | bool allTerminated = cluster.Threats.All(threat => threat.IsTerminated()); |
| 0 | 104 | | if (allTerminated) { |
| 0 | 105 | | continue; |
| | 106 | | } |
| | 107 | |
|
| | 108 | | // Create a predictor to track the cluster's centroid. |
| 0 | 109 | | IPredictor predictor = new LinearExtrapolator(_threatClusterMap[cluster].Centroid); |
| | 110 | |
|
| | 111 | | // Create a launch planner. |
| 0 | 112 | | ILaunchPlanner planner = new IterativeLaunchPlanner(_launchAnglePlanner, predictor); |
| 0 | 113 | | LaunchPlan plan = planner.Plan(); |
| | 114 | |
|
| | 115 | | // Check whether an interceptor should be launched. |
| 0 | 116 | | if (plan.ShouldLaunch) { |
| 0 | 117 | | Debug.Log( |
| | 118 | | $"Launching a carrier interceptor at an elevation of {plan.LaunchAngle} degrees to position {plan.InterceptP |
| 0 | 119 | | UIManager.Instance.LogActionMessage( |
| | 120 | | $"[IADS] Launching a carrier interceptor at an elevation of {plan.LaunchAngle} degrees to position {plan.Int |
| | 121 | |
|
| | 122 | | // Create a new interceptor. |
| 0 | 123 | | DynamicAgentConfig config = |
| | 124 | | SimManager.Instance.SimulationConfig.interceptor_swarm_configs[0].dynamic_agent_config; |
| 0 | 125 | | InitialState initialState = new InitialState(); |
| | 126 | |
|
| | 127 | | // Set the initial position, which defaults to the origin. |
| 0 | 128 | | initialState.position = Vector3.zero; |
| | 129 | |
|
| | 130 | | // Set the initial velocity to point along the launch vector. |
| 0 | 131 | | initialState.velocity = plan.GetNormalizedLaunchVector() * 1e-3f; |
| 0 | 132 | | Interceptor interceptor = SimManager.Instance.CreateInterceptor(config, initialState); |
| | 133 | |
|
| | 134 | | // Assign the interceptor to the cluster. |
| 0 | 135 | | _interceptorClusterMap[interceptor] = cluster; |
| 0 | 136 | | interceptor.AssignTarget(_threatClusterMap[cluster].Centroid); |
| 0 | 137 | | _threatClusterMap[cluster].AssignInterceptor(interceptor); |
| | 138 | |
|
| | 139 | | // Create an interceptor swarm. |
| 0 | 140 | | SimManager.Instance.AddInterceptorSwarm(new List<Agent> { interceptor as Agent }); |
| 0 | 141 | | } |
| 0 | 142 | | } |
| 0 | 143 | | } |
| | 144 | |
|
| 0 | 145 | | public bool ShouldLaunchSubmunitions(Interceptor carrier) { |
| | 146 | | // The carrier interceptor will spawn submunitions when any target is greater than 30 degrees |
| | 147 | | // away from the carrier interceptor's current velocity or when any threat is within 500 meters |
| | 148 | | // of the interceptor. |
| | 149 | | const float SubmunitionSpawnMaxAngularDeviation = 30.0f; |
| | 150 | | const float SubmunitionSpawnMinDistanceToThreat = 500.0f; |
| | 151 | | const float SubmunitionSpawnMaxDistanceToThreat = 2000.0f; |
| | 152 | | // TODO(titan): The prediction time should be a function of the submunition characteristic, such |
| | 153 | | // as the boost time. |
| | 154 | | const float SubmunitionSpawnPredictionTime = 0.6f; |
| | 155 | |
|
| 0 | 156 | | Cluster cluster = _interceptorClusterMap[carrier]; |
| 0 | 157 | | List<Threat> threats = cluster.Threats.ToList(); |
| 0 | 158 | | Vector3 carrierPosition = carrier.GetPosition(); |
| 0 | 159 | | Vector3 carrierVelocity = carrier.GetVelocity(); |
| 0 | 160 | | foreach (var threat in threats) { |
| 0 | 161 | | IPredictor predictor = new LinearExtrapolator(threat); |
| 0 | 162 | | PredictorState predictedState = predictor.Predict(SubmunitionSpawnPredictionTime); |
| 0 | 163 | | Vector3 positionToPredictedThreat = predictedState.Position - carrierPosition; |
| 0 | 164 | | float predictedDistanceToThreat = positionToPredictedThreat.magnitude; |
| | 165 | |
|
| | 166 | | // Check whether the distance to the threat is less than the minimum distance. |
| 0 | 167 | | if (predictedDistanceToThreat < SubmunitionSpawnMinDistanceToThreat) { |
| 0 | 168 | | return true; |
| | 169 | | } |
| | 170 | |
|
| | 171 | | // Check whether the angular deviation exceeds the maximum angular deviation. |
| 0 | 172 | | float distanceDeviation = |
| | 173 | | (Vector3.ProjectOnPlane(positionToPredictedThreat, carrierVelocity)).magnitude; |
| 0 | 174 | | float angularDeviation = |
| | 175 | | Mathf.Asin(distanceDeviation / predictedDistanceToThreat) * Mathf.Rad2Deg; |
| 0 | 176 | | if (angularDeviation > SubmunitionSpawnMaxAngularDeviation && |
| 0 | 177 | | predictedDistanceToThreat < SubmunitionSpawnMaxDistanceToThreat) { |
| 0 | 178 | | return true; |
| | 179 | | } |
| 0 | 180 | | } |
| 0 | 181 | | return false; |
| 0 | 182 | | } |
| | 183 | |
|
| 0 | 184 | | public void AssignSubmunitionsToThreats(Interceptor carrier, List<Interceptor> interceptors) { |
| | 185 | | // Assign threats to the submunitions. |
| 0 | 186 | | Cluster cluster = _interceptorClusterMap[carrier]; |
| 0 | 187 | | List<Threat> threats = cluster.Threats.ToList(); |
| 0 | 188 | | IEnumerable<IAssignment.AssignmentItem> assignments = |
| | 189 | | _assignmentScheme.Assign(interceptors, threats); |
| | 190 | |
|
| | 191 | | // Mark the cluster as delegated to submunitions. |
| 0 | 192 | | _threatClusterMap[cluster].RemoveInterceptor(carrier, delegated: true); |
| | 193 | |
|
| | 194 | | // Apply the assignments to the submunitions. |
| 0 | 195 | | foreach (var assignment in assignments) { |
| 0 | 196 | | assignment.Interceptor.AssignTarget(assignment.Threat); |
| 0 | 197 | | } |
| | 198 | |
|
| | 199 | | // Check whether any submunitions were not assigned to a threat. |
| 0 | 200 | | foreach (var interceptor in interceptors) { |
| 0 | 201 | | if (!interceptor.HasAssignedTarget()) { |
| 0 | 202 | | RequestAssignInterceptorToThreat(interceptor); |
| 0 | 203 | | } |
| 0 | 204 | | } |
| 0 | 205 | | } |
| | 206 | |
|
| 0 | 207 | | public void RequestAssignInterceptorToThreat(Interceptor interceptor) { |
| 0 | 208 | | interceptor.UnassignTarget(); |
| 0 | 209 | | _assignableInterceptors.Add(interceptor); |
| 0 | 210 | | } |
| | 211 | |
|
| 0 | 212 | | private void AssignInterceptorToThreat(in IReadOnlyList<Interceptor> interceptors) { |
| 0 | 213 | | if (interceptors.Count == 0) { |
| 0 | 214 | | return; |
| | 215 | | } |
| | 216 | |
|
| | 217 | | // The threat originally assigned to the interceptor has been terminated, so assign another |
| | 218 | | // threat to the interceptor. |
| | 219 | |
|
| | 220 | | // This pulls from all available track files, not from our previously assigned cluster. |
| 0 | 221 | | List<Threat> threats = _trackFiles.Where(trackFile => trackFile.Agent is Threat) |
| 0 | 222 | | .Select(trackFile => trackFile.Agent as Threat) |
| | 223 | | .ToList(); |
| 0 | 224 | | if (threats.Count == 0) { |
| 0 | 225 | | return; |
| | 226 | | } |
| | 227 | |
|
| 0 | 228 | | IEnumerable<IAssignment.AssignmentItem> assignments = |
| | 229 | | _assignmentScheme.Assign(interceptors, threats); |
| | 230 | |
|
| | 231 | | // Apply the assignments to the submunitions. |
| 0 | 232 | | foreach (var assignment in assignments) { |
| 0 | 233 | | assignment.Interceptor.AssignTarget(assignment.Threat); |
| 0 | 234 | | _assignableInterceptors.Remove(assignment.Interceptor); |
| 0 | 235 | | } |
| 0 | 236 | | } |
| | 237 | |
|
| 0 | 238 | | public void RequestClusterThreat(Threat threat) { |
| 0 | 239 | | _threatsToCluster.Add(threat); |
| 0 | 240 | | } |
| | 241 | |
|
| 0 | 242 | | private IEnumerator CheckForEscapingThreatsManager(float period) { |
| 0 | 243 | | while (true) { |
| 0 | 244 | | yield return new WaitForSeconds(period); |
| 0 | 245 | | CheckForEscapingThreats(); |
| 0 | 246 | | } |
| | 247 | | } |
| | 248 | |
|
| 0 | 249 | | private void CheckForEscapingThreats() { |
| 0 | 250 | | List<Threat> threats = _trackFiles |
| 0 | 251 | | .Where(trackFile => trackFile.Status == TrackStatus.ASSIGNED && |
| | 252 | | trackFile.Agent is Threat) |
| 0 | 253 | | .Select(trackFile => trackFile.Agent as Threat) |
| | 254 | | .ToList(); |
| 0 | 255 | | if (threats.Count == 0) { |
| 0 | 256 | | return; |
| | 257 | | } |
| | 258 | |
|
| | 259 | | // Check whether the threats are escaping the pursuing interceptors. |
| 0 | 260 | | foreach (var threat in threats) { |
| 0 | 261 | | bool isEscaping = threat.AssignedInterceptors.All(interceptor => { |
| 0 | 262 | | Vector3 interceptorPosition = interceptor.GetPosition(); |
| 0 | 263 | | Vector3 threatPosition = threat.GetPosition(); |
| | 264 | |
|
| 0 | 265 | | float threatTimeToHit = (float)(threatPosition.magnitude / threat.GetSpeed()); |
| 0 | 266 | | float interceptorTimeToHit = |
| | 267 | | (float)((threatPosition - interceptorPosition).magnitude / interceptor.GetSpeed()); |
| 0 | 268 | | return interceptorPosition.magnitude > threatPosition.magnitude || |
| | 269 | | threatTimeToHit < interceptorTimeToHit; |
| 0 | 270 | | }); |
| 0 | 271 | | if (isEscaping) { |
| 0 | 272 | | RequestClusterThreat(threat); |
| 0 | 273 | | } |
| 0 | 274 | | } |
| 0 | 275 | | } |
| | 276 | |
|
| 0 | 277 | | private IEnumerator ClusterThreatsManager(float period) { |
| 0 | 278 | | while (true) { |
| 0 | 279 | | ClusterThreats(); |
| 0 | 280 | | yield return new WaitForSeconds(period); |
| 0 | 281 | | } |
| | 282 | | } |
| | 283 | |
|
| 0 | 284 | | private void ClusterThreats() { |
| | 285 | | // Maximum number of threats per cluster. |
| | 286 | | const int MaxSize = 7; |
| | 287 | | // Maximum cluster radius in meters. |
| | 288 | | const float MaxRadius = 500; |
| | 289 | |
|
| | 290 | | // Filter the threats. |
| 0 | 291 | | List<Threat> threats = |
| | 292 | | _threatsToCluster |
| 0 | 293 | | .Where(threat => !threat.IsTerminated() && threat.AssignedInterceptors.Count == 0) |
| | 294 | | .ToList(); |
| 0 | 295 | | if (threats.Count == 0) { |
| 0 | 296 | | return; |
| | 297 | | } |
| | 298 | |
|
| | 299 | | // Cluster threats. |
| 0 | 300 | | IClusterer clusterer = new AgglomerativeClusterer(new List<Agent>(threats), MaxSize, MaxRadius); |
| 0 | 301 | | clusterer.Cluster(); |
| 0 | 302 | | var clusters = clusterer.Clusters; |
| 0 | 303 | | Debug.Log($"Clustered {threats.Count} threats into {clusters.Count} clusters."); |
| 0 | 304 | | UIManager.Instance.LogActionMessage( |
| | 305 | | $"[IADS] Clustered {threats.Count} threats into {clusters.Count} clusters."); |
| | 306 | |
|
| 0 | 307 | | _threatClusters = clusters.ToList(); |
| 0 | 308 | | foreach (var cluster in clusters) { |
| 0 | 309 | | _threatClusterMap.Add(cluster, new ThreatClusterData(cluster)); |
| 0 | 310 | | } |
| | 311 | |
|
| 0 | 312 | | _threatsToCluster.Clear(); |
| 0 | 313 | | } |
| | 314 | |
|
| 0 | 315 | | public void RegisterNewThreat(Threat threat) { |
| 0 | 316 | | string trackID = $"T{1000 + ++_trackFileIdTicker}"; |
| 0 | 317 | | ThreatData trackFile = new ThreatData(threat, trackID); |
| 0 | 318 | | _trackFiles.Add(trackFile); |
| 0 | 319 | | _trackFileMap.Add(threat, trackFile); |
| 0 | 320 | | RequestClusterThreat(threat); |
| | 321 | |
|
| 0 | 322 | | threat.OnThreatHit += RegisterThreatHit; |
| 0 | 323 | | threat.OnThreatMiss += RegisterThreatMiss; |
| 0 | 324 | | } |
| | 325 | |
|
| 0 | 326 | | public void RegisterNewInterceptor(Interceptor interceptor) { |
| 0 | 327 | | string trackID = $"I{2000 + ++_trackFileIdTicker}"; |
| 0 | 328 | | InterceptorData trackFile = new InterceptorData(interceptor, trackID); |
| 0 | 329 | | _trackFiles.Add(trackFile); |
| 0 | 330 | | _trackFileMap.Add(interceptor, trackFile); |
| | 331 | |
|
| 0 | 332 | | interceptor.OnInterceptMiss += RegisterInterceptorMiss; |
| 0 | 333 | | interceptor.OnInterceptHit += RegisterInterceptorHit; |
| 0 | 334 | | } |
| | 335 | |
|
| 0 | 336 | | private void RegisterInterceptorHit(Interceptor interceptor, Threat threat) { |
| 0 | 337 | | var threatTrack = _trackFileMap[threat] as ThreatData; |
| 0 | 338 | | var interceptorTrack = _trackFileMap[interceptor] as InterceptorData; |
| | 339 | |
|
| 0 | 340 | | if (threatTrack != null) { |
| 0 | 341 | | threatTrack.RemoveInterceptor(interceptor); |
| 0 | 342 | | threatTrack.MarkDestroyed(); |
| 0 | 343 | | } |
| | 344 | |
|
| 0 | 345 | | if (interceptorTrack != null) { |
| 0 | 346 | | interceptorTrack.RemoveThreat(threat); |
| 0 | 347 | | interceptorTrack.MarkDestroyed(); |
| 0 | 348 | | } |
| | 349 | |
|
| | 350 | | // Assign the interceptors to other threats. |
| 0 | 351 | | foreach (var assignedInterceptor in threat.AssignedInterceptors.ToList()) { |
| 0 | 352 | | if (assignedInterceptor is not CarrierInterceptor) { |
| 0 | 353 | | RequestAssignInterceptorToThreat(assignedInterceptor as Interceptor); |
| 0 | 354 | | } |
| 0 | 355 | | } |
| 0 | 356 | | } |
| | 357 | |
|
| 0 | 358 | | private void RegisterInterceptorMiss(Interceptor interceptor, Threat threat) { |
| | 359 | | // Assign the interceptor to another threat. |
| 0 | 360 | | RequestAssignInterceptorToThreat(interceptor); |
| | 361 | |
|
| 0 | 362 | | var threatTrack = _trackFileMap[threat] as ThreatData; |
| 0 | 363 | | var interceptorTrack = _trackFileMap[interceptor] as InterceptorData; |
| | 364 | |
|
| 0 | 365 | | if (threatTrack != null) { |
| 0 | 366 | | threatTrack.RemoveInterceptor(interceptor); |
| | 367 | |
|
| | 368 | | // Check if the threat is being targeted by at least one interceptor. |
| 0 | 369 | | if (threatTrack.AssignedInterceptorCount == 0) { |
| 0 | 370 | | RequestClusterThreat(threat); |
| 0 | 371 | | } |
| 0 | 372 | | } |
| | 373 | |
|
| 0 | 374 | | if (interceptorTrack != null) { |
| 0 | 375 | | interceptorTrack.RemoveThreat(threat); |
| 0 | 376 | | interceptorTrack.MarkDestroyed(); |
| 0 | 377 | | } |
| 0 | 378 | | } |
| | 379 | |
|
| 0 | 380 | | private void RegisterThreatHit(Threat threat) { |
| 0 | 381 | | var threatTrack = _trackFileMap[threat] as ThreatData; |
| 0 | 382 | | if (threatTrack != null) { |
| 0 | 383 | | threatTrack.MarkDestroyed(); |
| 0 | 384 | | } |
| | 385 | |
|
| | 386 | | // Re-assign the assigned interceptors to other threats. |
| 0 | 387 | | foreach (var interceptor in threat.AssignedInterceptors.ToList()) { |
| 0 | 388 | | RequestAssignInterceptorToThreat(interceptor as Interceptor); |
| 0 | 389 | | } |
| 0 | 390 | | } |
| | 391 | |
|
| 0 | 392 | | private void RegisterThreatMiss(Threat threat) { |
| | 393 | | // The threat missed (e.g., it hit the floor). |
| | 394 | | // Re-assign the assigned interceptors to other threats. |
| 0 | 395 | | foreach (var interceptor in threat.AssignedInterceptors.ToList()) { |
| 0 | 396 | | RequestAssignInterceptorToThreat(interceptor as Interceptor); |
| 0 | 397 | | } |
| | 398 | |
|
| 0 | 399 | | var threatTrack = _trackFileMap[threat] as ThreatData; |
| 0 | 400 | | if (threatTrack != null) { |
| 0 | 401 | | threatTrack.MarkDestroyed(); |
| 0 | 402 | | } |
| 0 | 403 | | } |
| | 404 | |
|
| 0 | 405 | | public List<ThreatData> GetThreatTracks() => _trackFiles.OfType<ThreatData>().ToList(); |
| | 406 | |
|
| | 407 | | public List<InterceptorData> GetInterceptorTracks() => |
| 0 | 408 | | _trackFiles.OfType<InterceptorData>().ToList(); |
| | 409 | |
|
| 0 | 410 | | private void RegisterSimulationEnded() { |
| 0 | 411 | | _trackFiles.Clear(); |
| 0 | 412 | | _trackFileMap.Clear(); |
| 0 | 413 | | _assignmentQueue.Clear(); |
| 0 | 414 | | _threatClusters.Clear(); |
| 0 | 415 | | _threatClusterMap.Clear(); |
| 0 | 416 | | _interceptorClusterMap.Clear(); |
| 0 | 417 | | _assignableInterceptors.Clear(); |
| 0 | 418 | | _threatsToCluster.Clear(); |
| 0 | 419 | | _trackFileIdTicker = 0; |
| 0 | 420 | | } |
| | 421 | | } |