{"id":24805462,"url":"https://github.com/blarc/crowd-evacuation","last_synced_at":"2025-03-25T08:12:07.015Z","repository":{"id":45156184,"uuid":"418432001","full_name":"Blarc/crowd-evacuation","owner":"Blarc","description":"An implementation of crowd-evacuation simulation with p5.js","archived":false,"fork":false,"pushed_at":"2022-01-11T09:24:42.000Z","size":17168,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-19T23:36:14.379Z","etag":null,"topics":["collective-behavior","evacuation-planning","p5js","simulation"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Blarc.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}},"created_at":"2021-10-18T09:30:41.000Z","updated_at":"2024-11-07T01:51:08.000Z","dependencies_parsed_at":"2022-09-02T20:12:39.571Z","dependency_job_id":null,"html_url":"https://github.com/Blarc/crowd-evacuation","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Blarc%2Fcrowd-evacuation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Blarc%2Fcrowd-evacuation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Blarc%2Fcrowd-evacuation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Blarc%2Fcrowd-evacuation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Blarc","download_url":"https://codeload.github.com/Blarc/crowd-evacuation/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245423185,"owners_count":20612747,"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","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":["collective-behavior","evacuation-planning","p5js","simulation"],"created_at":"2025-01-30T07:19:35.102Z","updated_at":"2025-03-25T08:12:06.995Z","avatar_url":"https://github.com/Blarc.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Crowd evacuation simulation\nThis repository contains the implementation of related [article](/article/out/crowd_evacuation_article.pdf) that was written as a part\nof *Crowd behaviour* course at the *Faculty of Computer and Information Science at the \nUniversity of Ljubljana*.\n\n## Description\nEach year a lot of terrorist attacks happen all over the world where a lot of people are\nkilled or heavily damaged. With hope to decrease the casualties of such attacks, we present\na crowd evacuation simulation that uses fuzzy logic to simulate the movement of people\nand assailants in different rooms.\n\nFirst we prepare models for achieving specific goals: obstacle avoidance, path\nsearching and goal seeking. We then integrate these models together by setting a weight\nfor each of the models, which determines how much each of the models affects the object's\nmovement. We test the algorithm by simulating evacuation in different rooms that we\nprepared in advance. For better understanding of the simulation and creation of\ndifferent rooms, user interface is implemented.\n\nThe article and implementation is based on existing article: *Zhou, Min \u0026 Dong, Hairong \u0026 Wen,\nDing \u0026 Yao, Xiuming \u0026 Sun, Xubin. (2016). Modeling of Crowd Evacuation With Assailants via a\nFuzzy Logic Approach. IEEE Transactions on Intelligent Transportation Systems*, which can be\nfound [here](https://ieeexplore.ieee.org/document/7442132).\n\n## Repository structure\nThe repository contains the following folders:\n- `article` contains the latex files and the article in pdf\n- `maps` contains saved simulation rooms\n- `presentation` contains video and ppt presentation\n- `results` contains different simulations' results\n- `src` contains the code\n\n## Live demo\nLive demo is deployed via GitHub pages and is available [here](https://blarc.github.io/crowd-evacuation/).\n\n## Running locally\nTo run the visualization locally you just have to clone the repo\n```bash\nclone https://github.com/Blarc/crowd-evacuation.git\n```\nand open `index.html` in your favourite browser **or** run it on a local server:\n```bash\ncd crowd-evacuation\n# for python3\npython -m http.server\n```\nFor different ways of setting up a local server you can check out [link](https://github.com/processing/p5.js/wiki/Local-server).\n\n## Live demo\nLive demo can be seen [here](https://blarc.github.io/crowd-evacuation/).\n\n## User interface\nFor creating rooms and running simulations you either have to upload a saved configuration or\ncreate your own. Some saved configurations are saved in folder `maps`. If you would like to\ncreate and run your own simulations, you can do so with different mouse modes, that can be\nenabled via keyboard:\n\n### Drawing\n- **D** - enables drawing obstacles mode\n- **P** - enables drawing pedestrians mode\n- **A** - enables drawing assailant mode\n- **I** - enables drawing pedestrians with custom goal mode (first click creates pedestrian, second click creates goal)\n- **E** - enables erasing mode\n- **C** - clears all created obstacles, pedestrians and assailants\n- **Size** - change the obstacle's size when drawing\n\n### Visual aids\n- **V** - hide / show pedestrian arcs\n- **K** - hide / show assailnt arcs\n\n### Simulation manipulation\n- **SPACE** - pause / resume simulation\n- **U** - remove all global and local goals\n- **R** - reset simulation (clears and resets the simulation, if preloaded configuration exists)\n- **Width / Height** - changes the size of the room\n\n### Saving / downloading\n- **S** - download current configuration of the simulation (created obstacles, pedestrians and assailants)\n- **Choose file** - upload saved simulation configuration\n- **Run simulations** - automatically resets simulation when there is no pedestrians left in the room and saves statistics each second\n- **T** - download simulation statistics\n\n## Acknowledgments\nExternal libraries have been used for the visualization:\n- **p5.js**: for drawing everything to the screen ([link](https://github.com/processing/p5.js/))\n- **quadtree.js**: optimisation for calculating interactions between objects ([link](https://github.com/CodingTrain/QuadTree))\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblarc%2Fcrowd-evacuation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblarc%2Fcrowd-evacuation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblarc%2Fcrowd-evacuation/lists"}