From ae96e5be6b34c161f81d8aba7c679fa29f08b65e Mon Sep 17 00:00:00 2001 From: Sven Czarnian Date: Thu, 16 Dec 2021 10:24:10 +0100 Subject: [PATCH] abort if we found the optimal solution --- aman/sys/aco/Colony.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/aman/sys/aco/Colony.py b/aman/sys/aco/Colony.py index f1fae9f..f834bd0 100644 --- a/aman/sys/aco/Colony.py +++ b/aman/sys/aco/Colony.py @@ -121,6 +121,10 @@ class Colony: if None == bestSequence or bestCandidate[0] < bestSequence[0]: bestSequence = bestCandidate + # found the optimal solution + if 1 >= bestSequence[0].total_seconds(): + break + # create the final sequence self.Result = [] rwyManager = RunwayManager(self.Configuration)