Class 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
    • 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.
      • Methods inherited from class fr.univ_artois.lgi2a.similar.extendedkernel.libs.abstractimpl.AbstractAgtDecisionModel

        getLevel
    • Constructor Detail

      • AntDecisionModel

        public AntDecisionModel​(AntSimulationParameters param,
                                double x,
                                double y)
        Constructor of the decision model
        Parameters:
        param - is a parameters of the simulation
        x - is a position of the base on the x axe
        y - 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 agent
        castedPerceivedData - the perceived data
        id - the id of the pheromone field
        goToBase - true if the ant returns to the base immediately
        d - the value divided the angle to change the direction
        Returns:
        the direction towards the max value of perceived pheromone.