Downloading and installing OpenTrafficSim
As of yet, OpenTrafficSim is not a stand-alone application, but is run from simulation scripts (i.e. java main classes). This method allows full flexibility and specification of the simulation. However, it does require an understanding of Java programming. To run the software there are two options. Note that only option two allows contributions to OpenTrafficSim.
- Download the source code and start a java project in any IDE (e.g. NetBeans or Eclipse).
- Setting up the environment as for developers, which is explained here: Installing and setting up the Eclipse IDE.
Java projects and dependencies
The OpenTrafficSim software consists of a collection of java projects, each with a demarcated role and purpose. The java projects depend on each other, i.e. software from one java project can only run with the software of the java projects it depends on. There is quite a number of projects and dependencies, including some external dependencies to software that is not strictly part of OpenTrafficSim. An overview of the most important java projects and dependencies is given in the figure below.
dsol-base & dsol-core (external) dsol is a generic event-based simulation core including many utility classes djunits (external) djunits allows for unit-safe calculations and programming without having to mind units |
↑ |
ots-base contains some generic simulation utilities such as parameter management |
↑ |
ots-core core of traffic simulation including network representation and macroscopic models ots-kpi stand-alone key-performance-indicator module, including trajectory sampling |
↑ |
ots-road microscopic simulation of vehicular traffic |
↑ |
ots-trafficcontrol event-based traffic control ots-parser-xml & ots-parser-osm OTS has several parsers to create OTS networks from various sources, xml is the native format |
↑ |
ots-demo contains demo's and should be the starting point for getting to know OpenTrafficSim |
Quickstart guide
The above overview of the most important projects should give you a general idea of where different functionality can be found. For a first glance at OpenTrafficSim, you are advised to got to org.opentrafficsim.demo.carFollowing.SuperDemo
in ots-demo. You can run this class, and a window will appear from which several scenarios and settings can be selected.
To get started on your own functionality, the location in the software where you need to be mostly depends on what the subject of your contribution is. For instance, when implementing a new microscopic model, you likely need to implement a new tactical planner for individual GTU's (Generic Transportation Unit's), building upon org.opentrafficsim.road.gtu.lane.tactical
in ots-road. But many, many other contributions are imaginable, and many of them would require completely new modules, packages, etc. For further information you are welcome to contact us.