{"id":17149825,"url":"https://github.com/keeferrourke/f20-gcc-ns3-sim","last_synced_at":"2025-08-08T06:06:42.027Z","repository":{"id":72115339,"uuid":"315984696","full_name":"keeferrourke/f20-gcc-ns3-sim","owner":"keeferrourke","description":"Slides and code samples from my Guelph Coding Community presentation about ns-3 programming, delivered in Nov 2020.","archived":false,"fork":false,"pushed_at":"2020-11-25T15:47:52.000Z","size":2713,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-24T11:52:52.727Z","etag":null,"topics":["cc0","gplv2","guelph","guelph-computing","manet","ns-3","ns3","presentation","public-domain","slideshow"],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/keeferrourke.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-11-25T15:47:15.000Z","updated_at":"2020-11-25T15:50:26.000Z","dependencies_parsed_at":"2023-04-20T19:17:22.514Z","dependency_job_id":null,"html_url":"https://github.com/keeferrourke/f20-gcc-ns3-sim","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/keeferrourke/f20-gcc-ns3-sim","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keeferrourke%2Ff20-gcc-ns3-sim","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keeferrourke%2Ff20-gcc-ns3-sim/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keeferrourke%2Ff20-gcc-ns3-sim/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keeferrourke%2Ff20-gcc-ns3-sim/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/keeferrourke","download_url":"https://codeload.github.com/keeferrourke/f20-gcc-ns3-sim/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keeferrourke%2Ff20-gcc-ns3-sim/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269373109,"owners_count":24406321,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-08T02:00:09.200Z","response_time":72,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cc0","gplv2","guelph","guelph-computing","manet","ns-3","ns3","presentation","public-domain","slideshow"],"created_at":"2024-10-14T21:34:12.184Z","updated_at":"2025-08-08T06:06:41.984Z","avatar_url":"https://github.com/keeferrourke.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Network simulations with ns-3\n\nThis repository contains slides and some code samples from my GCC presentation,\ngiven on 2020 November 24 at 5:30pm EST.\n\n## Abstract\n\nOver the past semester, I've been working with [ns-3](https://nsnam.org) in an\nattempt to reproduce a simulation study for an algorithm that was designed to\nreplicate data efficiently in highly-partitioned mobile ad hoc networks.\nWhile I have a fair bit of experience with C++, nevertheless, getting started\nwith ns-3 was a lot more challenging than expected.\nThis presentation overviews an introduction to networks, some considerations\nto keep in mind when designing network simulations, and what you should expect\nwhen programming ns-3 \"scripts.\"\n\nI hope that this presentation can provide some historical context that makes it\neasier to understand some of the quirks of ns-3 programming, and that you will\nbe able to learn from some of my mistakes and struggles which I outline.\n\n## Slides\n\nA PDF copy of the slide presentation is included in this repository.\nThe original presentation was created with Google Slides and is located at the\nfollowing URL:\n\n\u003chttps://docs.google.com/presentation/d/1dlCj2B-NGzwKvMjamJPFVaxOz79d82rNQosMGwtMBEc/\u003e\n\n## Code samples\n\nTo run each of these code samples, download ns-3 as instructed in the slides.\nCopy these C++ source files to the `scratch/` directory of your distribution.\nFinally, run each simulation with `./waf --run scratch/$file`, where `$file`\nis the name of the simulation you want to run.\n\nYou can visualize most of these simulations by adding the `--vis` flag to the\nwaf run command.\n\nEach simulation will produce an XML file in the `animations/` directory adjacent\nto `scratch/`. These XML files can be opened with the `NetAnim` program, which\ncomes with your ns-3 distribution by default.\n\nSee the official documentation at \u003chttps://nsnam.org\u003e for more details.\n\n**Mobility model demos**\n\nThese scripts were used to generate the GIFs that are used on slide 44.\n\n1. `mobility-walk2d-bounds.cc`\n\n   Demonstrates a mobility model over a 100m x 100m area that looks like\n   energetic particles in a container.\n\n2. `mobility-walk2d-time.cc`\n\n   Demonstrates a mobility model over a 100m x 100m area that simulates\n   individuals aimlessly wandering over the area.\n\n3. `mobility-waypoint.cc`\n\n   Demonstrates a simple waypoint model where individuals pick a place to go,\n   wait there for some period of time as if to complete a task, then choose a\n   new destination and repeat. This can be thought of like a town square, where\n   individuals visit vendor stalls.\n\n4. `mobility-3d.cc`\n\n   Sample code to set up and run a 3D stochastic Gauss-Markov model.\n   As I understand it, this is not supported by either of the visualization\n   tools included with ns-3.32.\n\n5. `mobility-walk2d-default.cc`\n\n   Demonstrates the (not very useful) defaults for the RandomWalk2dMobilityModel.\n   This creates an effect where nodes have \"jitter,\" moving short distances and\n   changing direction randomly and often. As a result, the nodes do not travel\n   a very distance from their initial position even after running the simulation\n   for a substantial amount of time.\n\n**Demos**\n\nThese scripts were run as demonstrations during the \"Demo time\" slides.\nIn the first demo period, the first simulation was explained and run.\nIn the second demo period, the second simulation was explained and run.\n\n1. `point-to-point.cc`\n\n   The \"Hello World\" of ns-3.\n   This code is based on the examples/tutorial/first.cc program included with\n   the ns-3.32 source distribution. It has been modified to run for a longer\n   period of time and demonstrate more packets sent over the wire.\n\n2. `on-off-app.cc`\n\n   The \"Hello World\" of MANET simulations in ns-3.\n   This code runs a short simulation of 32 nodes running an \"on-off\" application\n   which tries to connect with the first node.\n   Nodes have a 15m radius of connectivity, with DSDV routing.\n   The visualization shows partitions occurring naturally in the network and lag\n   in distributing routing tables by this proactive routing algorithm.\n\n## License\n\nThe code samples in this repository are free software, made available under the\nGNU General Public License v2 (GPLv2). See the LICENSE file for more details.\n\nThe presentation slides and content are released to the Public Domain, free of\ncopyright restrictions and may be used or remixed as is seen fit.\nIn jurisdictions where public domain copyright law does not allow for free and\nunrestricted use, to the extent possible under law, I waive all copyrights and\nrelated rights to this work under the Creative Commons 0 (CC0) 1.0 Universal\nLicense.\n\n[![CC0](https://i.creativecommons.org/p/zero/1.0/88x31.png)](https://creativecommons.org/publicdomain/zero/1.0/\"\u003e)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeeferrourke%2Ff20-gcc-ns3-sim","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkeeferrourke%2Ff20-gcc-ns3-sim","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeeferrourke%2Ff20-gcc-ns3-sim/lists"}