diff --git a/src/hk/edu/gaSchedule/algorithm/Dlba.java b/src/hk/edu/gaSchedule/algorithm/Dlba.java index 341e56b..a95f675 100644 --- a/src/hk/edu/gaSchedule/algorithm/Dlba.java +++ b/src/hk/edu/gaSchedule/algorithm/Dlba.java @@ -32,6 +32,10 @@ public class Dlba > extends NsgaIII { public Dlba(T prototype, int numberOfCrossoverPoints, int mutationSize, float crossoverProbability, float mutationProbability) { super(prototype, numberOfCrossoverPoints, mutationSize, crossoverProbability, mutationProbability); + + // there should be at least 5 chromosomes in population + if (_populationSize < 5) + _populationSize = 5; _alpha = 0.9; _pa = .25; diff --git a/src/hk/edu/gaSchedule/algorithm/Fpa.java b/src/hk/edu/gaSchedule/algorithm/Fpa.java index 674850c..dedd8b4 100644 --- a/src/hk/edu/gaSchedule/algorithm/Fpa.java +++ b/src/hk/edu/gaSchedule/algorithm/Fpa.java @@ -28,6 +28,10 @@ public class Fpa > extends NsgaIII { public Fpa(T prototype, int numberOfCrossoverPoints, int mutationSize, float crossoverProbability, float mutationProbability) { super(prototype, numberOfCrossoverPoints, mutationSize, crossoverProbability, mutationProbability); + + // there should be at least 5 chromosomes in population + if (_populationSize < 5) + _populationSize = 5; _pa = .25; }