## 3 MOVICLOUD Platform
### Structure of the Agents  
Figure 6 shows in detail the structure of each of the agents, which consists of three large blocks: (i) a communication module, which will allow the agent to communicate with the other agents of the platform; (ii) a reasoning module, which is detailed below; and (iii) an agent communication module with the 3D environment, formed by a sensor and an effector.  
Figure 5: Virtual Organization database schema.  
For the definition and implementation of the reasoning module of agents within the platform, the belief-desire-intention (BDI) model [26] has been selected. The behavior of the system is therefore determined by the mental attitudes of the agents. For this reason, it is fundamental to achieve a correct operation of the system when the deliberation processes are limited by the resources.  
In each iteration, the interpreter first reads an event queue and generates a list of options (possible goals to be achieved). Then it selects the best of these actions and adds them to the structure of intentions. If there is any intention to perform an atomic action, the agent executes it. Events that may occur during the interpreter's execution cycle are added to the queue. Finally, the agent modifies the structures of intentions and desires by eliminating both the intentions and desires that have been successfully carried out and those that are not possible. With this model, deliberative systems are more appropriate for dynamic environments and are also more suitable for applications that work in real time. In this way, this model perfectly adapts to the requirements of the platform that is presented.  
In addition to the reasoning module, it is necessary to introduce two additional modules that allow the agent to obtain information about the environment (**sensor**), as well as to be able to modify it (**effector**). It is necessary that these modules are distributed, having one component present in the agent's own implementation within the agent platform, and another component within the 3D environment. In this way, the agent is able to be aware of the state of the three-dimensional environment that has been rendered for the simulation in progress, monitoring the changes that are produced in the virtual world.  
The agent model presented above is designed to represent different actors involved in the simulation in representation of elements such as human beings, or similar. However, it is also necessary to introduce another type of agents: **environment agents**. These agents represent elements of the environment with which the other agents can interact directly. Examples of these agents can be telephones, elevators, photocopiers, etc. These agents are not aware of the environment around them, they will only be aware of their internal state, so they will lack of sensors. Any interaction with other agents cannot be initiated by an environment agent. When an agent requests an interaction with them, it will consult their internal state, and will communicate the pertinent information to the agent who finally, will determine according to this information if they can carry out the action that has previously been assigned to them.  
The communication between agents is important in order to achieve the objectives of the system, where the objectives of the individual agents coexist. There is a set of stages in which the need for the existence of communication between agents is obvious. For example, when defining the problem to be solved, as well as its decomposition and distribution among the agents that make up the system. To carry out the communication between the agents, they are equipped with a FIPA ACL **communication module**. Thanks to the use of JADE it has not been necessary to redefine additional functionality, since this platform facilitates a complete implementation of these interaction protocols between agents.  
Figure 6: Agent structure.