diff --git a/README.md b/README.md index 2387901b7fea66de780152313bc3193b8d1053d4..25be63742adbb841e68474bd23bb18e5e58f9f06 100644 --- a/README.md +++ b/README.md @@ -1,10 +1,46 @@ # MANET-Rank -A competitive evaluation framework for defense protocols in Mobile Ad Hoc Environments (MANETs). Complete code will be available soon. +A competitive evaluation framework for defense protocols in Mobile Ad Hoc Environments (MANETs). # Content -- Full C++ NS-3.36 code for the lightweight protcol, the DST protocol and the attack protocol -- Slurm file generation to automate NS3 simulations in High Performance Compute facilities (Like IRIDIS at Southampton, UK) -- Python Code to extract the NS3 simulation results. -- Python Code for bootstrapping and final results. +- Full C++ NS-3.36 code for the lightweight protcol, the DST protocol and the Velocity-threshold protocol (Coming Soon) +- Full C++ NS-3.36 code for each grey hole attack type (Probabilistic, Time-Based and Precusor-Based) (Coming Soon) +- Slurm file generation to automate NS3 simulations in High Performance Compute facilities, Like IRIDIS at Southampton, UK. +- Python Code to run MANET-Rank + +# Requirements + +# Installation + +## Running MANET-Rank on Pre-processed data + +To run MANET-Rank with the pre-processed data simple run: +```python MANET-Rank.py "results/"``` + +By default, this will create a DPDR/ folder in the "results/" folder which will hold 5 types of files: +- histogram_*.png files: these graphs will show the regret distributions for all strategies, per environment. +- first_placed_rank.csv: this will show the winning strategy for all environments. +- ranked_list_*.csv: this will show the rankings for each environment for MANET-Rank +- orig_first_placed_rank.csv: this will show the winning strategies for all environments (without bootstrapping). +- orig_ranked_list_*.csv: this will show the rankings for each environment for MANET-Rank (without bootstrapping). + +If you ran MANET-Rank.py without editing the file, you would have created DPDR strategies, in the main section of MANET-Rank.py you can see a few commented lines of code: +``` +#generate_manet_rank(_processed_file_dir, "Attack_DPDR/", "DPDR", inversion=True, attacker_analysis=True) +#generate_manet_rank(_processed_file_dir, "Attack_EED/", "EED", inversion=False, attacker_analysis=True) +#generate_manet_rank(_processed_file_dir, "Attack_FScore/", "FScore", inversion=True, attacker_analysis=True) +#generate_manet_rank(_processed_file_dir, "FScore/", "FScore", inversion=False, attacker_analysis=False) +``` +- _processed_file_dir is the directory where the processed file is (specified at command line level). +- "Attack_DPDR/" is the folder name that we want to create +- "DPDR" is the metric of interest +- inversion=True/False mutliplies the performance metric by -1 if needed (in the case of EED, the performance metrics inside the CSV are already negative) +- attacker_analysis=True/False switches to the attack perspective, which will produce rankings of attack strategies. + +# File Explanation + +- ConfigFileCreate.py: This python file, in conjunction with ConfigFileHelper.py and StrategyHelper.py, will take a JSON file of attacker/defender strategies in combination with environment paramters to produce configuration files for the NS3 software. +- GenerateCommands.py: This python file generates slurm files for HPCs using hpc_template.slurm and master_template.slurm as a base. +- PostProcess.py: This python file takes a large amount of .csv files (generated from the NS3 software) and combines them into one csv file "processed_data.csv". +- \ No newline at end of file