diff --git a/admin/anneal.inc.php b/admin/anneal.inc.php index 4250d59a..78f86e76 100644 --- a/admin/anneal.inc.php +++ b/admin/anneal.inc.php @@ -309,6 +309,11 @@ class annealer { if($temperature < 0.1 && $last_cost_count > 10) break; + + //if we go 1 million iterations without changing the cost, lets give up + if($last_cost_count>1000000) + break; + // TRACE("Cost is {$this->cost}\n"); $temperature *= $this->rate; /*