Menu

#27 Wrong count of iterations with OptimizationMediator

v1.0_(example)
closed
None
8
2014-02-04
2013-04-14
No

If the number of iterations of the EA is 1, not a single implementation is evaluated because the "initialize()" methods is considered as iteration. See optimize() method in OptimizationMediator:

public void optimize() throws StopException, TerminationException {
    iterativeOptimizer.initialize();
    nextIteration();
    while (iteration.value() < iteration.max()) {
        iterativeOptimizer.next();
        nextIteration();
    }
}

This method should be:

public void optimize() throws StopException, TerminationException {
    iterativeOptimizer.initialize();
    while (iteration.value() <= iteration.max()) {
        iterativeOptimizer.next();
        nextIteration();
    }
}

But then it needs to be checked that other optimizers also work properly with this change.

Discussion

  • Martin Lukasiewycz

    • status: open --> closed
     
  • Martin Lukasiewycz

    Fixed with commit 155

     

Log in to post a comment.