Skip to content

grivera64/Priority-Based-Data-Preservation-Simulation

Repository files navigation

Priority-Based-Data-Preservation-Simulation


A simulation for testing data preservation of base station-less networks (BSNs) according to packet priority.

Table of Contents


About


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.

Setup


Dependencies

1. Clone the Repository

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.

2. Change directories into the source folder.

cd Priority-Based-Data-Preservation-Simulation
cd src

3. Compile using javac

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

4. Change directories into the binaries folder

cd ..
cd bin

5. Run the program

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

Example


Terminal output

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

Related Projects


Authors


About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages