Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 26

A Framework for Multi-agent Discrete Event Simulation: V-Lab

Prasanna Sridhar Shahab Sheikh-Bahaei 12/05/2003


Autonomous Control Engineering University of New Mexico

This work was supported by NASA AMES under grant NAG 2-1547

V-Lab
V-Lab Environment Layers
Hardware Networking
Networking foundation for inter-machine communication

Middleware
Software environment for inter-process communication

V-Lab

I-DEVS
MIDDLEWARE
PHYSICAL NETWORK

IDEVS
Library of tools for soft computing in DEVS formalism

V-Lab
Organizational structure for DEVS objects. Management objects to control time and message flow in multi-agent systems

Inside Layered Architecture

simman

Atomic Model

Coupled Model

middleware

V-lab
Hierarchical Tree Uses the IDEVS structure for creating objects Provides inbuilt agents and physics to model multi-agent multiphysics system SimMan is the message router to perform indirect message passing.
SimEnv

Agents

Physics

Agents

Agents

SimMan

Physics

SimMan and SimEnv


SimEnv
Highest leveled coupled model Instatiates all other models Houses all other models Couples all other models together
SimEnv
Agent Agent

SimMan

Agent

Agent

SimMan
Message liaison providing indirection between all other models Controls flow of time and messages between models for the simulation

Parsing
A grammar defines rules for building syntactically correct programs. One way of defining grammar is through BNF (BackusNaur Form) BNF of our simulation configurations is translated JavaCC format and saved as file parseConfig.jj When parseConfig.jj is compiled by JavaCC, it generates a Java file parseConfig.java. Parsing can be done by instatiating an object of parseConfig.java

Sample Config file


robo2 = Robot.Robot; robo3 = Robot.Robot; robo4 = Robot.Robot; robo5 = Robot.Robot; robo6 = Robot.Robot; robo7 = Robot.Robot; terr = Robot.Terrain; //agent //agent //agent //agent //agent //agent

Need for Agent Manager

4 agents connected together

18 agents connected

manager

18 agents connected with manager

Message routing
R1 A1 R1 R1 R1 A2 A4 A3 A5

SimMan
Legend: A1,A2,A3,A4,A5: Agents R1: Request Message R1: A2 , A4, : Database for request/response R1:A2, A4, A5 R2:A1,A3

Re A1 Re Re Re Re Re

A2 A4 A3 A5

SimMan
Legend: A1,A2,A3,A4,A5: Agents Re: Response Message R1: A2 , A4, : Database for request/response R1:A2, A4, A5 R2:A1,A3

Potential repliers can be known by special messages

I-DEVS

Efficient way of handling Time parameters

I-DEVS Library

Extension of DEVSJAVA classes

DEVSJAVA Library

Soft Computing

Simulation Results

Fuzzy Logic Controller


Crisp Values

Fuzzifier

Inference Engine

Defuzzilier

Crisp Values

Membership Functions Fuzzy (IF THEN) Rules Fuzzy Variables Linguistic Variables

Devs-Fuzzy Logic
A typical Mamdani rule can be composed as follows
i IF x1 is A1i AND x2 is A2 THEN y i is B i , for i 1, 2,..., l

DEVS primitives to compose a Mamdani rule:


X (real number) Fuzzy Value Fuzzifier Membership Functions Method of Defuzzification Y1 Y2 Yn
Fuzzy Values AND/OR
DOF

Connectives

Fuzzy Value

Y Output Block
(Fuzzy set)

Defuzzifier

Defuzzified output
(real number)

IF theta AND theta_dot THEN force Change Detectors


theta Fuzzifier (POS) Fuzzifier (NEG)

is POS is POS is NEG

ZERO

NEG

POS

Output Block
AND

Center of Gravity force Defuzzifier

theta_dot

(NEG) Output

Rule #2 Rule #3

force

force

Robot Obstacle Avoidance


Angle of sensor i Distance to obstacle (measured by sensor i) 1 2

w
v
Fuzzy-Logic-Controller

Fuzzy-Logic Obstacle Avoidance


Membership Functions:
Close Near

Far

Neg

Zero

Pos

a) Distance measured by sensor (d)


Zero VSlow Slow

b) Angle of sensor (th) SNeg Zero SPos Pos

Fast Neg

c) Forward velocity (V)

d) Angular Velocity (W)

Fuzzy-Logic Obstacle Avoidance

Fuzzy rules for the ith sensor:


1."IF distancei is Close And anglei is Pos Then V 2."IF distancei is Close And anglei is Zero Then V 3."IF distancei is Close And anglei is Neg Then V 4."IF distancei is Near And anglei is Pos Then V 5."IF distancei is Near And anglei is Zero Then V 6."IF distancei is Near And anglei is Neg Then V 7."IF distancei is Far And anglei is Pos Then V 8."IF distancei is Far And anglei is Zero Then V 9."IF distancei is Far And anglei is Neg Then V Is VSlow W is Neg " Is Zero " Is VSlow W Is Pos " Is Slow W Is SNeg" Is VSlow W Is SNeg" Is Slow W Is Spos" Is Fast W Is Zero" Is Fast W Is Zero" Is Fast W Is Zero"

Conventional Fuzzy vs. DEVS-Fuzzy


Conventional Fuzzy Discrete Event Fuzzy

Simulation time

Simulation time

Cooperative Robotics

Cooperative pushing task:

Pushing task:
G

fl<0
rA

B
rB
wl

fl=0 fl>0

wr
fr<0

Pushing region fr>0

fr=0

Cooperative pushing task:


G

wl

B
rB

wr
Pushing regions

Cooperative Pushing Task


in
in?command in?object_reached

out

in?object_lost out!goal_reached

out?object_touched in?outside_pushing_region out?object_reached_the_goal

in?everybody_ready

Simulation Results

Simulation Results

Experiment Results

Experiment Results

You might also like