The TraLAMA plugin for JOSM allows the user to export the displayed OpenStreetMap data to SUMO, run a traffic simulation and view the results in JOSM as additional layers.
GIT
Get the source code from the repository using
git clone https://github.com/jsmretschnig/TraLAMA
- Docker - Enterprise Container Platform for High-Velocity Innovation
- XQuartz - X11
- TraLAMA.app - can be found within the repository
Prepare XQuartz on macOS
- Open XQuartz using the
xhost +
command - Go to Settings and make sure to activate the
Allow connections from network clients
option - Restart XQuartz
(this has to be done only once)
Prepare XLaunch on Windows
- Start XLaunch and select
Multiple windows
,Display number -1
,Start no client
, tick allExtra Settings
and save the configuration file. Prepare docker-compose on Windows - Remove the X11 parts (
/tmp/.X11-unix:/tmp/.X11-unix:rw
) within thedocker-compose.yml
file. Prepare Lifeboat on Windows - Start Lifeboat and select the
docker-compose.yml
file.
- Start Docker
1. Build Docker Images
We assume that you are inside each docker folder
- Build JOSM docker with
docker build . -t josm-img
- Build SUMO docker with
docker build . -t sumo-img
Hints:
This can take up to 30 minutes. To build the sumo-img successfully, the memory size for Docker needs to be at least 4GB.
1.1 Docker Images from Docker Hub
As an alternative, the docker images can be downloaded from https://hub.docker.com/r/jetoff41/josm-tralama
and https://hub.docker.com/r/jetoff41/sumo-tralama
. However, to start these images properly, data from this repository is required.
[NEW] on Windows
- Start Docker
- Start XLaunch (e.g. via saved configuration file)
- Open Lifeboat and click the Play button on the upper right.
[NEW] on macOS
- Double-Click
TraLAMA.app
to automatically start Docker, XQuartz and the TraLAMA plugin (including JOSM and SUMO).
Attention: Docker usually needs some time to enter the running state. Just openTraLAMA.app
again. - After closing JOSM, you probably have to stop the SUMO container manually using
docker stop sumo-container
.
Note: The application requires the xhost executable within /opt/X11/bin/
and the docker-compose executable within /Applications/Docker.app/Contents/Resources/bin/
.
3 Run (simultaneously)
The easiest way to run both docker-containers simultaneously is to call docker-compose up
DO NOT upload changes that do not represent the real world to the OpenStreetMap server. For example if you add a new traffic light for simulation purposes, an upload would cause falsified information for OpenStreetMap users unless the traffic authority places a real traffic light at this position.
- JOSM Docker: Port 3030
- SUMO Docker: Port 4040
Network Data
- OpenStreetMap of Kirchheim
can be found in ./data/
Demand Data
- Static Traffic Demand Data for Kirchheim
can be found in ./data/input-simulation/demand/
can be found in ./data/output-simulation/ after each simulation
- Docker - Enterprise Container Platform for High-Velocity Innovation
- Jakob Smretschnig - jakob.smretschnig@tum.de
- TraLAMA - JOSM Plugin: GPLv3, everything inside the SUMO container (e.g. Conversion Tools): EPLv2
- SUMO - EPL
- JOSM - GPL
This research was supported by the Chair for Applied Software Engineering (Technical University of Munich). Many thanks to my advisor Mariana Avezum who provided insight and expertise that greatly improved this work.
- docker-sumo - Bo Gao
- docker-josm - Young Hahn
- sumoconvert - Ignacio Palermo, Julio Rivera
Data that was prepared by the iPraktikum Team is always marked with an i
-prefix.
usually: Ant build, versioned in SVN
https://josm.openstreetmap.de/wiki/DevelopersGuide/DevelopingPlugins#DevelopingPlugins
IntelliJ Configuration
- Run/Debug Configurations: select Application, Main class has to be
org.openstreetmap.josm.gui.MainApplication
- File -> Project Structure:
- SDK=1.8, ProjectLanguageLevel=8, Libraries: add
/josm/core/dist/josm-custom.jar
- Artifacts: add
JAR
- View -> Tool Windows -> Ant Build: select
build.xml
and then RUN - Terminal: go to plugin folder, run
ant install
orant
orant clean dist
- Run/Debug Application -> JOSM opens: go to Preferences -> Plugins and activate the sumo plugin (has to be done only once)
- Entry Point for the plugin is
public Sumo (PluginInformation info) {...}
Hint: only the ant install
command puts a new, functioning .jar
file to both the josm/dist
folder and the Users/<YourName>/Library/JOSM/plugins/
folder.
Save docker images as .tar
files for an easier deployment
docker save -o sumo-docker.tar sumo-img
docker save -o josm-docker.tar josm-img
Load docker images
docker load -i sumo-docker.tar
docker load -i josm-docker.tar
Advantages: faster; no need to build