net.sourceforge.cilib.boa.bee
Class WorkerBee

java.lang.Object
  extended by net.sourceforge.cilib.entity.AbstractEntity
      extended by net.sourceforge.cilib.boa.bee.AbstractBee
          extended by net.sourceforge.cilib.boa.bee.WorkerBee
All Implemented Interfaces:
Serializable, Comparable<Entity>, HoneyBee, CandidateSolution, Entity, Cloneable

public class WorkerBee
extends AbstractBee
implements HoneyBee

A worker bee that forages for food and updates the hive information by dancing.

Author:
Andrich
See Also:
Serialized Form

Field Summary
 
Fields inherited from class net.sourceforge.cilib.boa.bee.AbstractBee
dimension, positionUpdateStrategy, targetSelectionStrategy
 
Constructor Summary
WorkerBee()
          Create a new instance with reasonable defaults set.
WorkerBee(WorkerBee copy)
          Copy constructor.
 
Method Summary
 WorkerBee getClone()
          Make a clone of the Entity the exact semantics of the clone method will be defined by the classes that implements this interface.
 ControlParameter getForageLimit()
          Get the forage limit.
 void setForageLimit(ControlParameter forageLimit)
          Set the forage limit.
 void updatePosition()
          Updates the position of the bee based on the neighboring nectar content.
 
Methods inherited from class net.sourceforge.cilib.boa.bee.AbstractBee
calculateFitness, calculateFitness, compareTo, getDimension, getPosition, getPositionUpdateStrategy, initialise, reinitialise, setPosition
 
Methods inherited from class net.sourceforge.cilib.entity.AbstractEntity
equals, getBestFitness, getCandidateSolution, getFitness, getFitnessCalculator, getId, getProperties, hashCode, 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.boa.bee.HoneyBee
getFitness, getPosition, getPositionUpdateStrategy, setPosition
 
Methods inherited from interface net.sourceforge.cilib.entity.Entity
calculateFitness, calculateFitness, compareTo, getBestFitness, getCandidateSolution, getDimension, getFitnessCalculator, getId, getProperties, initialise, reinitialise, setCandidateSolution, setProperties
 

Constructor Detail

WorkerBee

public WorkerBee()
Create a new instance with reasonable defaults set.


WorkerBee

public WorkerBee(WorkerBee copy)
Copy constructor. Create a copy of the provided instance.

Parameters:
copy - The isntance to copy.
Method Detail

getClone

public WorkerBee getClone()
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 HoneyBee
Specified by:
getClone in interface Entity
Specified by:
getClone in interface Cloneable
Specified by:
getClone in class AbstractBee
Returns:
the cloned object
See Also:
Object.clone()

updatePosition

public void updatePosition()
Updates the position of the bee based on the neighboring nectar content.

Specified by:
updatePosition in interface HoneyBee
Specified by:
updatePosition in class AbstractBee

getForageLimit

public ControlParameter getForageLimit()
Get the forage limit.

Returns:
The ControlParameter representing the forage limit.

setForageLimit

public void setForageLimit(ControlParameter forageLimit)
Set the forage limit.

Parameters:
forageLimit - The limit to set.


Copyright © 2009 CIRG. All Rights Reserved.