run the optimization every time to optimze also based on TTG

This commit is contained in:
Sven Czarnian
2021-11-12 19:38:11 +01:00
parent 40ddd7c188
commit 6f36d8f569

View File

@@ -45,11 +45,9 @@ class Colony:
delay = Colony.calculateInitialCosts(rwyManager, self.Configuration.Inbounds, self.Configuration.EarliestArrivalTime)
self.FcfsDelay = delay
# check if FCFS is the ideal solution
# run the optimization in every cycle to ensure optimal spacings based on TTG
if 0.0 >= delay.total_seconds():
self.Result = self.Configuration.Inbounds
self.ResultDelay = delay
return
delay = timedelta(seconds = 1.0)
# initial value for the optimization
self.Configuration.ThetaZero = 1.0 / (len(self.Configuration.Inbounds) * (delay.total_seconds() / 60.0))