This NS-3 scratch simulator code that attempts to implement the RHPMAN scheme and reproduce its performance evaluation as described by the following paper:
K. Shi and H. Chen, "RHPMAN: Replication in highly partitioned mobile ad hoc networks," International Journal of Distributed Sensor Networks Jul. 2014.
Our lab1 is investigating ad-hoc mobile mesh networks (MANETs) and their properties with the hopes that we may inform development of quality mesh network protocols and network applications. A challenge with MANETs is their inherently mobile nature. Much research has been done to discover good algorithms for data distribution and replication within MANETs, however many of these studies are unreproducible as-is.
Having identified the RHPMAN scheme as described by Shi and Chen 2014 as a promising data replication scheme, this project was created to attempt to implement it on the ns-3 simulator, and run the scheme under a similar setting as is described in the performance evaluation conducted by Shi and Chen.
Note: Shi and Chen used the OPNET simulator for their study, however this simulator does not appear to be widely available anymore. Hence, we have chosen to use the latest version of the popular ns-3 network simulator instead.
Reproducibility is key in simulation studies, so here's how to build the project!
-
Download and build copy of the ns-3.32 all-in-one distribution.
wget https://www.nsnam.org/release/ns-allinone-3.32.tar.bz2 tar xjvf ns-allinone-3.32.tar.bz2 cd ns-allinone-3.32 python3 ./build.py --enable-examples
-
Change directories to the
scratch/
folder of the ns-3.32 source distribution.cd ns-3.32/scratch/
-
Clone this repository.
git clone [email protected]:keeferrourke/rhpman-sim.git rhpman
-
Change directory back to the
ns-3.32
folder of the source distribution and run this simulation through thewaf
tool. This will compile the simulation code and start executing the code.cd .. ./waf --run 'scratch/rhpman/rhpman`
If you're familiar with ns-3, then you should know that the simulation is run
via the waf
build tool. Arguments to this program must be part of the same
string that is passed to ./waf --run
(that's just how it works 🤷).
Every parameter of the simulation is configurable. Run the following to see all the configurable parameters. The default values are as described in the RHPMAN paper cited at the top of this document.
./waf --run 'scratch/rhpman/rhpman --printHelp' # <-- mind the quotes!
You can view an animation of the simulation using NetAnim
, which is included
with the ns-3 all-in-one distribution. To do so, run the following:
./waf --run 'scratch/rhpman/rhpman --animation-xml=path/to/rhpman.xml
This will generate an XML file at the specified path. You can then open this
file with NetAnim
to view what happens during the simulation run.
This project is formatted according to the .clang-format
file included in this
repository. It intentionally deviates from the code style used by the ns-3
library and simulator developers.
While ns-3 is itself licensed under the GNU General Public License v2, the code in this repository is made available under the Internet Systems Consortium (ISC) License.
A copy of this license is included in this repository, and embedded in the top of each source file.