do not ignore inbounds that respawned inside the freezed time
This commit is contained in:
@@ -175,13 +175,23 @@ class RecedingHorizonControl:
|
||||
return runwayInbounds, iafInbounds
|
||||
|
||||
def optimizationRelevantInbounds(self):
|
||||
# no new inbounds
|
||||
if len(self.Windows) <= self.FreezedIndex + 1:
|
||||
return None, None
|
||||
|
||||
inbounds = []
|
||||
earliestArrivalTime = self.Windows[self.FreezedIndex + 1].StartTime
|
||||
|
||||
# check if we have a reconnect in the freezed blocks (VATSIM specific behavior)
|
||||
for i in range(0, self.FreezedIndex + 1):
|
||||
for inbound in self.Windows[i].Inbounds:
|
||||
if False == inbound.HasValidSequence:
|
||||
inbounds.sort(key = lambda x: x.PlannedArrivalTime if None != x.PlannedArrivalTime else x.EnrouteArrivalTime)
|
||||
inbounds.append(copy.deepcopy(inbound))
|
||||
|
||||
# no new inbounds
|
||||
if len(self.Windows) <= self.FreezedIndex + 1:
|
||||
if 0 == len(inbounds):
|
||||
return None, None
|
||||
else:
|
||||
return inbounds, earliestArrivalTime
|
||||
|
||||
# check the overlapping windows
|
||||
for i in range(self.FreezedIndex + 1, len(self.Windows)):
|
||||
for inbound in self.Windows[i].Inbounds:
|
||||
|
||||
Reference in New Issue
Block a user