Class AntDecisionModel
- java.lang.Object
-
- fr.univ_artois.lgi2a.similar.extendedkernel.libs.abstractimpl.AbstractAgtDecisionModel
-
- fr.univ_artois.lgi2a.similar2logo.examples.ants.model.AntDecisionModel
-
- All Implemented Interfaces:
fr.univ_artois.lgi2a.similar.extendedkernel.agents.IAgtDecisionModel
public class AntDecisionModel extends fr.univ_artois.lgi2a.similar.extendedkernel.libs.abstractimpl.AbstractAgtDecisionModel
The decision model of the ants".- Author:
- Yoann Kubera, Gildas Morvan, Antoine Lecoutre
-
-
Constructor Summary
Constructors Constructor Description AntDecisionModel(AntSimulationParameters param, double x, double y)
Constructor of the decision model
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
decide(fr.univ_artois.lgi2a.similar.microkernel.SimulationTimeStamp timeLowerBound, fr.univ_artois.lgi2a.similar.microkernel.SimulationTimeStamp timeUpperBound, fr.univ_artois.lgi2a.similar.microkernel.agents.IGlobalState globalState, fr.univ_artois.lgi2a.similar.microkernel.agents.ILocalStateOfAgent publicLocalState, fr.univ_artois.lgi2a.similar.microkernel.agents.ILocalStateOfAgent privateLocalState, fr.univ_artois.lgi2a.similar.microkernel.agents.IPerceivedData perceivedData, fr.univ_artois.lgi2a.similar.microkernel.influences.InfluencesMap producedInfluences)
double
goToPheromone(TurtlePLSInLogo castedPublicLocalState, TurtlePerceivedData castedPerceivedData, String id, boolean goToBase, double d)
Method to follow a pheromone gradient.
-
-
-
Constructor Detail
-
AntDecisionModel
public AntDecisionModel(AntSimulationParameters param, double x, double y)
Constructor of the decision model- Parameters:
param
- is a parameters of the simulationx
- is a position of the base on the x axey
- is a position of the base on the y axe
-
-
Method Detail
-
decide
public void decide(fr.univ_artois.lgi2a.similar.microkernel.SimulationTimeStamp timeLowerBound, fr.univ_artois.lgi2a.similar.microkernel.SimulationTimeStamp timeUpperBound, fr.univ_artois.lgi2a.similar.microkernel.agents.IGlobalState globalState, fr.univ_artois.lgi2a.similar.microkernel.agents.ILocalStateOfAgent publicLocalState, fr.univ_artois.lgi2a.similar.microkernel.agents.ILocalStateOfAgent privateLocalState, fr.univ_artois.lgi2a.similar.microkernel.agents.IPerceivedData perceivedData, fr.univ_artois.lgi2a.similar.microkernel.influences.InfluencesMap producedInfluences)
-
goToPheromone
public double goToPheromone(TurtlePLSInLogo castedPublicLocalState, TurtlePerceivedData castedPerceivedData, String id, boolean goToBase, double d)
Method to follow a pheromone gradient.- Parameters:
castedPublicLocalState
- the local state of the actual agentcastedPerceivedData
- the perceived dataid
- the id of the pheromone fieldgoToBase
-true
if the ant returns to the base immediatelyd
- the value divided the angle to change the direction- Returns:
- the direction towards the max value of perceived pheromone.
-
-