diff --git a/examples/pom.xml b/examples/pom.xml index 773b7d2d..0f95981d 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -22,7 +22,7 @@ org.uncommons.watchmaker watchmaker - 0.7.2 + 0.7.2-qumul watchmaker-examples diff --git a/framework/pom.xml b/framework/pom.xml index 51ecd7bd..fd550306 100644 --- a/framework/pom.xml +++ b/framework/pom.xml @@ -22,7 +22,7 @@ org.uncommons.watchmaker watchmaker - 0.7.2 + 0.7.2-qumul watchmaker-framework @@ -30,7 +30,7 @@ org.uncommons.maths uncommons-maths - 1.2.2 + 1.2.2a com.google.collections diff --git a/framework/src/java/main/org/uncommons/watchmaker/framework/EvolutionUtils.java b/framework/src/java/main/org/uncommons/watchmaker/framework/EvolutionUtils.java index 2838e318..67c6de79 100644 --- a/framework/src/java/main/org/uncommons/watchmaker/framework/EvolutionUtils.java +++ b/framework/src/java/main/org/uncommons/watchmaker/framework/EvolutionUtils.java @@ -111,17 +111,8 @@ public static PopulationData getPopulationData(List int iterationNumber, long startTime) { - DataSet stats = new DataSet(evaluatedPopulation.size()); - for (EvaluatedCandidate candidate : evaluatedPopulation) - { - stats.addValue(candidate.getFitness()); - } - return new PopulationData(evaluatedPopulation.get(0).getCandidate(), - evaluatedPopulation.get(0).getFitness(), - stats.getArithmeticMean(), - stats.getStandardDeviation(), + return new PopulationData(evaluatedPopulation, naturalFitness, - stats.getSize(), eliteCount, iterationNumber, System.currentTimeMillis() - startTime); diff --git a/framework/src/java/main/org/uncommons/watchmaker/framework/PopulationData.java b/framework/src/java/main/org/uncommons/watchmaker/framework/PopulationData.java index a04f5bbb..77b68e5e 100644 --- a/framework/src/java/main/org/uncommons/watchmaker/framework/PopulationData.java +++ b/framework/src/java/main/org/uncommons/watchmaker/framework/PopulationData.java @@ -15,6 +15,10 @@ //============================================================================= package org.uncommons.watchmaker.framework; +import org.uncommons.maths.statistics.DataSet; + +import java.util.List; + /** * Immutable data object containing statistics about the state of * an evolved population and a reference to the fittest candidate @@ -26,6 +30,7 @@ */ public final class PopulationData { + private final List> evaluatedPopulation; private final T bestCandidate; private final double bestCandidateFitness; private final double meanFitness; @@ -37,6 +42,8 @@ public final class PopulationData private final long elapsedTime; /** + * Constructor only + * @param evaluatedPopulation List of all candidates * @param bestCandidate The fittest candidate present in the population. * @param bestCandidateFitness The fitness score for the fittest candidate * in the population. @@ -45,23 +52,25 @@ public final class PopulationData * @param fitnessStandardDeviation A measure of the variation in fitness * scores. * @param naturalFitness True if higher fitness scores are better, false - * otherwise. + * otherwise. * @param populationSize The number of individuals in the population. * @param eliteCount The number of candidates preserved via elitism. * @param generationNumber The (zero-based) number of the last generation * that was processed. * @param elapsedTime The number of milliseconds since the start of the */ - public PopulationData(T bestCandidate, - double bestCandidateFitness, - double meanFitness, - double fitnessStandardDeviation, - boolean naturalFitness, - int populationSize, - int eliteCount, - int generationNumber, - long elapsedTime) + public PopulationData( + List> evaluatedPopulation, T bestCandidate, + double bestCandidateFitness, + double meanFitness, + double fitnessStandardDeviation, + boolean naturalFitness, + int populationSize, + int eliteCount, + int generationNumber, + long elapsedTime) { + this.evaluatedPopulation = evaluatedPopulation; this.bestCandidate = bestCandidate; this.bestCandidateFitness = bestCandidateFitness; this.meanFitness = meanFitness; @@ -72,7 +81,48 @@ public PopulationData(T bestCandidate, this.generationNumber = generationNumber; this.elapsedTime = elapsedTime; } + /** + * @param evaluatedPopulation List of all candidates, the list should be + * ordered by fitness for the the best candidate to be meaningfull. + * Otherwise consider making your own statistics and use the other + * constructor + * @param naturalFitness True if higher fitness scores are better, false otherwise. + * @param eliteCount The number of candidates preserved via elitism. + * @param generationNumber The (zero-based) number of the last generation that was processed. + * @param elapsedTime The number of milliseconds since the start of the + */ + public PopulationData(List> evaluatedPopulation, + boolean naturalFitness, + int eliteCount, + int generationNumber, + long elapsedTime) + { + DataSet stats = new DataSet(evaluatedPopulation.size()); + for (EvaluatedCandidate candidate : evaluatedPopulation) + { + stats.addValue(candidate.getFitness()); + } + + this.bestCandidate = evaluatedPopulation.get(0).getCandidate(); + this.bestCandidateFitness = evaluatedPopulation.get(0).getFitness(); + this.meanFitness = stats.getArithmeticMean(); + this.fitnessStandardDeviation = stats.getStandardDeviation(); + this.naturalFitness = naturalFitness; + this.populationSize = stats.getSize(); + this.eliteCount = eliteCount; + this.generationNumber = generationNumber; + this.elapsedTime = elapsedTime; + this.evaluatedPopulation = evaluatedPopulation; + } + /** + * @return The list of all candidates in the population at this stage, + * be carefull in the references you hold of this and don't assume this + * list to remain unchanged over generations. + */ + public List> getEvaluatedPopulation() { + return evaluatedPopulation; + } /** * @return The fittest candidate present in the population. diff --git a/framework/src/java/test/org/uncommons/watchmaker/framework/termination/ElapsedTimeTest.java b/framework/src/java/test/org/uncommons/watchmaker/framework/termination/ElapsedTimeTest.java index ea268765..3a62858c 100644 --- a/framework/src/java/test/org/uncommons/watchmaker/framework/termination/ElapsedTimeTest.java +++ b/framework/src/java/test/org/uncommons/watchmaker/framework/termination/ElapsedTimeTest.java @@ -19,6 +19,8 @@ import org.uncommons.watchmaker.framework.PopulationData; import org.uncommons.watchmaker.framework.TerminationCondition; +import java.util.ArrayList; + /** * Unit test for termination condition that checks the time taken so far by the * evolutionary algorithm. @@ -30,9 +32,9 @@ public class ElapsedTimeTest public void testElapsedTimes() { TerminationCondition condition = new ElapsedTime(1000); - PopulationData data = new PopulationData(new Object(), 0, 0, 0, true, 2, 0, 0, 100); + PopulationData data = new PopulationData(new ArrayList(), new Object(), 0, 0, 0, true, 2, 0, 0, 100); assert !condition.shouldTerminate(data) : "Should not terminate before timeout."; - data = new PopulationData(new Object(), 0, 0, 0, true, 2, 0, 0, 1000); + data = new PopulationData(new ArrayList(), new Object(), 0, 0, 0, true, 2, 0, 0, 1000); assert condition.shouldTerminate(data) : "Should terminate after timeout."; } diff --git a/framework/src/java/test/org/uncommons/watchmaker/framework/termination/GenerationCountTest.java b/framework/src/java/test/org/uncommons/watchmaker/framework/termination/GenerationCountTest.java index 64487a28..5645f470 100644 --- a/framework/src/java/test/org/uncommons/watchmaker/framework/termination/GenerationCountTest.java +++ b/framework/src/java/test/org/uncommons/watchmaker/framework/termination/GenerationCountTest.java @@ -19,6 +19,8 @@ import org.uncommons.watchmaker.framework.PopulationData; import org.uncommons.watchmaker.framework.TerminationCondition; +import java.util.ArrayList; + /** * Unit test for termination condition that checks the number of evolved generations. * @author Daniel Dyer @@ -29,10 +31,10 @@ public class GenerationCountTest public void testGenerationCounts() { TerminationCondition condition = new GenerationCount(5); - PopulationData data = new PopulationData(new Object(), 0, 0, 0, true, 2, 0, 3, 100); + PopulationData data = new PopulationData(new ArrayList(), new Object(), 0, 0, 0, true, 2, 0, 3, 100); // Generation number 3 is the 4th generation (generation numbers are zero-based). assert !condition.shouldTerminate(data) : "Should not terminate after 4th generation."; - data = new PopulationData(new Object(), 0, 0, 0, true, 2, 0, 4, 100); + data = new PopulationData(new ArrayList(), new Object(), 0, 0, 0, true, 2, 0, 4, 100); // Generation number 4 is the 5th generation (generation numbers are zero-based). assert condition.shouldTerminate(data) : "Should terminate after 5th generation."; } diff --git a/framework/src/java/test/org/uncommons/watchmaker/framework/termination/StagnationTest.java b/framework/src/java/test/org/uncommons/watchmaker/framework/termination/StagnationTest.java index 6efe9fb5..360e3964 100644 --- a/framework/src/java/test/org/uncommons/watchmaker/framework/termination/StagnationTest.java +++ b/framework/src/java/test/org/uncommons/watchmaker/framework/termination/StagnationTest.java @@ -19,6 +19,8 @@ import org.uncommons.watchmaker.framework.PopulationData; import org.uncommons.watchmaker.framework.TerminationCondition; +import java.util.ArrayList; + /** * Unit test for the {@link Stagnation} termination condition. * @author Daniel Dyer @@ -29,13 +31,13 @@ public class StagnationTest public void testFittestCandidateStagnation() { TerminationCondition stagnation = new Stagnation(2, true); - PopulationData data = new PopulationData(new Object(), 2, 1, 0.1, true, 10, 0, 0, 1); + PopulationData data = new PopulationData(new ArrayList(), new Object(), 2, 1, 0.1, true, 10, 0, 0, 1); assert !stagnation.shouldTerminate(data) : "Stagnation should not be triggered for at least 2 more generations."; // Best doesn't improve even though mean does. - data = new PopulationData(new Object(), 1.8, 1.2, 0.1, true, 10, 0, 1, 2); + data = new PopulationData(new ArrayList(), new Object(), 1.8, 1.2, 0.1, true, 10, 0, 1, 2); assert !stagnation.shouldTerminate(data) : "Stagnation should not be triggered for at least 1 more generation."; // Best doesn't improve even though mean does. - data = new PopulationData(new Object(), 2, 1.5, 0.1, true, 10, 0, 2, 3); + data = new PopulationData(new ArrayList(), new Object(), 2, 1.5, 0.1, true, 10, 0, 2, 3); assert stagnation.shouldTerminate(data) : "Stagnation should be triggered after 2 generations without improvement."; } @@ -43,13 +45,13 @@ public void testFittestCandidateStagnation() public void testFittestCandidateStagnationNonNatural() { TerminationCondition stagnation = new Stagnation(2, false); - PopulationData data = new PopulationData(new Object(), 2, 1.5, 0.1, true, 10, 0, 0, 1); + PopulationData data = new PopulationData(new ArrayList(), new Object(), 2, 1.5, 0.1, true, 10, 0, 0, 1); assert !stagnation.shouldTerminate(data) : "Stagnation should not be triggered for at least 2 more generations."; // Best doesn't improve even though mean does. - data = new PopulationData(new Object(), 2.2, 1.2, 0.1, true, 10, 0, 1, 2); + data = new PopulationData(new ArrayList(), new Object(), 2.2, 1.2, 0.1, true, 10, 0, 1, 2); assert !stagnation.shouldTerminate(data) : "Stagnation should not be triggered for at least 1 more generation."; // Best doesn't improve even though mean does. - data = new PopulationData(new Object(), 2, 1, 0.1, true, 10, 0, 2, 3); + data = new PopulationData(new ArrayList(), new Object(), 2, 1, 0.1, true, 10, 0, 2, 3); assert stagnation.shouldTerminate(data) : "Stagnation should be triggered after 2 generations without improvement."; } @@ -58,19 +60,19 @@ public void testFittestCandidateStagnationNonNatural() public void testPopulationMeanStagnation() { TerminationCondition stagnation = new Stagnation(2, true, true); - PopulationData data = new PopulationData(new Object(), 2, 1, 0.1, true, 10, 0, 0, 1); + PopulationData data = new PopulationData(new ArrayList(), new Object(), 2, 1, 0.1, true, 10, 0, 0, 1); assert !stagnation.shouldTerminate(data) : "Stagnation should not be triggered for at least 2 more generations."; // Best doesn't improve but mean does. - data = new PopulationData(new Object(), 2, 1.2, 0.1, true, 10, 0, 1, 2); + data = new PopulationData(new ArrayList(), new Object(), 2, 1.2, 0.1, true, 10, 0, 1, 2); assert !stagnation.shouldTerminate(data) : "Stagnation should not be triggered for at least 2 more generations."; // Best doesn't improve but mean does. - data = new PopulationData(new Object(), 2, 1.5, 0.1, true, 10, 0, 2, 3); + data = new PopulationData(new ArrayList(), new Object(), 2, 1.5, 0.1, true, 10, 0, 2, 3); // Best has stagnated but mean hasn't so shouldn't terminate. assert !stagnation.shouldTerminate(data) : "Stagnation should not be triggered for at least 2 more generations."; // Now we let the mean stagnate...and let the best candidate get fitter... - data = new PopulationData(new Object(), 2.1, 1.5, 0.1, true, 10, 0, 3, 4); + data = new PopulationData(new ArrayList(), new Object(), 2.1, 1.5, 0.1, true, 10, 0, 3, 4); assert !stagnation.shouldTerminate(data) : "Stagnation should not be triggered for at least 1 more generation."; - data = new PopulationData(new Object(), 2.2, 1.5, 0.1, true, 10, 0, 4, 4); + data = new PopulationData(new ArrayList(), new Object(), 2.2, 1.5, 0.1, true, 10, 0, 4, 4); assert stagnation.shouldTerminate(data) : "Stagnation should be triggered after 2 generations without improvement."; } @@ -79,19 +81,19 @@ public void testPopulationMeanStagnation() public void testPopulationMeanStagnationNonNatural() { TerminationCondition stagnation = new Stagnation(2, false, true); - PopulationData data = new PopulationData(new Object(), 2, 1.5, 0.1, true, 10, 0, 0, 1); + PopulationData data = new PopulationData(new ArrayList(), new Object(), 2, 1.5, 0.1, true, 10, 0, 0, 1); assert !stagnation.shouldTerminate(data) : "Stagnation should not be triggered for at least 2 more generations."; // Best doesn't improve but mean does. - data = new PopulationData(new Object(), 2, 1.2, 0.1, true, 10, 0, 1, 2); + data = new PopulationData(new ArrayList(), new Object(), 2, 1.2, 0.1, true, 10, 0, 1, 2); assert !stagnation.shouldTerminate(data) : "Stagnation should not be triggered for at least 2 more generations."; // Best doesn't improve but mean does. - data = new PopulationData(new Object(), 2, 1, 0.1, true, 10, 0, 2, 3); + data = new PopulationData(new ArrayList(), new Object(), 2, 1, 0.1, true, 10, 0, 2, 3); // Best has stagnated but mean hasn't so shouldn't terminate. assert !stagnation.shouldTerminate(data) : "Stagnation should not be triggered for at least 2 more generations."; // Now we let the mean stagnate...and let the best candidate get fitter... - data = new PopulationData(new Object(), 2.1, 1.6, 0.1, true, 10, 0, 3, 4); + data = new PopulationData(new ArrayList(), new Object(), 2.1, 1.6, 0.1, true, 10, 0, 3, 4); assert !stagnation.shouldTerminate(data) : "Stagnation should not be triggered for at least 1 more generation."; - data = new PopulationData(new Object(), 2.2, 1.5, 0.1, true, 10, 0, 4, 4); + data = new PopulationData(new ArrayList(), new Object(), 2.2, 1.5, 0.1, true, 10, 0, 4, 4); assert stagnation.shouldTerminate(data) : "Stagnation should be triggered after 2 generations without improvement."; } } diff --git a/framework/src/java/test/org/uncommons/watchmaker/framework/termination/TargetFitnessTest.java b/framework/src/java/test/org/uncommons/watchmaker/framework/termination/TargetFitnessTest.java index 738f612f..f960431d 100644 --- a/framework/src/java/test/org/uncommons/watchmaker/framework/termination/TargetFitnessTest.java +++ b/framework/src/java/test/org/uncommons/watchmaker/framework/termination/TargetFitnessTest.java @@ -19,6 +19,8 @@ import org.uncommons.watchmaker.framework.PopulationData; import org.uncommons.watchmaker.framework.TerminationCondition; +import java.util.ArrayList; + /** * Unit test for termination condition that checks the best fitness attained so far * against a pre-determined target. @@ -30,9 +32,9 @@ public class TargetFitnessTest public void testNaturalFitness() { TerminationCondition condition = new TargetFitness(10.0d, true); - PopulationData data = new PopulationData(new Object(), 5.0d, 4.0d, 0, true, 2, 0, 0, 100); + PopulationData data = new PopulationData(new ArrayList(), new Object(), 5.0d, 4.0d, 0, true, 2, 0, 0, 100); assert !condition.shouldTerminate(data) : "Should not terminate before target fitness is reached."; - data = new PopulationData(new Object(), 10.0d, 8.0d, 0, true, 2, 0, 0, 100); + data = new PopulationData(new ArrayList(), new Object(), 10.0d, 8.0d, 0, true, 2, 0, 0, 100); assert condition.shouldTerminate(data) : "Should terminate once target fitness is reached."; } @@ -41,9 +43,9 @@ public void testNaturalFitness() public void testNonNaturalFitness() { TerminationCondition condition = new TargetFitness(1.0d, false); - PopulationData data = new PopulationData(new Object(), 5.0d, 4.0d, 0, true, 2, 0, 0, 100); + PopulationData data = new PopulationData(new ArrayList(), new Object(), 5.0d, 4.0d, 0, true, 2, 0, 0, 100); assert !condition.shouldTerminate(data) : "Should not terminate before target fitness is reached."; - data = new PopulationData(new Object(), 1.0d, 3.1d, 0, true, 2, 0, 0, 100); + data = new PopulationData(new ArrayList(), new Object(), 1.0d, 3.1d, 0, true, 2, 0, 0, 100); assert condition.shouldTerminate(data) : "Should terminate once target fitness is reached."; } } diff --git a/framework/src/java/test/org/uncommons/watchmaker/framework/termination/UserAbortTest.java b/framework/src/java/test/org/uncommons/watchmaker/framework/termination/UserAbortTest.java index 34f8ce81..8b8dcf7d 100644 --- a/framework/src/java/test/org/uncommons/watchmaker/framework/termination/UserAbortTest.java +++ b/framework/src/java/test/org/uncommons/watchmaker/framework/termination/UserAbortTest.java @@ -18,6 +18,8 @@ import org.testng.annotations.Test; import org.uncommons.watchmaker.framework.PopulationData; +import java.util.ArrayList; + /** * Unit test for termination condition that checks an abort flag set by the user. * @author Daniel Dyer @@ -29,7 +31,7 @@ public void testAbort() { UserAbort condition = new UserAbort(); // This population data should be irrelevant. - PopulationData data = new PopulationData(new Object(), 0, 0, 0, true, 2, 0, 0, 100); + PopulationData data = new PopulationData(new ArrayList(), new Object(), 0, 0, 0, true, 2, 0, 0, 100); assert !condition.shouldTerminate(data) : "Should not terminate without user abort."; assert !condition.isAborted() : "Should not be aborted without user intervention."; condition.abort(); diff --git a/pom.xml b/pom.xml index 6698f38b..5412d8c8 100644 --- a/pom.xml +++ b/pom.xml @@ -8,7 +8,7 @@ org.uncommons.watchmaker watchmaker - 0.7.2 + 0.7.2-qumul pom watchmaker Watchmaker Framework - Root Project diff --git a/swing/pom.xml b/swing/pom.xml index 690f0dba..514fb815 100644 --- a/swing/pom.xml +++ b/swing/pom.xml @@ -22,7 +22,7 @@ org.uncommons.watchmaker watchmaker - 0.7.2 + 0.7.2-qumul watchmaker-swing diff --git a/swing/src/java/test/org/uncommons/watchmaker/swing/evolutionmonitor/FittestCandidateViewTest.java b/swing/src/java/test/org/uncommons/watchmaker/swing/evolutionmonitor/FittestCandidateViewTest.java index 4411423c..025e6a41 100644 --- a/swing/src/java/test/org/uncommons/watchmaker/swing/evolutionmonitor/FittestCandidateViewTest.java +++ b/swing/src/java/test/org/uncommons/watchmaker/swing/evolutionmonitor/FittestCandidateViewTest.java @@ -17,6 +17,7 @@ import java.awt.BorderLayout; import java.math.BigDecimal; +import java.util.ArrayList; import javax.swing.JComponent; import javax.swing.JFrame; import javax.swing.text.JTextComponent; @@ -65,7 +66,7 @@ public void testUpdate() frame.validate(); frame.setVisible(true); - view.populationUpdate(new PopulationData(BigDecimal.TEN, 10, 5, 2, true, 5, 0, 1, 100)); + view.populationUpdate(new PopulationData(new ArrayList(), BigDecimal.TEN, 10, 5, 2, true, 5, 0, 1, 100)); robot.waitForIdle(); // Check displayed fitness. @@ -96,14 +97,14 @@ public void testUpdateSameCandidate() frame.validate(); frame.setVisible(true); - PopulationData data1 = new PopulationData(BigDecimal.TEN, 10, 5, 2, true, 5, 0, 1, 100); + PopulationData data1 = new PopulationData(new ArrayList(), BigDecimal.TEN, 10, 5, 2, true, 5, 0, 1, 100); // Render the first time. view.populationUpdate(data1); robot.waitForIdle(); JTextComponent component1 = frameFixture.textBox().component(); // Render the same candidate for the second generation. - PopulationData data2 = new PopulationData(BigDecimal.TEN, 10, 5, 2, true, 5, 0, 2, 100); + PopulationData data2 = new PopulationData(new ArrayList(), BigDecimal.TEN, 10, 5, 2, true, 5, 0, 2, 100); view.populationUpdate(data2); robot.waitForIdle(); JTextComponent component2 = frameFixture.textBox().component(); diff --git a/swing/src/java/test/org/uncommons/watchmaker/swing/evolutionmonitor/StatusBarTest.java b/swing/src/java/test/org/uncommons/watchmaker/swing/evolutionmonitor/StatusBarTest.java index 8dc416b8..8df52e63 100644 --- a/swing/src/java/test/org/uncommons/watchmaker/swing/evolutionmonitor/StatusBarTest.java +++ b/swing/src/java/test/org/uncommons/watchmaker/swing/evolutionmonitor/StatusBarTest.java @@ -16,6 +16,7 @@ package org.uncommons.watchmaker.swing.evolutionmonitor; import java.awt.BorderLayout; +import java.util.ArrayList; import javax.swing.JFrame; import org.fest.swing.core.BasicRobot; import org.fest.swing.core.Robot; @@ -64,7 +65,7 @@ public void testFieldUpdates() assert frameFixture.label("Generations").text().equals("N/A") : "Wrong initial text for generations label."; assert frameFixture.label("Time").text().equals("N/A") : "Wrong initial text for elapsed time label."; - statusBar.populationUpdate(new PopulationData(new Object(), 10, 8, 2, true, 10, 1, 0, 36610000)); + statusBar.populationUpdate(new PopulationData(new ArrayList(), new Object(), 10, 8, 2, true, 10, 1, 0, 36610000)); assert frameFixture.label("Population").text().equals("10") : "Wrong value for popluation label."; assert frameFixture.label("Elitism").text().equals("1") : "Wrong value for elitism label."; // Generation count is number + 1 (because generations start at zero). @@ -89,8 +90,8 @@ public void testFieldUpdatesForIslandMode() assert frameFixture.label("Generations").text().equals("N/A") : "Wrong initial text for generations label."; assert frameFixture.label("Time").text().equals("N/A") : "Wrong initial text for elapsed time label."; - statusBar.islandPopulationUpdate(0, new PopulationData(new Object(), 10, 8, 2, true, 10, 1, 0, 36610000)); - statusBar.populationUpdate(new PopulationData(new Object(), 10, 8, 2, true, 50, 1, 0, 36610000)); + statusBar.islandPopulationUpdate(0, new PopulationData(new ArrayList(), new Object(), 10, 8, 2, true, 10, 1, 0, 36610000)); + statusBar.populationUpdate(new PopulationData(new ArrayList(), new Object(), 10, 8, 2, true, 50, 1, 0, 36610000)); assert frameFixture.label("Population").text().equals("5x10") : "Wrong value for popluation label."; assert frameFixture.label("Elitism").text().equals("5x1") : "Wrong value for elitism label."; // Generation count is number + 1 (because generations start at zero). @@ -112,7 +113,7 @@ public void testTimeFormat() // Previous test checks two-digit field values, this test checks that single-digit // values and zeros are correctly padded. - statusBar.populationUpdate(new PopulationData(new Object(), 10, 8, 2, true, 10, 1, 0, 1000)); + statusBar.populationUpdate(new PopulationData(new ArrayList(), new Object(), 10, 8, 2, true, 10, 1, 0, 1000)); assert frameFixture.label("Time").text().equals("00:00:01"); }