public class IndCAN extends Individual
Defines the individual of the population
Modifier and Type | Field and Description |
---|---|
CromCAN |
cromosoma
Individual contents (Canonical chromosome).
|
crowdingDistance, cubr, cubre, evaluado, medidas, n_eval, numberOfViolatedConstraints, overallConstraintViolation, rank, tamano
Constructor and Description |
---|
IndCAN()
Creates new instance of Canonical individual
|
IndCAN(int lenght,
int neje,
int nobj)
Creates new instance of Canonical individual
|
Modifier and Type | Method and Description |
---|---|
void |
BsdInitInd(TableVar Variables,
float porcVar,
int neje,
java.lang.String nFile)
Creates biased instance of Canonical individual
|
void |
CobInitInd(Population pop,
TableVar Variables,
TableDat Examples,
float porcCob,
int nobj,
java.lang.String nFile)
Creates instance of Canonical individual based on coverage
|
void |
copyIndiv(Individual a,
int neje,
int nobj)
Copy the indicaded individual in "this" individual
|
void |
evalInd(Genetic AG,
TableVar Variables,
TableDat Examples)
Evaluate a individual.
|
int |
getCromElem(int pos)
Returns the indicated gene of the Chromosome
|
boolean |
getCromGeneElem(int pos,
int elem)
Returns the value of the indicated gene for the variable
|
CromCAN |
getIndivCrom()
Returns the Chromosome
|
CromCAN |
getIndivCromCAN()
Returns the indicated Chromosome
|
CromDNF |
getIndivCromDNF()
Returns the indicated Chromosome
|
int |
NumInterv(float value,
int num_var,
TableVar Variables)
Returns the number of the interval of the indicated variable to which belongs
the value.
|
void |
Print(java.lang.String nFile)
Method to Print the contents of the individual
|
void |
RndInitInd(TableVar Variables,
int neje,
java.lang.String nFile)
Creates random instance of Canonical individual
|
void |
setCromElem(int pos,
int val)
Sets the value of the indicated gene of the Chromosome
|
void |
setCromGeneElem(int pos,
int elem,
boolean val)
Sets the value of the indicated gene of the Chromosome
|
getCnfValue, getCrowdingDistance, getIndivCovered, getIndivEvaluated, getMeasures, getMeasureValue, getNEval, getNumberViolatedConstraints, getOverallConstraintViolation, getRank, setCnfValue, setCrowdingDistance, setIndivEvaluated, setMeasureValue, setNEval, setNumberViolatedConstraints, setOverallConstraintViolation, setRank
public CromCAN cromosoma
Individual contents (Canonical chromosome).
public IndCAN()
Creates new instance of Canonical individual
public IndCAN(int lenght, int neje, int nobj)
lenght
- Lenght of the individualneje
- Number of examplesnobj
- Number of objectivespublic void RndInitInd(TableVar Variables, int neje, java.lang.String nFile)
Creates random instance of Canonical individual
RndInitInd
in class Individual
Variables
- Variables structureneje
- Number of exaplesnFile
- Fichero to write the individualpublic void BsdInitInd(TableVar Variables, float porcVar, int neje, java.lang.String nFile)
Creates biased instance of Canonical individual
BsdInitInd
in class Individual
Variables
- Variables structureporcVar
- Percentage of variables to form the individualneje
- Number of exaplesnFile
- Fichero to write the individualpublic void CobInitInd(Population pop, TableVar Variables, TableDat Examples, float porcCob, int nobj, java.lang.String nFile)
Creates instance of Canonical individual based on coverage
CobInitInd
in class Individual
pop
- Actual populationVariables
- Variables structureExamples
- Examples structureporcCob
- Percentage of variables to form the individualnobj
- Number of objectivesnFile
- Fichero to write the individualpublic CromCAN getIndivCrom()
Returns the Chromosome
public int getCromElem(int pos)
Returns the indicated gene of the Chromosome
getCromElem
in class Individual
pos
- Position of the genepublic boolean getCromGeneElem(int pos, int elem)
Returns the value of the indicated gene for the variable
getCromGeneElem
in class Individual
pos
- Position of the variableelem
- Position of the genepublic void setCromElem(int pos, int val)
Sets the value of the indicated gene of the Chromosome
setCromElem
in class Individual
pos
- Position of the variableval
- Value of the variablepublic void setCromGeneElem(int pos, int elem, boolean val)
Sets the value of the indicated gene of the Chromosome
setCromGeneElem
in class Individual
pos
- Position of the variableelem
- Position of the geneval
- Value of the variablepublic CromCAN getIndivCromCAN()
Returns the indicated Chromosome
getIndivCromCAN
in class Individual
public CromDNF getIndivCromDNF()
Returns the indicated Chromosome
getIndivCromDNF
in class Individual
public void copyIndiv(Individual a, int neje, int nobj)
Copy the indicaded individual in "this" individual
copyIndiv
in class Individual
a
- The individual to Copyneje
- Number of examplesnobj
- Number of objectivespublic void evalInd(Genetic AG, TableVar Variables, TableDat Examples)
Evaluate a individual. This function evaluates an individual.
evalInd
in class Individual
AG
- Genetic algorithmVariables
- Variables structureExamples
- Examples structurepublic int NumInterv(float value, int num_var, TableVar Variables)
Returns the number of the interval of the indicated variable to which belongs the value. It is performed seeking the greater belonging degree of the value to the fuzzy sets defined for the variable
NumInterv
in class Individual
value
- Value to calculatenum_var
- Number of the variableVariables
- Variables structurepublic void Print(java.lang.String nFile)
Method to Print the contents of the individual
Print
in class Individual
nFile
- Fichero to write the individual