A simulation for testing data preservation of base station-less networks (BSNs) according to packet priority.
This data preservation simulation uses a fork of the project grivera64/Max-Profit-Data-Preservation-Simulation to generate a suite of base station-less networks (BSNs) to apply ILP-based solutions and compare with previous solutions like Goldberg's CS2 program.
This simulation outputs the energy consumption of using the above algorithms.
- JDK 17 or newer (Latest JDK from Oracle)
- CS2 executable (Installation and Setup Instructions)
- Use
make
to build the binaries from the repository above and save the executable somewhere and remeber its path.
Note: We will refer to the path to the CS2 executable as
%PATH_TO_CS2%
. - Use
- Guava (Latest Guava Instructions)
- Dependencies:
- JNA (GitHub Link)
- Google Protocol Buffers (GitHub Link)
- Dependencies:
Open a command line or terminal instance and enter the following command:
git clone https://github.com/grivera64/Priority-Based-Data-Preservation-Simulation.git
You can also download the repository as a zip file directly from GitHub here and unzip it.
cd Priority-Based-Data-Preservation-Simulation
cd src
Windows:
javac -p . -cp ".;%PATH_TO_GUAVA%/*;%PATH_TO_JNA%/*;%PATH_TO_PROTOBUF%/*" *.java -d ../bin
Mac/Linux:
javac -p "." -cp ".:$PATH_TO_GUAVA/*:$PATH_TO_JNA/*:$PATH_TO_PROTOBUF/*" **.java -d ../bin
cd ..
cd bin
Windows:
java -p . -cp ".;%PATH_TO_GUAVA%/*;%PATH_TO_JNA%/*;%PATH_TO_PROTOBUF%/*" RunModelTests
Mac/Linux:
java -p "." -cp ".:$PATH_TO_GUAVA/*:$PATH_TO_JNA/*:$PATH_TO_PROTOBUF/*" RunModelTests
Welcome to the Priority Based Profit Data Preservation Simulator!
===========================================
Please enter an option: (G)enerate/(F)ile/(Q)uit:
> F
Please enter the file name:
F > figure_3_sensor_network.sn
Where is your installation of cs2.exe located?
(".") > $PATH_TO_CS2
Running models...
=================
Greedy:
Cost: 6412 µJ
Profit: 9452 µJ
CS2 (Optimal):
Saved flow network in file "cs2_tmp_20230518164514.inp"!
Cost: 6406 µJ
Profit: 9458 µJ
-
Sensor Generator with Max Profit (grivera64/Sensor-Generator-with-Max-Profit)
- Sensor Network generator visualizer for CS2 Min-Cost Flow input for maximizing profit in data preservation.
- By Giovanni Rivera (@grivera64)
-
Sensor Generator with MCF (grivera64/Sensor-Generator-with-MCF)
- Original Sensor Network generator and visualizer for CS2 Min-Cost Flow input that we forked for grivera64/Sensor-Generator-with-Max-Profit.
- By Giovanni Rivera (@grivera64)
-
Data Preservation Simulation (grivera64/Data-Preservation-Simulation)
- A simulation for testing data preservation of base station-less networks (BSNs).
- By Giovanni Rivera (@grivera64)
- Giovanni Rivera (@grivera64)
- Christopher Gonzalez (@chrisagonza97)