net.sourceforge.cilib.boa.bee
Class ExplorerBee

java.lang.Object
  extended by net.sourceforge.cilib.boa.bee.ExplorerBee
All Implemented Interfaces:
Serializable, Cloneable

public class ExplorerBee
extends Object
implements Cloneable

Represents the explorer bee in the algorithm. To emulate the functionality of the explorer bee in the hive, a random search position is generated upon request if it is allowed. Keeps track of how many updates have occurred via numberOfUpdates and which iteration the previous update occurred.

Author:
Andrich
See Also:
Serialized Form

Constructor Summary
ExplorerBee()
          Default constructor.
ExplorerBee(ExplorerBee copy)
          Copy constructor.
 
Method Summary
 ExplorerBee getClone()
          Create a cloned copy of the current object and return it.
 ControlParameter getExplorerBeeUpdateLimit()
           
 Vector getNewPosition(Vector position)
          Returns a new random position.
 boolean searchAllowed()
          Verifies it is allowed for a worker bee to convert to an explorer bee.
 void setExplorerBeeUpdateLimit(ControlParameter explorerBeeUpdateLimit)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ExplorerBee

public ExplorerBee()
Default constructor. Creates a new instance of ExplorerBee with reasonable default values.


ExplorerBee

public ExplorerBee(ExplorerBee copy)
Copy constructor. Creates a copy of the provided instance.

Parameters:
copy - reference to explorer bee that deep copy is made of.
Method Detail

getClone

public ExplorerBee getClone()
Create a cloned copy of the current object and return it. In general the created copy will be a deep copy of the provided instance. As a result this operation an be quite expensive if used incorrectly.

Specified by:
getClone in interface Cloneable
Returns:
An exact clone of the current object instance.
See Also:
Object.clone()

searchAllowed

public boolean searchAllowed()
Verifies it is allowed for a worker bee to convert to an explorer bee.

Returns:
whether the search is allowed.

getNewPosition

public Vector getNewPosition(Vector position)
Returns a new random position.

Parameters:
position - random position with same dimension and bounds as given position.
Returns:
The new position.

getExplorerBeeUpdateLimit

public ControlParameter getExplorerBeeUpdateLimit()

setExplorerBeeUpdateLimit

public void setExplorerBeeUpdateLimit(ControlParameter explorerBeeUpdateLimit)


Copyright © 2009 CIRG. All Rights Reserved.