ants.messor
Interface MessorPheromone

All Superinterfaces:
Clearable, ResourceManager, Storage
All Known Implementing Classes:
ArrayMessorPheromone

public interface MessorPheromone
extends Clearable, Storage

Version:
$Revision: 1.7 $
Author:
Alberto Montresor

Field Summary
static String NAME
          Identifier used in the configuration files
 
Fields inherited from interface anthill.storage.Storage
DOC_STORAGE, PHR_STORAGE, URL_STORAGE
 
Method Summary
 void addNest(NestId id, int load)
          Add the specified node and its associated load to the pheromone table.
 PheromoneEntry[] getEntryTable()
          Add the nest identifiers contained in the nest to the set identified
 NestId getNextMaxNest(double deviation)
          Returns the next nest to be followed, depending on some parameters and on the content of the storage.
 NestId getNextMinNest(double deviation)
          Returns the next nest to be followed, depending on some parameters and on the content of the storage.
 NestId getRandomNest()
           
 boolean isOverladed()
          Returns true if the node is overloaded by ants, that have to be removed from the nest.
 boolean isUnderloaded()
          If the number of visits is smaller than the minimum amount of visits to be received, returns the number of missing visits.
 void update(NestId local, Neighbour[] nests)
           
 void update(NestId local, NestId[] nests, int[] loads)
           
 
Methods inherited from interface anthill.util.Clearable
clear
 

Field Detail

NAME

public static final String NAME
Identifier used in the configuration files

See Also:
Constant Field Values
Method Detail

addNest

public void addNest(NestId id,
                    int load)
Add the specified node and its associated load to the pheromone table.


getNextMaxNest

public NestId getNextMaxNest(double deviation)
Returns the next nest to be followed, depending on some parameters and on the content of the storage.


getNextMinNest

public NestId getNextMinNest(double deviation)
Returns the next nest to be followed, depending on some parameters and on the content of the storage.


getRandomNest

public NestId getRandomNest()

update

public void update(NestId local,
                   NestId[] nests,
                   int[] loads)

update

public void update(NestId local,
                   Neighbour[] nests)

isUnderloaded

public boolean isUnderloaded()
If the number of visits is smaller than the minimum amount of visits to be received, returns the number of missing visits. Return 0 otherwise.


isOverladed

public boolean isOverladed()
Returns true if the node is overloaded by ants, that have to be removed from the nest.


getEntryTable

public PheromoneEntry[] getEntryTable()
Add the nest identifiers contained in the nest to the set identified