remove some debugging todos
This commit is contained in:
@@ -101,9 +101,7 @@ class RecedingHorizonControl:
|
|||||||
earliestArrivalTime = None
|
earliestArrivalTime = None
|
||||||
|
|
||||||
# check the overlapping windows
|
# check the overlapping windows
|
||||||
# TODO use this commented for loop after developing to use the correct windows
|
for i in range(self.FreezedIndex + 1, min(len(self.Windows), self.FreezedIndex + 1 + self.Configuration.WindowOverlap)):
|
||||||
#for i in range(self.FreezedIndex + 1, min(len(self.Windows), self.FreezedIndex + 1 + self.Configuration.WindowOverlap)):
|
|
||||||
for i in range(0, len(self.Windows)):
|
|
||||||
if None == earliestArrivalTime:
|
if None == earliestArrivalTime:
|
||||||
earliestArrivalTime = self.Windows[i].StartTime
|
earliestArrivalTime = self.Windows[i].StartTime
|
||||||
for inbound in self.Windows[i].Inbounds:
|
for inbound in self.Windows[i].Inbounds:
|
||||||
|
|||||||
@@ -81,8 +81,7 @@ class Worker(Thread):
|
|||||||
while None == self.StopThread:
|
while None == self.StopThread:
|
||||||
time.sleep(1)
|
time.sleep(1)
|
||||||
counter += 1
|
counter += 1
|
||||||
# TODO change the counter to some useful values
|
if 0 != (counter % 60):
|
||||||
if 0 != (counter % 10):
|
|
||||||
continue
|
continue
|
||||||
|
|
||||||
self.acquireLock()
|
self.acquireLock()
|
||||||
|
|||||||
@@ -29,15 +29,7 @@ class Colony:
|
|||||||
|
|
||||||
# assume that the inbounds are sorted in FCFS order
|
# assume that the inbounds are sorted in FCFS order
|
||||||
print('FCFS-Sequence:')
|
print('FCFS-Sequence:')
|
||||||
# TODO remove this after testing and optimization
|
|
||||||
tmp = datetime.now().replace(tzinfo = pytz.UTC) + timedelta(seconds = 50 * len(inbounds))
|
|
||||||
for inbound in inbounds:
|
for inbound in inbounds:
|
||||||
# TODO remove this after testing and optimization
|
|
||||||
for runway in inbound.ArrivalCandidates:
|
|
||||||
inbound.ArrivalCandidates[runway].InitialArrivalTime = tmp
|
|
||||||
inbound.ArrivalCandidates[runway].EarliestArrivalTime = tmp - inbound.ArrivalCandidates[runway].MaximumTimeToGain
|
|
||||||
inbound.ArrivalCandidates[runway].LatestArrivalTime = tmp + inbound.ArrivalCandidates[runway].MaximumTimeToLose
|
|
||||||
tmp += timedelta(seconds = 20)
|
|
||||||
Colony.associateInbound(rwyManager, inbound, earliestArrivalTime, False)
|
Colony.associateInbound(rwyManager, inbound, earliestArrivalTime, False)
|
||||||
overallDelay += inbound.PlannedArrivalTime - inbound.InitialArrivalTime
|
overallDelay += inbound.PlannedArrivalTime - inbound.InitialArrivalTime
|
||||||
print(' ' + inbound.Callsign + ': ' + inbound.PlannedRunway.Name + ' @ ' + str(inbound.PlannedArrivalTime) +
|
print(' ' + inbound.Callsign + ': ' + inbound.PlannedRunway.Name + ' @ ' + str(inbound.PlannedArrivalTime) +
|
||||||
|
|||||||
Reference in New Issue
Block a user