This is the final delivery for the Autonomous Software Agents project.
First run npm install
to install all dependencies.
The main scenario can be executed from the Project folder with:
node src/project/scenarios/main_Scenario.js
There are 3 other additional scenarios where specific goals can be tested.
There are two type of devices: (normal) device and washing device (both extend the Observable class). Washing devices have specific methods which simulate a washing cycle.
Device
LightDevice
Roller_shutterWashingDevice
DishwasherWashingDevice
Washing_machineDevice
TelevisionDevice
SpeakerDevice
OvenDevice
Fridge
Sensors observe the world and update the beliefs of the agents:
ActivitySensor
observes the people of the hosueDeviceStatusSensor
observes the status of devicesFridgeSensor
keeps track of the supplies of the fridgePowerSensor
observes the global power consumption and checks if a washing device is safe to startShutterSensor
observes the status of the roller shuttersSunIlluminationSensor
observes the illumination from the outsideVacuumCleanerSensor
checks if rooms are clean, the location of the vacuum cleaner robot and its battery statusWashingDeviceSensor
checks if washing devices are ready to begin/resume a washing cycle
House
here all the rooms and devices are initializedRoom
Person
map
this class is used to check the correct movement of the vacuum cleaner robotdata
contains the configuration of power consumption for each device. It contains also all the facts which are used by the agents.
LightGoals
turn on/off the lightsShutterGoals
set the shutters up/half/downTelevisionGoals
switch off the television when not neededWashingMachineGoals
start/resume/pause the washing machineDishWasherGoals
start/resume/pause the dishwasherNotificationGoals
notify when a washing device finished and when the supplies of the fridge are low
To save a log file, run a scenario with:
node src/project/scenarios/main_Scenario.js > app.log
then run node pretty_log.js
to obtain a better output.log