A partial JADE implementation of the Room Automation Use Case.
- JADE agents
- Agents' provided services
- Agent-to-agent communication
- Project structure
- How to run the project
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).
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 |
- 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
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
Run with Gradle 7.4:
- MacOS and Linux: run the following commands
- Windows: replace
./gradlew
withgradlew.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