adapt the code to split up predictions form the inbounds

This commit is contained in:
Sven Czarnian
2021-11-13 22:55:04 +01:00
parent eba9e2deab
commit 8b34f622a3
9 changed files with 280 additions and 267 deletions

View File

@@ -10,6 +10,7 @@ from aman.com.WebUI import WebUI
from aman.config.Airport import Airport
from aman.sys.aco.Colony import Colony
from aman.sys.aco.Configuration import Configuration
from aman.sys.aco.Node import Node
from aman.sys.WeatherModel import WeatherModel
from aman.sys.RecedingHorizonControl import RecedingHorizonControl
from aman.types.Inbound import Inbound
@@ -100,8 +101,9 @@ class Worker(Thread):
report = self.ReportQueue[callsign]
if 0 != report.distanceToIAF and '' != report.initialApproachFix:
inbound = Inbound(report, self.sequencingConfiguration, self.Configuration.GngData, self.PerformanceData, self.WeatherModel)
if None != inbound.PlannedRunway and None != inbound.PlannedStar:
inbound = Inbound(report, self.PerformanceData)
Node(inbound, inbound.ReportTime, self.WeatherModel, self.Configuration.GngData, self.sequencingConfiguration)
if None != inbound.InitialArrivalTime:
self.RecedingHorizonControl.updateReport(inbound)
else:
print('Unable to find all data of ' + report.aircraft.callsign)
@@ -122,13 +124,13 @@ class Worker(Thread):
preceedingInbounds[runway.Runway.Name] = inbound
# configure the ACO run
acoConfig = Configuration(constraints = self.sequencingConfiguration, inbounds = relevantInbounds,
acoConfig = Configuration(constraints = self.sequencingConfiguration, nav = self.Configuration.GngData,
earliest = earliestArrivalTime, weather = self.WeatherModel,
preceeding = None if 0 == len(preceedingInbounds) else preceedingInbounds,
ants = 5 * len(relevantInbounds), generations = 5 * len(relevantInbounds))
# perform the ACO run
aco = Colony(acoConfig)
aco = Colony(relevantInbounds, acoConfig)
aco.optimize()
if None != aco.Result:
for inbound in aco.Result: