{"id":17334452,"url":"https://github.com/marshallasch/density-plots","last_synced_at":"2026-01-19T22:01:42.793Z","repository":{"id":43457070,"uuid":"377626958","full_name":"MarshallAsch/density-plots","owner":"MarshallAsch","description":"ns-3 simulation scripts to generate the city density plots for the thesis","archived":false,"fork":false,"pushed_at":"2023-10-20T02:15:53.000Z","size":20,"stargazers_count":0,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-06T11:48:56.899Z","etag":null,"topics":["ns-3","ns3","plots","simulation","simulations"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MarshallAsch.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":"2021-06-16T21:01:54.000Z","updated_at":"2021-11-26T20:27:49.000Z","dependencies_parsed_at":"2024-12-19T21:28:08.109Z","dependency_job_id":"bfcb71f1-44f6-4edb-bf03-d834ab7b4524","html_url":"https://github.com/MarshallAsch/density-plots","commit_stats":{"total_commits":4,"total_committers":2,"mean_commits":2.0,"dds":0.25,"last_synced_commit":"d61c0b67ba899695aa1a91393be02a881307e165"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MarshallAsch/density-plots","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarshallAsch%2Fdensity-plots","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarshallAsch%2Fdensity-plots/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarshallAsch%2Fdensity-plots/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarshallAsch%2Fdensity-plots/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MarshallAsch","download_url":"https://codeload.github.com/MarshallAsch/density-plots/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MarshallAsch%2Fdensity-plots/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28587062,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-19T20:45:59.482Z","status":"ssl_error","status_checked_at":"2026-01-19T20:45:41.500Z","response_time":67,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["ns-3","ns3","plots","simulation","simulations"],"created_at":"2024-10-15T15:06:06.726Z","updated_at":"2026-01-19T22:01:42.778Z","avatar_url":"https://github.com/MarshallAsch.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Code linter on main](https://img.shields.io/github/workflow/status/marshallasch/density-plots/Clang-format/main?style=plastic)\n![ns3 build checker on main](https://img.shields.io/github/workflow/status/marshallasch/density-plots/build-ns3/main?style=plastic)\n![GitHub](https://img.shields.io/github/license/marshallasch/density-plots?style=plastic)\n![Lines of code](https://img.shields.io/tokei/lines/github/marshallasch/density-plots?style=plastic)\n![NS3 version](https://img.shields.io/badge/NS--3-3.32-blueviolet?style=plastic)\n\n# Node coverage for different city population densities\n\nThis repository holds the code that is used to run the ns-3 simulations to generate the data and produce the density plots comparing several locations in canada.\n\nThis code was written for use with the ns-3.32 simulator and is designed to be run from within the scratch folder. \n\n\nGenerated the locations using the gen_coverage file using ns3\nI chose to use ns3 so that the same position allocator that is used for the actual simulation is also used to produce these figures\n\n\npopulation densities were multiplied by 25 to get the number of nodes in a 5km area.\n\nafter rounding the following values were used:\n- Minden  : 172\n- Rigolet : 2110\n- University of Guelph : 37777\n- Toronto : 108360\n\nnodes were assigned a set of random (x,y) coordinated from a uniform random distribution.\n\nThe seed and run values for the random number generator were set at '3' and '1' respectively for each of the 4 generations.\n\nThe x and y locations were extracted from the trace files for each node and was plotted with a python script with a 50m radius around it\nthe 50m is to signify the wifi range.\n\n\n## Prereqs:\n\n`pip install matplotlib argparse`\n\n\nIf building netanim:\n- qt4-qmake\n- libqt4-dev\n\n(additionally, on ubuntu 20.10, you need to add an additional repo because qt4 no longer ships with it)\n- https://launchpad.net/~gezakovacs/+archive/ubuntu/ppa\n\n## Building this project\n\nReproducibility is one of the key goals of simulator studies.\n\n 1. Download and build copy of the ns-3.32 all-in-one distribution.\n\n    ```sh\n    wget https://www.nsnam.org/release/ns-allinone-3.32.tar.bz2\n    tar xjvf ns-allinone-3.32.tar.bz2\n    cd ns-allinone-3.32\n    python3 ./build.py --enable-examples --enable-tests\n    ```\n\n 2. Change directories to the `scratch/` folder of the ns-3.32 source\n    distribution.\n\n    ```sh\n    cd ns-3.32/scratch/\n    ```\n\n 3. Clone this repository.\n\n    ```sh\n    git clone git@github.com:marshallasch/density-plots.git plots\n    ```\n\n4. Change directory back to the `ns-3.32` folder of the source distribution\n   and re-configure `./waf` so it can cache the new changes\n\n   ```sh\n   cd ..\n   ./waf configure --enable-examples --enable-tests\n   ./waf build\n   ```\n\n5. Run the example simulation that is included within the module.\n\n   ```sh\n   ./waf --run 'scratch/plots/plots'\n   ```\n   \n   This will generate an netanim xml file called `\u003ccity\u003e.xml`\n   This file will have multiple different entry types, for this plot we only care about the node locations. \n\n6. extract the node locations\n\n   Filter the file to only include the node locations\n\n   ```bash\n   $ grep -E \"^\u003cnode.*/\u003e$\" city.xml \u003e filtered.txt\n   ```\n\n7. The plot script expects a space separate list of node locations for a single time interval, so that each node only gets plotted once. \n\n   ```bash\n   $ cat filtered.txt | cut -d '\"' -f 6,8 | sed -E 's/\"/ /'  \u003e coordinates.txt\n   ```\n\n7. run `./genPlots.py --city Minden --range 50 --density 6.9 coordinates.txt` to generate the plot that shows a 5km x 5km area and the coverage from the number of devices from the population density.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarshallasch%2Fdensity-plots","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarshallasch%2Fdensity-plots","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarshallasch%2Fdensity-plots/lists"}