Package org.opt4j.optimizers.mopso
Class Particle
java.lang.Object
org.opt4j.core.Individual
org.opt4j.optimizers.mopso.Particle
The
Particle
extends the Individual
by an id, a velocity
Genotype
, a personal best Genotype
and the corresponding best
Objectives
.-
Nested Class Summary
Nested classes/interfaces inherited from class org.opt4j.core.Individual
Individual.State
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetBest()
Returns the best position.Returns the best objectives.int
getId()
Returns the id.Returns the velocity.void
setBest
(Genotype best, Objectives objectives) Sets the best position.void
setId
(int id) Sets the id.void
setVelocity
(Genotype velocity) Sets the velocity.Methods inherited from class org.opt4j.core.Individual
getGenotype, getObjectives, getPhenotype, getState, isDecoded, isEvaluated, setGenotype, setObjectives, setPhenotype, setState
-
Constructor Details
-
Particle
public Particle()
-
-
Method Details
-
getVelocity
Returns the velocity.- Returns:
- the velocity
- See Also:
-
setVelocity
Sets the velocity.- Parameters:
velocity
- the velocity to set- See Also:
-
getBest
Returns the best position.- Returns:
- the best
- See Also:
-
getBestObjectives
Returns the best objectives.- Returns:
- the best objectives
- See Also:
-
setBest
Sets the best position.- Parameters:
best
- the best to setobjectives
- the corresponding best objectives- See Also:
-
getId
Returns the id.- Returns:
- the id
- See Also:
-
setId
Sets the id.- Parameters:
id
- the id to set- See Also:
-