Você está na página 1de 54

JANUS: Another Yet General-Purpose Multiagent Platform

www.janus-project.org

St
ephane Galland
on behalf of Janus Development Team
ICAP Team,
Laboratoire Syst`emes et Transports (SeT),
Universite de Technologie de Belfort-Montbeliard (UTBM),
F-90 000 Belfort, France
stephane.galland@utbm.fr
http://www.multiagent.fr

Outlines
1 Introduction

Context
Hypothesis and Problems
2 From ASPECS to JANUS
3 Janus Metamodel

Organizational concepts of Janus


Agent-related concepts of Janus
Other concepts
4 Example: Market-like Community

How to define an Organization


How to define an Agent
5 Conclusion
6 Demos
S. Galland et al. Laboratoire Syst`
emes et Transports UTBM

2/42

Outlines
1 Introduction

Context
Hypothesis and Problems
2 From ASPECS to JANUS
3 Janus Metamodel

Organizational concepts of Janus


Agent-related concepts of Janus
Other concepts
4 Example: Market-like Community

How to define an Organization


How to define an Agent
5 Conclusion
6 Demos
S. Galland et al. Laboratoire Syst`
emes et Transports UTBM

3/42

Introduction
Context
Massive Multi-Agent Based Simulation
Design and Simulation of Complex Systems
AOSE: From Analysis to Deployment Methodology and Tools
Main Application Domain: Massive crowd simulation in
virtual environment

Janus and ASPECS Consortium

SeT Belfort, France

Voxelia S.A.S Belfort, France

CITAT Tucuman, Argentina

ICAR-CNR Palermo, Italy

S. Galland et al. Laboratoire Syst`


emes et Transports UTBM

4/42

Introduction Why Another Platform?


To Help Agent-Oriented Software Engineering

To support organizational concepts as first-class abstractions:


Role and Organization.

Direct integration with the ASPECS1 methodology and CRIO


metamodel.

Contribute to fill the gap between design and implementation


phases in AOSE.

To strictly respect agent fundamental characteristics:


autonomy.

see: www.aspecs.org

S. Galland et al. Laboratoire Syst`


emes et Transports UTBM

5/42

Introduction Why Another Platform?


To Help Developers
1

To implement with the same general-purpose platform:


Agent-oriented, Organisational, Holonic, Eco-Agent, BDI,
Simulation.

A developer-oriented platform designed to develop applications


dealing with real case studies (large, complex, etc.)

To preserve computational performance (realtime, mobile


devices, embedded systems)

S. Galland et al. Laboratoire Syst`


emes et Transports UTBM

5/42

Janus Platform Architecture

S. Galland et al. Laboratoire Syst`


emes et Transports UTBM

6/42

Outlines
1 Introduction

Context
Hypothesis and Problems
2 From ASPECS to JANUS
3 Janus Metamodel

Organizational concepts of Janus


Agent-related concepts of Janus
Other concepts
4 Example: Market-like Community

How to define an Organization


How to define an Agent
5 Conclusion
6 Demos
S. Galland et al. Laboratoire Syst`
emes et Transports UTBM

7/42

ASPECS and CRIO Introduction: 3 levels of abstraction

S. Galland et al. Laboratoire Syst`


emes et Transports UTBM

8/42

ASPECS Fundementals
Explicitly deals with the design of open, dynamic and complex
systems.
Assumption: system is hierarchically decomposable in
sub-systems.
Adoption of organisational approach: intra and inter-level
Vertical delegate the responsibility of an organisation at
level n to sub-organisations at level n-1
Horizontal collaboration of several entities at the same level
to fulfil the required functionalities.
Domain related ontological knowledge is used as a tool for
enhancing the quality of design.
Joint use of holonic and agency concepts:
Holonic modelling of collective and compositional
aspects of the system.
Agent modelling of individual aspects and personal
goals.
S. Galland et al. Laboratoire Syst`
emes et Transports UTBM

9/42

Outlines
1 Introduction

Context
Hypothesis and Problems
2 From ASPECS to JANUS
3 Janus Metamodel

Organizational concepts of Janus


Agent-related concepts of Janus
Other concepts
4 Example: Market-like Community

How to define an Organization


How to define an Agent
5 Conclusion
6 Demos
S. Galland et al. Laboratoire Syst`
emes et Transports UTBM

10/42

Outlines
1 Introduction

Context
Hypothesis and Problems
2 From ASPECS to JANUS
3 Janus Metamodel

Organizational concepts of Janus


Agent-related concepts of Janus
Other concepts
4 Example: Market-like Community

How to define an Organization


How to define an Agent
5 Conclusion
6 Demos
S. Galland et al. Laboratoire Syst`
emes et Transports UTBM

11/42

Janus Metamodel Organizational Concepts


Direct implementation of CRIO1 organizational concepts.

Capacity, Role, Interaction, Organization

S. Galland et al. Laboratoire Syst`


emes et Transports UTBM

12/42

Janus Metamodel Organizational Concepts


Organization
An organisation is defined by a collection of roles that take part in
systematic institutionalised patterns of interactions with other roles
in a common context. This context consists in shared knowledge
and social rules/norms, social feelings, etc and is defined according
to an ontology.

S. Galland et al. Laboratoire Syst`


emes et Transports UTBM

13/42

Janus Metamodel Organizational Concepts

Role
An expected behaviour (a set of role tasks ordered by a plan) and
a set of rights and obligations in the organization context.

S. Galland et al. Laboratoire Syst`


emes et Transports UTBM

14/42

Janus Metamodel Role Architecture

S. Galland et al. Laboratoire Syst`


emes et Transports UTBM

15/42

Janus Metamodel Organizational Concepts


Interaction
A dynamic, not a priori known sequence of events (a specification
of some occurrence that may potentially trigger effects on the
system) exchanged among roles, or between roles and entities
outside the agent system to be designed. Roles may react to the
events according to theirs behaviors.

S. Galland et al. Laboratoire Syst`


emes et Transports UTBM

16/42

Janus Metamodel Organizational Concepts


Capacity
A specification of a transformation of a part of the designed
system. This transformation guarantees resulting properties if the
system before the transformation satisfies a set of constraints. It
may be considered as a specification of the pre- and
post-conditions of a goal achievement.

S. Galland et al. Laboratoire Syst`


emes et Transports UTBM

17/42

Janus Metamodel Organizational Architecture of an agent

S. Galland et al. Laboratoire Syst`


emes et Transports UTBM

18/42

Outlines
1 Introduction

Context
Hypothesis and Problems
2 From ASPECS to JANUS
3 Janus Metamodel

Organizational concepts of Janus


Agent-related concepts of Janus
Other concepts
4 Example: Market-like Community

How to define an Organization


How to define an Agent
5 Conclusion
6 Demos
S. Galland et al. Laboratoire Syst`
emes et Transports UTBM

19/42

Janus Metamodel Agent-related Concepts


Direct implementation of CRIO Agent-related concepts.

S. Galland et al. Laboratoire Syst`


emes et Transports UTBM

20/42

Janus Metamodel Agent


Agent
An abstract rational entity that adopts a decision in order to
obtain the satisfaction of one or more of its own goals. An
autonomous entity may play a set of Agent Roles within various
groups. These roles interact each other in the specific context
provided by the entity itself. The entity context is given by the
knowledge, the capacities owned by the entity itself. Roles share
this context by the simple fact of being part of the same entity.

S. Galland et al. Laboratoire Syst`


emes et Transports UTBM

21/42

Janus Metamodel Agent


Agent
An abstract rational entity that adopts a decision in order to
obtain the satisfaction of one or more of its own goals. An
autonomous entity may play a set of Agent Roles within various
groups. These roles interact each other in the specific context
provided by the entity itself. The entity context is given by the
knowledge, the capacities owned by the entity itself. Roles share
this context by the simple fact of being part of the same entity.

Holon
A holon is a self-similar structure composed of holons as
sub-structures. This hierarchical structure is called a holarchy. A
holon may be seen, depending on the level of observation, either as
an autonomous atomic entity or as a group of interacting holons.
S. Galland et al. Laboratoire Syst`
emes et Transports UTBM

21/42

Agent Architecture in Janus

S. Galland et al. Laboratoire Syst`


emes et Transports UTBM

22/42

Janus Metamodel Agent Interaction


Message (Inter-agent communication)
An object sent by an agent or one of its roles to another
agents or these roles. In addition to data, a Message contains
the emitter and the receivers. In organizational point of view, a
message is restricted to the roles organization. In agent point of
view, messages are exchanged by agents without scope restriction.

S. Galland et al. Laboratoire Syst`


emes et Transports UTBM

23/42

Janus Metamodel Agent Interaction


Message (Inter-agent communication)
An object sent by an agent or one of its roles to another
agents or these roles. In addition to data, a Message contains
the emitter and the receivers. In organizational point of view, a
message is restricted to the roles organization. In agent point of
view, messages are exchanged by agents without scope restriction.

Signal (Intra-agent communication)


An event inside the scope of an agent. This signal may be
triggered by the agent itself or one of its roles. Listener on signals
could be any object created and registered as signal listener by the
agent itself or by one of its roles. A signal contains information
and the address of the emitter, but not the signal receivers.

S. Galland et al. Laboratoire Syst`


emes et Transports UTBM

23/42

Janus Metamodel Agent Interaction


Channel (Agent-Outside communication)
A bi-directional communication mean between an agent and the
Environment. The Environment is composed of all objects that are
not agents.
Channel could be restricted to one communication direction.
Channel is providing getter and setter functions to obtain
informations from and influence the agent.
Two main types of channels are basically used: GUI binding, Probe
on agents.

S. Galland et al. Laboratoire Syst`


emes et Transports UTBM

23/42

Janus Metamodel Agent Mind State


Agent Attributes and Properties
Hard-coded values in the agent source code. They are fields in the
agent class.

S. Galland et al. Laboratoire Syst`


emes et Transports UTBM

24/42

Janus Metamodel Agent Mind State


Agent Attributes and Properties
Hard-coded values in the agent source code. They are fields in the
agent class.

Agent Memory
A memory space owned by the agent in which several data may be
stored. In addition to previous attributes and properties, agent is
able to exhibit a specific type of memory architecture: blackboard,
etc.

S. Galland et al. Laboratoire Syst`


emes et Transports UTBM

24/42

Holon in Janus

S. Galland et al. Laboratoire Syst`


emes et Transports UTBM

25/42

Outlines
1 Introduction

Context
Hypothesis and Problems
2 From ASPECS to JANUS
3 Janus Metamodel

Organizational concepts of Janus


Agent-related concepts of Janus
Other concepts
4 Example: Market-like Community

How to define an Organization


How to define an Agent
5 Conclusion
6 Demos
S. Galland et al. Laboratoire Syst`
emes et Transports UTBM

26/42

Janus Platform Architecture

S. Galland et al. Laboratoire Syst`


emes et Transports UTBM

27/42

Janus Metamodel Execution/life-cycle related concepts

S. Galland et al. Laboratoire Syst`


emes et Transports UTBM

28/42

Implementation Metamodel Kernel


Organizational Management System
manages roles and organisations and their instantiations in
form of groups.
dynamic acquisition, instantiation and liberation of roles,
dynamic acquisition and execution of capacities.

S. Galland et al. Laboratoire Syst`


emes et Transports UTBM

29/42

Implementation Metamodel Kernel


Organizational Management System
manages roles and organisations and their instantiations in
form of groups.
dynamic acquisition, instantiation and liberation of roles,
dynamic acquisition and execution of capacities.

Life Cycle Management and Execution Policies


management of the holon life cycle management
various role execution policies
a concurrent execution model.
a synchronous engine (MABS).

S. Galland et al. Laboratoire Syst`


emes et Transports UTBM

29/42

Implementation Metamodel Kernel


Intra- and extra-Kernel Message Transport Service
various policies for the messages management (i.e. MABS)
role-oriented communication
control the exchange of messages within the platform.
event-based communication
network support

S. Galland et al. Laboratoire Syst`


emes et Transports UTBM

29/42

Implementation Metamodel Kernel


Intra- and extra-Kernel Message Transport Service
various policies for the messages management (i.e. MABS)
role-oriented communication
control the exchange of messages within the platform.
event-based communication
network support

Observation Management System


provides instrumentation based on probes allowing a role to
observe another role.
channels to GUI

S. Galland et al. Laboratoire Syst`


emes et Transports UTBM

29/42

Outlines
1 Introduction

Context
Hypothesis and Problems
2 From ASPECS to JANUS
3 Janus Metamodel

Organizational concepts of Janus


Agent-related concepts of Janus
Other concepts
4 Example: Market-like Community

How to define an Organization


How to define an Agent
5 Conclusion
6 Demos
S. Galland et al. Laboratoire Syst`
emes et Transports UTBM

30/42

Market-like Community Example How to define an organization

Client is requesting to Broker the best offer for a service.

Broker is contacting Providers for offer submission and select


the best one.

Broker is giving back to Client the best offer.

Client and Provider are contracting.

S. Galland et al. Laboratoire Syst`


emes et Transports UTBM

31/42

Market-like Community Example How to define an organization


ProvidingOrganization.java
public class ProvidingOrganization extends Organization {
public ProvidingOrganization(CRIOContext context){
super(context);
addRole(Provider.class);
addRole(PBroker.class);
}
}

ContractingOrganization.java
public class ContractingOrganization extends Organization {
public ContractingOrganization(CRIOContext context){
super(context);
addRole(Buyer.class);
addRole(Seller.class);
}
}
S. Galland et al. Laboratoire Syst`
emes et Transports UTBM

32/42

Market-like Community Example How to define a role


PBroker.java
public class PBroker extends Role {
private State state;
public PBroker() {
addObtainCondition(
new HasAllRequiredCapacitiesCondition(
FindLowestCostProposalCapacity.class,
FindShortestTimeProposalCapacity.class)));
}
public Status activate(Object... parameters) {
this.state = State.WAITING FOR CLIENT BROKER;
getSignalEmitter().addSignalListener(this.signalListener);
return StatusFactory.ok(this);
}

S. Galland et al. Laboratoire Syst`


emes et Transports UTBM

33/42

Market-like Community Example How to define an organization


PBroker.java
public enum State {
WAITING FOR CLIENT BROKER,
WAITING FOR PROVIDER READY,
CONTACT PROVIDER,
WAIT PROVIDER PROPOSAL,
SELECT PROPOSAL,
NOTIFY PROVIDERS,
WAIT CONTRACT GROUP;
}
public Status live() {
switch (this.state) {
case WAITING FOR CLIENT BROKER: break;
case WAITING FOR PROVIDER READY: break;
case CONTACT PROVIDER: break;
case WAIT PROVIDER PROPOSAL: break;
case SELECT PROPOSAL: break;
case WAIT CONTRACT GROUP: break;
}
return StatusFactory.ok(this);
}
}

S. Galland et al. Laboratoire Syst`


emes et Transports UTBM

34/42

Market-like Community Example How to define an agent

S. Galland et al. Laboratoire Syst`


emes et Transports UTBM

35/42

Market-like Community Example How to define an agent


BrokerAgent.java
public class BrokerAgent extends Agent {
public Status activate(Object... params) {
CapacityContainer cc = getCapacityContainer();
cc.addCapacity(new FindLowestCostProposalCapacityImpl());
cc.addCapacity(new FindShortestTimeProposalCapacityImpl());
GroupAddress clientGA = getOrCreateGroup(PurchaseOrganization.class);
if (!requestRole(CBroker.class, clientGA)) {
return StatusFactory.cancel(this);
}
GroupAddress providerGA = getOrCreateGroup(ProvidingOrganization.class);
if (!requestRole(PBroker.class, providerGA, this.providerCount)) {
return StatusFactory.cancel(this);
}
return StatusFactory.ok(this);
}
}
S. Galland et al. Laboratoire Syst`
emes et Transports UTBM

36/42

Outlines
1 Introduction

Context
Hypothesis and Problems
2 From ASPECS to JANUS
3 Janus Metamodel

Organizational concepts of Janus


Agent-related concepts of Janus
Other concepts
4 Example: Market-like Community

How to define an Organization


How to define an Agent
5 Conclusion
6 Demos
S. Galland et al. Laboratoire Syst`
emes et Transports UTBM

37/42

Conclusion
Developer Features An Integrated Approach
Direct integration with the ASPECS2 methodology and CRIO
metamodel.
Contribute to fill the gap between design and implementation
phases in AOSE.
A full set of facilities for launching, displaying, developing and
monitoring agents, holons, organisations, groups, roles...
A developer-oriented platform designed to develop applications
dealing with real case studies (large, complex, etc).

see: www.aspecs.org

S. Galland et al. Laboratoire Syst`


emes et Transports UTBM

38/42

Conclusion
Janus Kernel Development Constraints
Complete support of organisational concepts as first-class
abstractions: Role and Organisation.
Sake of preserving computational performance (realtime,
mobile devices, embedded)
Sake of strictly respecting agent fundamental characteristics:
autonomy.

Successfully Used In
Crowd simulation in virtual reality
Energy management of buildings
Chat rooms
S. Galland et al. Laboratoire Syst`
emes et Transports UTBM

38/42

Perspectives
Agent Architecture
Complete ACL and BDI modules - February 2011
Complete FIPA compliance.

S. Galland et al. Laboratoire Syst`


emes et Transports UTBM

39/42

Perspectives
Agent Architecture
Complete ACL and BDI modules - February 2011
Complete FIPA compliance.

Development Tools
Java Micro-Edition fully compliance, deployment on Google
Android - August 2011
A CASE tools to enable automatic code generation and assist
the deployment.

S. Galland et al. Laboratoire Syst`


emes et Transports UTBM

39/42

Perspectives
Agent Architecture
Complete ACL and BDI modules - February 2011
Complete FIPA compliance.

Development Tools
Java Micro-Edition fully compliance, deployment on Google
Android - August 2011
A CASE tools to enable automatic code generation and assist
the deployment.

Deployment Features
Java Micro-Edition fully compliance, deployment on Google
Android - August 2011
S. Galland et al. Laboratoire Syst`
emes et Transports UTBM

39/42

Outlines
1 Introduction

Context
Hypothesis and Problems
2 From ASPECS to JANUS
3 Janus Metamodel

Organizational concepts of Janus


Agent-related concepts of Janus
Other concepts
4 Example: Market-like Community

How to define an Organization


How to define an Agent
5 Conclusion
6 Demos
S. Galland et al. Laboratoire Syst`
emes et Transports UTBM

40/42

Simple Demos on Janus

Ant colony

Forager Bots

Boids

Available on http://www.janus-project.org

S. Galland et al. Laboratoire Syst`


emes et Transports UTBM

41/42

Movie: Pedestrian Simulation in Metro Station from Voxelia

Realtime pedestrian simulation in urban environment.


available on Janus-Jasim (Continuous Environment)

S. Galland et al. Laboratoire Syst`


emes et Transports UTBM

42/42

JANUS: Another Yet General-Purpose Multiagent Platform


Seventh AOSE Technical Forum December 15th, 2010 Paris

Você também pode gostar