This is an implementation of the SA-BSN. So far, the SA-BSN was used for experimentation on solutions for adaptation on the Self-Adaptive Software Systems domain [1][2][3]. Moreover, information regarding the prototype behavior and how to develop your own manager is provided in the website, which contains an executable instance of the BSN.
Check our demonstration video of the SA-BSN.
Download our SA-BSN Virtual Machine (Virtual Box) for People in a Hurry. (~10 minutes!!)
To compile and run the SA-BSN, follow the instructions (tested on Linux Ubuntu 18.04 with ROS Melodic):
(Jump this step if you are in our provided VM)
ROS Melodic for Ubuntu 18.04 is the underlying framework in which the SA-BSN runs.
Catkin for ROS packages management.
Rosdep for ROS dependencies management.
Clone the sa-bsn.
git clone https://github.com/rdinizcal/sa-bsn.git
Enter the sa-bsn folder, install internal dependencies, and then compile it with catkin.
cd sa-bsn &&
rosdep install --from-paths src --ignore-src -r -y &&
catkin_make
To run tests:
catkin_make run_tests && catkin_test_results
The SA-BSN's execution relies on a single command, where the argument (i.e., 600) represents the execution time (in seconds):
cd sa-bsn &&
bash run.sh 600
For a customized execution, check the configuration files under sa-bsn/configurations.
During the execution a logging mechanism records data in logfiles, that can be found in sa-bsn/src/knowledge_repository/resource/logs. Each logfile is named after a type of message and an id (i.e., logName_logID) and the entries are composed by the messages content.
To compute the evolution of the QoS attributes (i.e., reliability and cost) over time and how well the adaptation manager adapts the system, we use a python script that reads the logs as input and plots a timeseries + displays adaptation metrics as output.
The python script can be found at sa-bsn/src/sa-bsn/simulation/analyzer.
To compute the QoS attributes and analyze the adaptation, type:
cd sa-bsn/src/sa-bsn/simulation/analyzer
python3 analyzer.py [logID] [metric] [plot_component_metrics] [setpoint]
where:
- [logID] is the ID for the execution log files.
- [metric] is the name of the QoS attribute (e.g., reliability)
- [plot_component_metrics] is a boolean parameter that defines whether individual component's QoS attribute should be plotted or not.
- [setpoint] is the value of the setpoint used in the execution.
One example of the command usage is:
python3 analyzer.py 1610549979516318295 reliability False 0.9
You might want to source the setup.bash inside the catkin workspace:
echo "source ~/sa-bsn/devel/setup.bash" >> ~/.bashrc
source ~/.bashrc
Main Authors
Adviser: Genaína N. Rodrigues