

The agent ID is a number identifying the turtle in NetLogo that act on behalf of the Jason agent. In brief, an AgentSpeak literal was introduced in the Jason side to denote when the agent is sending a command to the environment: sendCmdNL/2 which arguments are the agent ID and the intended command.

The translation procedure is carried out by the environment Jason Java classes and it is not detailed here for the sake of simplicity. In Table 2, some of this translations are presented regarding some sensing and acting commands. Thus, the following classes are required: Agent, ActionExec, TransitionSystem, Literal (contained in package jason. In both of the integration cases aforementioned, in order to send perceptions and receive actions from the environment to Jason's agents and vice versa, a process of translation from the NetLogo list-based representation to the AgentSpeak Prolog-like representation have to be done. As can be seen, both systems interact with each other through their corresponding APIs, allowing the Jason agents to act in the environment using the NetLogo turtles and updating their percepts by means of requesting the execution of actions and updates about the current state of the environment. Figure 2 depicts the interaction diagram in UML. The NetLogo-in-Jason option, besides being the natural way to implement our ABM, constitutes, to our best knowledge, a novel contribution in MAS development. Table 1 summarizes the advantages of interconnecting Jason and NetLogo (J+N) contrasted with both tools taken in isolation (any feature can be exploited separately or in a combined way in J+N). This conveys the flexibility to define and represent the elements and entities of a simulation, i.e., there is a need of having purely reactive agents to represent environmental elements (like fire) and simultaneously agents with more robust deliberative processes are required to represent human individuals/organizations (like fire-fighters). In Figure 1, this composition is depicted. No need to say, both agents can exploit the set of methods and functions defined in their correspondingly framework, including their communication systems where the expressibility of their higher and lower level representations (defined by speech acts in Jason and built-in functions in NetLogo) can be exploited as required. For instance, a Jason agent that is provided with BDI plans can exploit the reactive functions implemented in its belonging NetLogo turtle: to-do to act directly in the environment and to-report to perceive the current state of affairs resulting in an updating of its beliefs and possibly triggering other plans. capability to define reactive agents besides BDI agents working altogether in the same system makes it possible to combine features and abilities belonging to both kinds of agents.
