|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--ants.messor.ArrayMessorPheromone
Field Summary | |
static String |
PAR_CAPACITY
Parameter name used to read PheromoneCapacity |
static String |
PAR_MAXVISITS
Parameter name used to read max visits |
static String |
PAR_MINVISITS
Parameter name used to read visits |
static String |
PAR_TIMERANGE
Parameter name used to read TimeRange |
Fields inherited from interface ants.messor.MessorPheromone |
NAME |
Fields inherited from interface anthill.storage.Storage |
DOC_STORAGE, PHR_STORAGE, URL_STORAGE |
Constructor Summary | |
ArrayMessorPheromone(Factory factory,
String name)
Creates a new ArrayMessorPheromone, with the specified capacity. |
Method Summary | |
void |
addNest(NestId id,
int load)
Add the specified node and its associated load to the pheromone table. |
void |
clear()
Restores the object to its initial state. |
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 class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final String PAR_CAPACITY
public static final String PAR_TIMERANGE
public static final String PAR_MAXVISITS
public static final String PAR_MINVISITS
Constructor Detail |
public ArrayMessorPheromone(Factory factory, String name)
factory
- the factory to be used to read configuration arguments
and to create other configurable objectsname
- the name that is associated to this instance in the
configuration fileMethod Detail |
public void clear()
clear
in interface Clearable
public void addNest(NestId id, int load)
MessorPheromone
addNest
in interface MessorPheromone
public NestId getNextMaxNest(double deviation)
getNextMaxNest
in interface MessorPheromone
public NestId getNextMinNest(double deviation)
getNextMinNest
in interface MessorPheromone
public NestId getRandomNest()
getRandomNest
in interface MessorPheromone
public void update(NestId local, NestId[] nests, int[] loads)
update
in interface MessorPheromone
public void update(NestId local, Neighbour[] nests)
update
in interface MessorPheromone
public boolean isUnderloaded()
isUnderloaded
in interface MessorPheromone
public boolean isOverladed()
isOverladed
in interface MessorPheromone
public PheromoneEntry[] getEntryTable()
getEntryTable
in interface MessorPheromone
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |