The JAS-mine platform‎ > ‎Documentation‎ > ‎Cookbook‎ > ‎

The agents

Agent classes -and possibly the Model itself, if it is required to implement some population-level action (e.g. alignment, matching, etc.)- implement the EventListener interface which requires the definition of the callback method onEvent(). By implementing this interface an agent or any other class can respond to specific events that are planned in the JAS-mine scheduler. The events must be defined within the class itself using a specific enum.

This is the only technical element required to define an agent. From a modeling point of view an agent is characterized by the fact that it represents an entity of the simulated system and that it possesses state variables and behavioral processes/algorithms which can modify such variables and interact with other system elements.

The semantic difference between an agent and a simple class, specified according to the OOP paradigm, is therefore merely logical. All the elements required to define an agent are present in a generic class: properties and methods.