Quick Start

INGENIAS is the name of an Agent Oriented Software Engineering Methodology. It is supported by the INGENIAS Development Kit. This tutorial will introduce how to use this kit to develop a simple Multi-Agent System. In general, a MAS in INGENIAS will have a specification made with the INGENIAS MAS modeling language, a set of Java files (some of them automatically generated) and resources (images, html, etc.).

All the artifacts being part of the INGENIAS support tools are already uploaded to the Maven central repository. Also, since INGENIAS projects are Maven projects, it is possible to include any software available in this repository. This does not imply that can be easily integrated, but this tutorial will give some hints. For integrating software not available in the Maven repository, some additional steps are required. Since these steps lead to locally installed software, rather than the globally available software in Maven repository, we recommend to follow sonatype instructions to create your own Maven repository or to upload this particular software to the official one. It is highly recommended that you include the sources for those binaries. Besides, this alternative requires having registered your project in sonatype

There are several development scenarios considered in this tutorial

  • Starting a project from one template
  • Running a project
  • Modifying a project

The scenarios consider a GUI Agent. This GUI agent shows one window having one button. The agent is behind the GUI, processing the events. In this case, the events are button click events. The processing consists in printing a message in the console.


If you are already familiar with Maven, read this

INGENIAS elements can be found under the groupid net.sf.ingenias in Maven Central. The main developer is escalope and the packages ought to be signed. If you know about Maven, you can already use the compoments there. There are archetypes for building INGENIAS projects. The relevant archetypes are:

  • iafarch-empty: it creates an empty project
  • iafarch-gui: it creates a project showing how an agent can interface with a GUI
  • iafarch-helloworld: a basic example of an agent printing hello world
  • iafarch-interaction: a more complex example involving interaction among agents as well as inheritance properties

Sources can be found in sourceforge in http://ingenias.svn.sourceforge.net/viewvc/ingenias. The trunk/IDKMaven folder contains the development branch of INGENIAS Development Kit. Tagged versions can be found in the tags branch.

If you don’t know much about Maven, you should keep reading.

Required software (updated 2-1-2013)

The INGENIAS requires three pieces of software which, if you are used to develop, probably already have: Java SDK (1.7.0_09), Ant (1.8.2 or superior), and Maven ( v.3.0, v3.0.4(recommended) or superior). The MAS is built and deployed using Maven. The execution of the system itself is made using ant.

Installing Java SDK

First, The Java SDK has to be installed. It needs to be the sun version, not the openjdk. INGENIAS is compiled with JDK 64 bits 1.7.0_07, so you should have this version at least.

Linux: JDK is no more distributed in some linux flavors, so you should consult your distribution support site. Anyway, the community is working on this. You can find four ways to install JDK

Windows and others: Check the Java SDK download and installation guide.

Installing Ant

Ant software has to be installed as well. To do so:

Linux: type in a console

sudo apt-get install ant

If you install ant, you may want to use also the bash shell complete feature. This feature permits to complete commands using the tab key. To install this type:

sudo apt-get install bash-completion

Windows and others: Check the ant download and installation guide.

Installing Maven

Linux: type in a console

sudo apt-get install maven3

Windows and others: Check the maven download and installation guide

Starting a project from one template

The example shows how to create one project. In general, to access the project templates of INGENIAS, you have to write mvn archetype:generate

And select the ingenias project among the ones shown …. which tend to be hundreds. To make things easier, you can filter project templates with: mvn archetype:generate -Dfilter=iaf

or mvn archetype:generate -Dfilter=ingenias.

Following, it is necessary to choose a groupID and an artifactID that identifies your development. There are some guidelines that may help to decide which names to assign to each one. For the sake of a small development, just write the same value in both. The version number can be left as it is. It makes sense in long term developments, though. 

Running the project

After creating a project, to run the software, by default the command is: ant runProdStandAlone

This command starts the system, but it may fail the first time. If you see some exception initially, just write: mvn test; ant runProdStandAlone The reason for the failure is that Maven needs to download the first time a file ant needs. After this first time, you will not need to do this again for any project, unless you delete the maven repository.

In the video, it is shown different ways of launching the application.

  • ant runXXXXProdStandAlone. It means "launching the system using an embedded non-visible JADE instance". If there is an already opened JADE instance, whether it is visible or not, it will connect to it automatically.
  • ant runXXXX. It means, "launch the system but do not include an embedded JADE instance". It will fail if there is no opened JADE instance .

The XXXX stands for the name of the deployment. In INGENIAS, you can specify how many agents you want to run, of what type, and what kind of initial state you want to assume from them. Each deployment has a specific name which you assign in the specification. This name replaces the XXXX in the example. When there is no XXXX, it is assumed one instance of each defined agent is launched assuming a default initial state

Modifying the specification

A development is usually requiring creating or modifying a specification. The video shows how to access the specification, how a new deployment is defined, and how to run this new deployment. The specification is modified using the editor. The editor is launched with: ant edit After modifying the specification, it needs to be saved to be considered in the execution. Then, type your preferred launch command, like:

ant run When the specification is modified, the next time ant is invoked, it will take longer to execute. The reason is the need to regenerate the code for several Java classes to take into account the changes made.