run the optimization every time to optimze also based on TTG
This commit is contained in:
@@ -45,11 +45,9 @@ class Colony:
|
|||||||
delay = Colony.calculateInitialCosts(rwyManager, self.Configuration.Inbounds, self.Configuration.EarliestArrivalTime)
|
delay = Colony.calculateInitialCosts(rwyManager, self.Configuration.Inbounds, self.Configuration.EarliestArrivalTime)
|
||||||
self.FcfsDelay = delay
|
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():
|
if 0.0 >= delay.total_seconds():
|
||||||
self.Result = self.Configuration.Inbounds
|
delay = timedelta(seconds = 1.0)
|
||||||
self.ResultDelay = delay
|
|
||||||
return
|
|
||||||
|
|
||||||
# initial value for the optimization
|
# initial value for the optimization
|
||||||
self.Configuration.ThetaZero = 1.0 / (len(self.Configuration.Inbounds) * (delay.total_seconds() / 60.0))
|
self.Configuration.ThetaZero = 1.0 / (len(self.Configuration.Inbounds) * (delay.total_seconds() / 60.0))
|
||||||
|
|||||||
Reference in New Issue
Block a user