handle the requested runways in the optimization
This commit is contained in:
@@ -72,6 +72,7 @@ class RecedingHorizonControl:
|
||||
plannedInbound.Report = inbound.Report
|
||||
plannedInbound.ReportTime = inbound.ReportTime
|
||||
plannedInbound.CurrentPosition = inbound.CurrentPosition
|
||||
plannedInbound.RequestedRunway = inbound.RequestedRunway
|
||||
# ingore fixed updates
|
||||
if True == plannedInbound.FixedSequence or index <= self.FreezedIndex:
|
||||
plannedInbound.FixedSequence = True
|
||||
|
||||
@@ -118,10 +118,13 @@ class RunwayManager:
|
||||
def selectArrivalRunway(self, node : Node, earliestArrivalTime : datetime):
|
||||
availableRunways = self.Configuration.RunwayConstraints.ActiveArrivalRunways
|
||||
|
||||
if True == self.Configuration.RunwayConstraints.UseShallShouldMay:
|
||||
if True == self.Configuration.RunwayConstraints.UseShallShouldMay and None == node.Inbound.RequestedRunway:
|
||||
availableRunways = self.executeShallShouldMayAssignment(node, earliestArrivalTime)
|
||||
else:
|
||||
availableRunways = self.Configuration.RunwayConstraints.ActiveArrivalRunways
|
||||
elif None != node.Inbound.RequestedRunway:
|
||||
for runway in availableRunways:
|
||||
if node.Inbound.RequestedRunway == runway.Runway.Name:
|
||||
availableRunways = [ runway ]
|
||||
break
|
||||
|
||||
if 0 == len(availableRunways):
|
||||
runway = self.Configuration.RunwayConstraints.ActiveArrivalRunways[0]
|
||||
|
||||
Reference in New Issue
Block a user