measure the execution time
This commit is contained in:
@@ -105,6 +105,8 @@ class Worker(Thread):
|
|||||||
# search the ACO relevant aircrafts
|
# search the ACO relevant aircrafts
|
||||||
relevantInbounds, earliestArrivalTime = self.RecedingHorizonControl.optimizationRelevantInbounds()
|
relevantInbounds, earliestArrivalTime = self.RecedingHorizonControl.optimizationRelevantInbounds()
|
||||||
if None != relevantInbounds:
|
if None != relevantInbounds:
|
||||||
|
start = time.process_time()
|
||||||
|
|
||||||
# get the last landing aircrafts per runway before the RHC stage to check for constraints
|
# get the last landing aircrafts per runway before the RHC stage to check for constraints
|
||||||
# this is required to handle the overlap between windows
|
# this is required to handle the overlap between windows
|
||||||
preceedingInbounds = {}
|
preceedingInbounds = {}
|
||||||
@@ -113,8 +115,6 @@ class Worker(Thread):
|
|||||||
if None != inbound:
|
if None != inbound:
|
||||||
preceedingInbounds[runway.Runway.Name] = inbound
|
preceedingInbounds[runway.Runway.Name] = inbound
|
||||||
|
|
||||||
print('Relevant inbounds: ' + str(len(relevantInbounds)))
|
|
||||||
|
|
||||||
# configure the ACO run
|
# configure the ACO run
|
||||||
acoConfig = Configuration(earliestArrivalTime, self.sequencingConfiguration, 5 * len(relevantInbounds), 5 * len(relevantInbounds))
|
acoConfig = Configuration(earliestArrivalTime, self.sequencingConfiguration, 5 * len(relevantInbounds), 5 * len(relevantInbounds))
|
||||||
if 0 != len(preceedingInbounds):
|
if 0 != len(preceedingInbounds):
|
||||||
@@ -131,6 +131,8 @@ class Worker(Thread):
|
|||||||
' dt=' + str((inbound.PlannedArrivalTime - inbound.InitialArrivalTime).total_seconds()))
|
' dt=' + str((inbound.PlannedArrivalTime - inbound.InitialArrivalTime).total_seconds()))
|
||||||
print('Delays: FCFS=' + str(aco.FcfsDelay.total_seconds()) + ', ACO=' + str(aco.ResultDelay.total_seconds()))
|
print('Delays: FCFS=' + str(aco.FcfsDelay.total_seconds()) + ', ACO=' + str(aco.ResultDelay.total_seconds()))
|
||||||
|
|
||||||
|
# measure the exuction time of the overall optimization process
|
||||||
|
print('Execution time: ' + str(time.process_time() - start) + ' seconds')
|
||||||
else:
|
else:
|
||||||
print('No relevant inbounds found for the optimization in ' + self.Icao)
|
print('No relevant inbounds found for the optimization in ' + self.Icao)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user