Skip to content
This repository has been archived by the owner on Sep 20, 2022. It is now read-only.

yasmineantille/exercise-1

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

17 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Exercise 1: Writing Your First Autonomous Agent!

A partial JADE implementation of the Room Automation Use Case.

Table of Contents

JADE agents

The system features a main container where four different agents register in total:

  • A Building Environment Agent (ENV) that models the building environment.
  • A Room Manager Agent (MNG) that perceives the environment and manages the room conditions.
  • A Blinds Controller Agent (BLINDS) that controls the blinds in the room (e.g. it raises the blinds).
  • A Lamp Controller Agent (LAMP) that controls the light in the room (e.g. it turns on the light).

Agents' provided services

Service Provided by (Agent) Searched by (Agent) Associated FIPA Interaction Protocol
read-illuminance ENV MNG Subscribe
read-weather ENV MNG Subscribe
set-weather ENV BLINDS, LAMP Request
increase-illuminance BLINDS, LAMP MNG Contract Net

Agent-to-agent communication

  • Initiators:
    • Agents: MNG
    • Associated Behaviors: PerceiveEnvironment, HandleIlluminancePercept, HandleWeatherPercept
  • Participants:
    • Agents: ENV
    • Associated Behaviors: SubscriptionServer, NotificationServer
  • Initiators:
    • Agents: BLINDS, LAMP
    • Associated Behaviors: RequestSetIlluminance
  • Participants:
    • Agents: ENV
    • Associated Behaviors: SetIlluminanceServer
  • Initiators:
    • Agents: MNG
    • Associated Behaviors: PerformContractNetProtocol
  • Participants:
    • Agents: BLINDS, LAMP
    • Associated Behaviors: OfferProposalsServer, SatisfyOffersServer

Project structure

The project is structured as follows:

├── cnp
│   ├── initiators
│   │   └── RoomManagerAgent.java
│   └── participants
│       ├── BlindsControllerAgent.java
│       └── LampControllerAgent.java
├── environment
│   ├── BuildingEnvironmentAgent.java
│   └── BuildingEnvironmentGUI.java
└── common
│   ├── BaseAgent.java
│   ├── CNPInitiator.java
│   └── CNPParticipant.java

How to run the project

Run with Gradle 7.4:

  • MacOS and Linux: run the following commands
  • Windows: replace ./gradlew with gradlew.bat

To start the main container only with the Room Environment Agent (required for Task 1):

./gradlew runEnv

To start the main container with all the agents in the environment (required for Task 2):

./gradlew runRoomAll

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 100.0%