mirror of
https://github.com/graphhopper/jsprit.git
synced 2020-01-24 07:45:05 +01:00
Fix the condition to use bestCost as this is what we are traceing.
Added log to debug to state the termination
This commit is contained in:
parent
d4b7637b07
commit
595ef67ae8
1 changed files with 1 additions and 1 deletions
|
|
@ -109,7 +109,7 @@ public class IterationWithoutImprovementTermination implements PrematureAlgorith
|
||||||
boolean unassignedJobsEqual = (currentJobsUnassigned == unassignedJobsCount.get(i - noIterationWithoutImprovement));
|
boolean unassignedJobsEqual = (currentJobsUnassigned == unassignedJobsCount.get(i - noIterationWithoutImprovement));
|
||||||
boolean progressTooSlow = 100 * ((costs.get(i - noIterationWithoutImprovement) - bestCost) / bestCost) <= terminationByCostPercentage;
|
boolean progressTooSlow = 100 * ((costs.get(i - noIterationWithoutImprovement) - bestCost) / bestCost) <= terminationByCostPercentage;
|
||||||
if (unassignedJobsEqual && progressTooSlow){
|
if (unassignedJobsEqual && progressTooSlow){
|
||||||
log.debug("Termination condition by percentage reached: " + this);
|
log.debug("Termination condition by percentage reached after " + Integer.toString(i) + " Iterations: \n" + this);
|
||||||
return true;
|
return true;
|
||||||
}else
|
}else
|
||||||
return false;
|
return false;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue