From bb0327826ddecee5a7a85e277d06c88c16c3bcdb Mon Sep 17 00:00:00 2001 From: apvrille <ludovic.apvrille@eurecom.fr> Date: Thu, 11 Jan 2018 17:31:23 +0100 Subject: [PATCH] Resolving issue on minimization improvement. Furthur improvements are expected --- src/main/java/ui/graph/AUTGraph.java | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/main/java/ui/graph/AUTGraph.java b/src/main/java/ui/graph/AUTGraph.java index 2e664ef0ba..326c6e1160 100755 --- a/src/main/java/ui/graph/AUTGraph.java +++ b/src/main/java/ui/graph/AUTGraph.java @@ -1086,14 +1086,23 @@ public class AUTGraph implements myutil.Graph { //printConfiguration(partition, w); - int maxIte = 1000; + int maxIte = 1000; // With same nb of partitions + int nbOfPartitions = w.size(); + int evolution = 10; AUTPartition currentP; - while ((w.size() > 0) && (maxIte > 0)) { + while ((w.size() > 0) && (maxIte > 0) && (evolution > 0)) { + if (w.size() == nbOfPartitions) { + evolution --; + } else { + evolution = 10; + } + nbOfPartitions = w.size(); maxIte--; currentP = w.partitions.get(0); w.partitions.remove(0); + // Simple splitter? if (currentP.blocks.size() == 1) { //TraceManager.addDev("Simple splitter = " + currentP); -- GitLab