Contents

General FAQ

Could I use Janus to make Agent Based Simulation software?

Yes. Janus has been widely used for agent based simulations. Natively Janus provides features for agent execution and direct communication. Janus is able to run heavy and light agents, ie. agents with and without attached thread. More details.

Could I use Janus to make Organizational Simulation software?

Yes. Janus natively supports the CRIO metamodel (Capacity-Role-Interaction-Organization). This metamodel defines a system as a set of organizations in which roles are defined and interacting together. Agents play roles in organization instances (or groups) and provides embedded capacity implementations required by the played roles. Mores details on CRIO and Capacities.

Could I use Janus to make Holonic Simulation software?

Yes. Janus natively supports the holon concept. Holon is recursively composed of holons. In Janus agents are holons. Janus prior to 0.4 provides a basic support for holons. Complete holonic system support is provided by 0.4 and higher.

Why migrating from another multiagent platform to Janus?

See the reasons to move up to Janus.

How to migrate from another multiagent platform to Janus?

See the mapping tables various multiagent platforms and Janus.

Installation and running Janus for the first time

Does my operating system is compatible with Janus?

Janus is a Java platform. Every operating system which has a compatible Java virtual machine with Janus may be used to run it. Janus Core Developers use both Ubuntu Linux and MacOS operating systems.

What is the version of the Java virtual machine to install?

Janus requires JRE and JDK 1.6 or higher to run and compile.

What are the virtual machines compatible with Janus?

Janus requires a virtual machine compatible with the Sun's specifications because it uses ArakhnĂȘ.org VM utilities which are requiring it. Janus was reported to compile and run successfully on the following Java platforms:

  • Sun Java 6
  • OpenJDK 6
  • IcedTea 6

How to determine if my Java platform is compatible with Janus?

Type and compile the following Java class:

public class JanusTest {
   public static void main(String[] args) {
     System.out.println("VM:"+System.getProperty("java.specification.vendor"));
     System.out.println("Version:"+System.getProperty("java.specification.version"));
   }
}
$> javac -cp . JanusTest.java

Then run the compiled class:

$> java -cp . JanusTest
VM:sun
Version:1.6

The VM value must be "sun" and the version higher or equal to 1.6.

Participate to Janus Development

Where are the sources of Janus?

Sources of each Maven module are available on the download page.

How can I obtain the last changes in source code?

Last changes in source code are listed in the change logs, which are available on the download page.

How can I obtain the current issues?

Janus Core Developers use a JIRA portal to manage bug tracking and project workflow. Current issues are listed in the issues of Janus or the issues of Jaak.

How can I report a problem or a bug in Janus components?

Janus Core Developers use a JIRA portal to manage bug tracking and project workflow. To report your issue, you may fill the dedicated bug report form. Please read the Janus Bug Report Guidelines before any submit.

What are the conventions and the guidelines for developers?

See Conventions and guidelines for developers.

Organizational Features

What are the capacities?

A capacity is a kind of know-how. The behavior coded in the role class is common to all the agents playing this role. To reinject some personal and individual competency and know-how, the capacity was introduced. Capacity could be seen as a function invoked by the role and for which the code is provided/implemented inside the agent itself with a CapacityImplementation. In addition, capacities reduce the coupling between a role and the agent that plays it. This way agents can provide diferent ways of doing the same thing.

How can I notify or query several agents to change group dynamically?

You may send to the agents a message that contains the order/request to change of group, and the address of the group to join. Another way is to code inside the agents a pro-active behavior that is waiting for the new groups to appear and then the agents are trying to join it.

How an agent creates a new "organization"? For example, when a queen ant wants to create an ant colony at another location.

Organizations represent specific patterns of interaction that remain the same over time and therefore are implemented as a singleton and cannot be dynamically created until you are not using just-in-time creation and compilation of Java code (see BeanShell for an example). So, creating a new instance of Ant colony is basically done by invoking one the provided functions: RolePlayer.createGroup(), Role.createGroup().

Does an agent should explicitly leave its played roles?

No. The Janus kernel forces the agents to leave the played roles when they are destroyed.

Is there an address to identify a role?

Not directly. Indeed, roles are identified by the triplet ‹Organization, Role Name, Player Address›. There is no Java object that is implementing this triplet. In Janus, the elements of the triplet are respectively: the organization singleton, the role class name, and the agent address.

Why there are instances of groups and organizations?

In Janus, organizations are singletons and not classes. In this way, the definition and the refinement of an organization are ease by the usage of class inheritance, object-oriented polymorphism, etc. Because groups are kind of instances of organizations, and many groups may exist at the same time; they must be objects to store their own execution contexts (players, access rights, etc.).

Communication Features

What is the communication link between agents and roles?

Janus provides several communication means, depending on who are the emitter and receivers (row headers are emitter, column headers are receivers).

Agent AAgent B
ItselfRole xRole yItselfRole xRole z
Agent AItself SMSSM
Role x SSMSMMM
Role y SSMSMMM
Agent BItself MSMSS
Role x MMSSMSM
Role z MMSSMSM

S: Intra-agent signal; M: message.

What does the 'Object content' parameter of the constructor of the ObjectMessage class is for?

Every message in Janus should contain some piece of information: the content of the message. This content corresponds to the data exchanged by the agents through the message-based interaction. You are free to put any kind of data in a message.

Does the 'Object content' parameter of the constructor of the ObjectMessage class have a specifical format?

No. You are free to put any kind of Java object inside the message. The value passed as parameter of the ObjectMessage constructor is directly read by the receiver of the message. If you want to use a specifical format for your message (ACL, KQML...) you must call the encoder and decoder yourself.

Is a role uses the mailbox of the agent, which is playing it?

No. Each instance of a role has its own mailbox. They are different from the agent's mailboxes. The role's mailboxes are used for messages between roles; the agent's mailboxes are used for messages between agents.

Life-Cycle Features

Is there an equivalent of the "sleep" function to stay an agent in the same state?

Yes. The pause() function permits to remove temporarily the agent from the schedulers. The parameter of the function is the time to sleep according to the current KernelTimeManager.

Is there an equivalent of the "sleep" function to stay a role in the same state?

No. Only the agent can be paused (see the previous FAQ). To stop a role, you should code it in the role behavior; or emit a signal to the agent to pause. However, remember that when an agent is paused, its roles are not run.

How an agent can kill itself

Invoke killMe() in the code of your agent.

How a role can force its player to leave it?

Invoke leaveMe() in the code of your role.

How an agent can die?

Several ways are available for agent to die:

  1. It can commit a suicide by invoking killMe();
  2. It can be killed by its creator, which has invoked the function killAgent() on it.; or
  3. It can be killed by the kernel when it has no more role to play, and it has enabled it "can commit suicide" flag (initialized in the agent's constructor; getter is canCommitSuicide()).

When the agent dies, should we call the function canCommitsuicide?

No. canCommitSuicide() is only a getter to retreive the "can commit suicide" flag. This flag is used by the kernel to kill automatically an agent when it has no more role to play.

Resources and Channels

How an agent can release resources?

Resources (graphical user interface, database connection, etc.) must be managed by the agent. It is assumed that the agent is releasing them when it is shutdown, i.e. inside its end() function.

Jaak Extension

Let take the ant colony application. Is it necessary to create a queen role, or to use the JaakSpawner?

Yes and No. This question is more related to your design choices of the ant-colony problem. In one hand, JaakSpawner is a kernel tool that permits to create agent instances according to stochastic rules. The JaakSpawner is not related to the organizational API of Janus; and it does not care of it. On the other hand, the queen role is also creating agents according to the internal state of the queen role.
Use one approach or the other depends on your designer choice; but the queen role should be preferred in an organizational design approach.

2012-04-30Internet service is up again after 5 days of broken service.
This page was last modified on 4 April 2012, at 06:49. This page has been accessed 3,168 times.
Copyright 2010-2012 © Janus Core Developers - Privacy policy