瀏覽代碼

add a warning message to show if the execution exceeded the maximum time

Sven Czarnian 3 年之前
父節點
當前提交
22216b6627
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      aman/sys/Worker.py

+ 3 - 1
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)