public class WeekFitness extends Fitness<ObjectChromosome>
Fitness.SortingMode
Constructor and Description |
---|
WeekFitness(int objectives,
boolean maximize,
Student[] student,
Week week,
int targetHours)
Creates a new fitness with the given number of objectives and a flag indicating
if consider the maximum score or the minum as better.
|
Modifier and Type | Method and Description |
---|---|
void |
evaluate(Individual<ObjectChromosome> individual)
Evaluates a single
Individual . |
adjust, clone, dominance, dominance, dominates, dominates, duplicate, getBiggerIsBetter, getNumOfObjectives, init, init, partialsort, partialsort, prepare, setSortingMode, sort, sort, sort, sort, sort, sort, sort, sort
public WeekFitness(int objectives, boolean maximize, Student[] student, Week week, int targetHours)
objectives
- numbers of objectivemaximize
- when true the algorithm will find solution with maximum score;
false otherwisestudent
- the array of students that lives in the houseweek
- the week to evaluatetargetHours
- the amount of hours student have to workpublic void evaluate(Individual<ObjectChromosome> individual)
Fitness
Individual
. This evaluation of individuals is
specifically related to the problem to solve.
evaluate
in class Fitness<ObjectChromosome>
individual
- the individual to be evaluated