Skip to content

EWeb-b/Dissertation---Crowd-Simulation-to-aid-Design

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Installation

The program is written in Python 2.7 and as such will need to be run in an appropriate environment. The required external libraries can be found in the requirements.txt file.

Menge will need to be installed. Instructions on how to do so can be found here: https://github.com/MengeCrowdSim/Menge

  *make sure that the 'Menge-master' directory is on the same level as the 'myAttempts' directory this README file is in.*

The MengeUtils library of Python functions is included in this folder, in the 'MengeUtils' subdirectory. I do not make any claim as to their creation - they are included here for ease of use.

Usage

main.py can be run via the command line with arguments:

python main.py numUnits<int> numBenches<int> pedModel<string>

Where numUnits is the number of units you'd like to place in the scene afterwards and numBenches is the number of benches. The pedModel argument specifies which pedestrian model to use. The options are: ['helbing', 'pedvo', 'orca', 'zanlungo', 'gcf', 'karamouzas', 'johannson']

This executes one iteration of the workflow. This will execute the Menge crowd simulator on the shoppingStreet/shoppingStreet.xml file, which specifies the scene file as shoppingStreet/shoppingStreetS.xml and the behaviour file as shoppingStreet/shoppingStreetB.xml. The simulation will output its agent trajectory data as an scb file. If the simulation has loaded but appears paused, press the spacebar to un-pause it. The simulation can be stopped at any time by pressing Ctrl + Q. You can press the H key to see additional commands - they will be printed to the terminal screen.

When the simulator has been terminated by pressing Ctrl + Q, the analysis tools will be run on its scb file. Firstly, the analysis tools from MengeUtils will be run using performAnalysisTasks.py and their graphs will be saved. The average walking time for agents to walk the length of the road will be calculated through main.py, calling the averageWalkingTimes.py file.

Afterwards, the modObsGoalsRoadmap.py file will be called by main.py to automatically move the random obstacles and edit the roadmap to fit around them.

This completes one iteration of the main.py workflow. By running main.py again, the simulator will be run using the scene configuration which was altered by the previous iteration's call to modObsGoalsRoadmap.py.

Running aspects separately

performAnalysisTasks.py and averageWalkingTimes.py can be called separately via the command line too. You'll need to supply the path/name of an scb file and the name of a subdirectory in which to save the graphs:

performAnalysisTasks.py scbFile<filename> outputFolder<string>
averageWalkingTimes.py scbFile<filename> outputFolder<string>

modObsGoalsRoadmap.py can also be run separately through the command line by specifying the number of unit and bench obstacles to place, as so:

modObsGoalsRoadmap.py numUnits<int> numBenches<int>

The Menge simulator itself can also be run separately by first navigating to the Menge-master/Exe directory. Once there it can be run using

./menge -p <pathToshoppingStreet.xml>

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published