Properly deactivate auto-aging

This commit is contained in:
Fabian Becker 2014-12-01 12:32:26 +00:00
parent b75da91ead
commit b1e5c7a410
2 changed files with 1 additions and 2 deletions

View File

@ -637,7 +637,6 @@ public class Population extends ArrayList<AbstractEAIndividual> implements Popul
*/
public void incrFunctionCallsBy(int d) {
if (doEvalNotify()) {
// System.out.println("checking funcall event...");
int nextStep; // next interval boundary
while ((nextStep = calcNextBoundary()) <= (functionCallCount + d)) {
// the notify interval will be stepped over or hit
@ -645,7 +644,6 @@ public class Population extends ArrayList<AbstractEAIndividual> implements Popul
this.functionCallCount += toHit; // little cheat, notify may be after some more evals
firePropertyChangedEvent(FUN_CALL_INTERVAL_REACHED);
d -= toHit;
// this.functionCalls += (d-toHit);
}
if (d > 0) {
this.functionCallCount += d; // add up the rest

View File

@ -56,6 +56,7 @@ public class ArtificialBeeColony extends AbstractOptimizer implements InterfaceA
@Override
public void initialize() {
this.scoutCount = 0;
this.population.setAutoAging(false);
this.optimizationProblem.initializePopulation(this.population);
this.evaluatePopulation(this.population);
this.firePropertyChangedEvent(Population.NEXT_GENERATION_PERFORMED);