net.sourceforge.cilib.pso.dynamic
Class ChargedParticle

java.lang.Object
  extended by net.sourceforge.cilib.entity.AbstractEntity
      extended by net.sourceforge.cilib.pso.particle.AbstractParticle
          extended by net.sourceforge.cilib.pso.particle.StandardParticle
              extended by net.sourceforge.cilib.pso.dynamic.DynamicParticle
                  extended by net.sourceforge.cilib.pso.dynamic.ChargedParticle
All Implemented Interfaces:
Serializable, Comparable<Entity>, CandidateSolution, Entity, Particle, SocialEntity, Cloneable

public class ChargedParticle
extends DynamicParticle

Charged Particle used by charged PSO (ChargedVelocityUpdate). The only difference from DynamicParticle is that a charged particle stores the charge magnitude and the inialisation strategy for charge.

Author:
Anna Rakitianskaia
See Also:
Serialized Form

Field Summary
 
Fields inherited from class net.sourceforge.cilib.pso.particle.StandardParticle
neighbourhoodBest
 
Fields inherited from class net.sourceforge.cilib.pso.particle.AbstractParticle
neighbourhoodBestUpdateStrategy, personalBestUpdateStrategy, positionInitialisationStrategy, positionUpdateStrategy, velocityInitialisationStrategy, velocityUpdateStrategy
 
Constructor Summary
ChargedParticle()
           
ChargedParticle(ChargedParticle copy)
           
 
Method Summary
 boolean equals(Object object)
           It doesn;t make sense to compare the meta data of the entity.
 double getCharge()
           
 ChargedParticleInitialisationStrategy getChargedParticleInitialisationStrategy()
           
 ChargedParticle getClone()
          Make a clone of the Entity the exact semantics of the clone method will be defined by the classes that implements this interface.
 int hashCode()
          
 void initialise(OptimisationProblem problem)
          Intialise the Entity to something meaningful and within the problem space.
 void setCharge(double charge)
           
 void setChargedParticleInitialisationStrategy(ChargedParticleInitialisationStrategy chargedParticleInitialisationStrategy)
           
 
Methods inherited from class net.sourceforge.cilib.pso.dynamic.DynamicParticle
reevaluate
 
Methods inherited from class net.sourceforge.cilib.pso.particle.StandardParticle
calculateFitness, getBehaviouralParameters, getBestFitness, getBestPosition, getDimension, getNeighbourhoodBest, getPosition, getVelocity, reinitialise, setBehaviouralParameters, setDimension, setNeighbourhoodBest, updateControlParameters, updatePosition, updateVelocity
 
Methods inherited from class net.sourceforge.cilib.pso.particle.AbstractParticle
calculateFitness, compareTo, getNeighbourhoodBestUpdateStrategy, getPersonalBestUpdateStrategy, getPositionInitialisationStrategy, getPositionUpdateStrategy, getSocialBestFitness, getVelocityInitialisationStrategy, getVelocityUpdateStrategy, setNeighbourhoodBestUpdateStrategy, setPersonalBestUpdateStrategy, setPositionInitialisationStrategy, setPositionUpdateStrategy, setVelocityInitialisationStrategy, setVelocityUpdateStrategy
 
Methods inherited from class net.sourceforge.cilib.entity.AbstractEntity
getCandidateSolution, getFitness, getFitnessCalculator, getId, getProperties, setCandidateSolution, setFitnessCalculator, setProperties
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sourceforge.cilib.entity.Particle
getFitness
 
Methods inherited from interface net.sourceforge.cilib.entity.Entity
getCandidateSolution, getFitnessCalculator, getId, getProperties, setCandidateSolution, setProperties
 

Constructor Detail

ChargedParticle

public ChargedParticle()

ChargedParticle

public ChargedParticle(ChargedParticle copy)
Method Detail

getClone

public ChargedParticle getClone()
Description copied from class: StandardParticle
Make a clone of the Entity the exact semantics of the clone method will be defined by the classes that implements this interface.

Specified by:
getClone in interface Entity
Specified by:
getClone in interface Particle
Specified by:
getClone in interface Cloneable
Overrides:
getClone in class DynamicParticle
Returns:
the cloned object
See Also:
Object.clone()

equals

public boolean equals(Object object)
Description copied from class: AbstractParticle
It doesn;t make sense to compare the meta data of the entity. In other words, the properties of the entity may vary, but the entity is still the same entity.

Overrides:
equals in class StandardParticle
Parameters:
object - The object to compare equality.

hashCode

public int hashCode()
Description copied from class: AbstractParticle

Overrides:
hashCode in class StandardParticle

getCharge

public double getCharge()
Returns:
the charge

setCharge

public void setCharge(double charge)
Parameters:
charge - the charge to set

getChargedParticleInitialisationStrategy

public ChargedParticleInitialisationStrategy getChargedParticleInitialisationStrategy()
Returns:
the chargedParticleInitialisationStrategy

setChargedParticleInitialisationStrategy

public void setChargedParticleInitialisationStrategy(ChargedParticleInitialisationStrategy chargedParticleInitialisationStrategy)
Parameters:
chargedParticleInitialisationStrategy - the chargedParticleInitialisationStrategy to set

initialise

public void initialise(OptimisationProblem problem)
Description copied from class: StandardParticle
Intialise the Entity to something meaningful and within the problem space. The exact semantics of this method is defined by the classes that implements this interface. Take note. The Intialiser is obsolete the new Type System handles it now. Init can be left out now.

Specified by:
initialise in interface Entity
Overrides:
initialise in class StandardParticle
Parameters:
problem - The OptimisationProblem to based the initialisation on.


Copyright © 2009 CIRG. All Rights Reserved.