Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
mcychan committed Jun 20, 2024
1 parent ab462be commit cbe38da
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/hk/edu/gaSchedule/algorithm/Dlba.java
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,10 @@ public class Dlba<T extends Chromosome<T> > extends NsgaIII<T> {
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;
Expand Down
4 changes: 4 additions & 0 deletions src/hk/edu/gaSchedule/algorithm/Fpa.java
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ public class Fpa<T extends Chromosome<T> > extends NsgaIII<T> {
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;
}
Expand Down

0 comments on commit cbe38da

Please sign in to comment.