variables' agents cannot be referred directly. In fact, a controller agent keeps a copy of that variable inside it and propagates any change on that variable to the owner agent. Instead of dealing with variables directly between agents, they deal with variables identifiers. A variables identifier is an instance of VID class. It is simply the name of the variables and the identifier of its owner agent. An instance of VAgentRef is used to create variables inside the corresponding VAgent. A variable creation process returns an instance of VID class identifying the created variable.

Among additional features we added to our prototype a possibility to declaratively define a simple DCSP via the use of XML notation. The XML file that describes a DCSP problem should be built according to the following model (fig.10):

![0_image_1.png](0_image_1.png)

The choice of multi-agent platforms and multi-solver constraints required a study and testing of several platforms. We reviewed our work over multiple platforms including JADE and Madkit and several constraints solvers as CHOCO, Cream and JCK. Finally we chose for the role of MAS JADE (Java Agent DEvelopment Framework) multi-agent framework [25], and for CSP platform, we have chosen Choco [26, 28]. 

JADE is a multi-agent framework compliant with the FIPA 
specifications [27] and is fully implemented in Java language. JADE was established by the laboratory TILAB Telecom Italia. JADE has three main modules (fig.11): DF (Directory Facilitator): provides a service of "yellow pages" to the platform; ACC (Agent Communication Channel) handles communication between agents; AMS (Agent Management System) oversees the registration of agents, authentication, access and use of the system. Each JADE agent is composed of a single thread of execution (thread). Each task agent is represented by an instance of class Behavior. Jade offers the possibility of agents' multithreaded, although the user leaves the responsibility for managing competition (except the timing of the messages file ACLs).

![0_image_0.png](0_image_0.png)

In order to implement a behavior, the developer must define one or more objects of class Behavior, the instantiate and add them to the thread of execution of the agent. Every object type has a Behavior method *action ()* (which is the treatment to be performed by it) and a method d*one ()* (which checks if the treatment is completed). In detail, the scheduler executes the method *action ()* of each object in the queue of the tasks of the agent. Once this is completed, the method *done ()* is invoked. If the task has been completed then the Behavior object is removed from the queue. The scheduler is non-preemptive and does only one behavior at a time, one can consider the method *action ()* as atomic. It is then necessary to take certain precautions during the implementation of the latter, to avoid endless loops or operations too long. The most classic program behavior is to describe it as a finite state machine. The current status of the agent is stored in local variables. 

Also JADE simplifies the implementation of multi-agent systems through a set of graphical tools that supports the debugging and deployment phases.

Choco is a library for constraint satisfaction problems (CSP), 
constraint programming (CP) and explanation-based constraint solving (e-CP) [28]. It is built on an event-based propagation mechanism with backtrackable structures. Choco is implemented in Java and takes advantage of the principle of inheritance to allow the programmer to define its own types and constraints. This is achieved by using abstract classes (fig. 12):

![0_image_2.png](0_image_2.png)

It permits the use of multiple solvers for different problems separately. This allows each CAgent to have its own solver. A distributed constraint problem is created as an instance of the class DCSP. This instance represents the problem to be solved and is used to create the different needed agents.

Our prototype in its current state is composed of three main packages containing more than 80 classes and Java interfaces and approximately 4300 lines of code.