From 22216b66270194fe64c646d387906188c60801ae Mon Sep 17 00:00:00 2001 From: Sven Czarnian Date: Mon, 29 Nov 2021 19:25:19 +0100 Subject: [PATCH] add a warning message to show if the execution exceeded the maximum time --- aman/sys/Worker.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/aman/sys/Worker.py b/aman/sys/Worker.py index fbcf43a..c725834 100644 --- a/aman/sys/Worker.py +++ b/aman/sys/Worker.py @@ -123,7 +123,9 @@ class Worker(Thread): self.RecedingHorizonControl.resequenceInbound(node.Inbound) # measure the exuction time of the overall optimization process - print('Execution time: ' + str(time.process_time() - start) + ' seconds') + executionTime = time.process_time() - start + if 60.0 <= executionTime: + print('Optimized ' + str(len(aco.Result)) + ' inbounds in ' + str(executionTime) + ' seconds') else: print('No relevant inbounds found for the optimization in ' + self.Icao)