-
Notifications
You must be signed in to change notification settings - Fork 5
Usage
-
Gradle 4.7
Note: Gradle doesn't need to be installed if the project'sgradle wrapper
is used instead. -
Java 1.8.0_172
Java 1.8.0_201
Note: With higher Java version on our systems, the software doesn't run without exceptions. So setting theJAVA_HOME
variable accordingly is recommended. It may help to add${JAVA_HOME}/bin
to yourPATH
variable. You can check the version used by gradle with./gradlew -version
. The entryJVM
depends on yourJAVA_HOME
variable. -
python3
Note: Only needed for python scripts. Additional python packages may be required depending on the executed script.
Demonstrations and examples can be executed using gradle
.
This project contains a gradle wrapper
file, so you don't need to install it.
Before running a simulation, map data is needed.
All OpenStreetMap (OSM) files need to be in the OSM XML format, as, for example, provided by the OpenStreetMap web interface.
The project's python tool osmloader
can be used to download such map files (e.g. if your file is too large for OSM), but the OSM web interface helps finding the right coordinates.
If you like to download bigger maps, take a look at Geofabrik.
You can execute the script via
./gradlew :tools:osmloader:run -Dexec.args="<args>"
where <args>
should be -h
at first.
This little python-subproject is kind of the "hello world" project for a simulation of the Nagel-Schreckenberg-Model. It can be executed using
./gradlew :examples:circlestreet1D:run
or
./gradlew :examples:circlestreet1D:run -Dexec.args="<args>"
where <args>
is depending on the script and can change simulation parameters (e.g. colormap).
For more information about <args>
, set it to -h
.
The main UI provides an overview of the simulation. The scenario is currently fixed (random routes), however various simulation parameters, as well as the number of vehicles and the used map, can be adjusted
./gradlew :microtrafficsim-ui:run
A (somewhat) stable demonstration can be executed from the master
-branch.
The fixed simulation example features a fixed scenario and fixed parameters, It represents a former state of development, therefore the simulation parameters can't be changed without changing code. It can be executed using
./gradlew :examples:simulation:run -Dexec.args="<path to OSM-XML file>"
The map-viewer example can be executed using
./gradlew :examples:mapviewer:run -Dexec.args="<path to OSM-XML file>"
This chapter details the keyboard and mouse-controls for the specific components of this program, as well as the main UI, Map Viewer Example, and the Simulation Example.
Note: As of now, some of the described functionality may only be available in the wip/serialization
branch.
Input | Action |
---|---|
Right Mouse Down + Mouse Drag | Move map |
Middle Mouse Down + Mouse Drag | Move map |
Pressing Ctrl in combination with any of the following input options will keep the previously selected elements selected, not doing so will reset the selection. Vertices can only be selected (and modified) after the respective area has been selected.
Input | Action |
---|---|
Right Mouse Click | Select area or vertex of (selected) area beneath cursor |
Left Mouse Down + Mouse Drag + Mouse Release | Select multiple areas using a selection-rectangle |
The Property Window can be used to change specific properties of the selected areas. It will open automatically upon selection.
Input | Action |
---|---|
Right Mouse Down + Mouse Drag | Move the vertex beneath the cursor (if any) and reset selection |
Ctrl + Right Mouse Down + Mouse Drag | Move the selected areas (if the cursor is over an area) or the selected vertices (if cursor is over a vertex), keep selection |
Shift + Right Mouse Click | Create a new vertex, either starting a new area or adding it to an existing area if the cursor is close to the edge of a selected area (indicated) |
Delete | Remove selected vertices, if any, else remove selected areas (if any). Any area with less than 3 vertices will be removed automatically |
Input | Action |
---|---|
M | Open OpenStreetMap XML file |
N | Create new scenario |
, | Update current scenario |
Space | Run/Pause simulation |
→ | Advance simulation one step |
Input | Action |
---|---|
Esc or Q | Close application |
W or Ctrl + S | Save map as binary file |
E or Ctrl + O | Open OpenStreetMap XML or binary file |
C | Reset (center) view |
Input | Action |
---|---|
Esc or Q | Close application |
W or Ctrl + S | Save map as binary file |
E or Ctrl + O | Open OpenStreetMap XML or binary file |
C | Reset (center) view |
Space | Run/Pause simulation |
→ | Advance simulation one step |
R | Reset simulation |
Home - Usage - Validation - Tools - Implementation Details - Credits - Papers