The MATSim contrib for traffic lights is able to simulate traffic signals microscopically. For fixed-time control a default implementation is provided. Because of the modular structure of MATSim and the signals extension, own signal control approaches (e.g. for traffic-responsive signal control methods) can be easily included. Some implementations of traffic-responsive signal control approaches are also provided by this contrib. It is possible to use different signal control methods for different intersections in MATSim (e.g. some fixed-time, some adaptive).

Necessary input data can either be provided by specifying the corresponding input files in the config or by adding the signal elements directly into the scenario via code. For both ways, examples are given in the code examples package in this contrib (see above).

To help you to understand xml formats and code better, here some translations between MATSim terms and real world terms:

  • Signal: Traffic light, traffic signal, i.e. a physical box standing somewhere on the transport network indicating driving allowed/permited
  • Signal Group: Logical group of traffic lights, all lights display same color at the same time
  • Signal Control: Algorithm or control scheme that determines which colors are displayed by the different Signal Groups (e.g. fixed-time control)
  • Signal System: Collection of Signal Groups that is controlled by the same Signal Control (e.g. an intersection)
  • As a starting point please have a look at the code examples in this contrib (see above: codeexamples) and the code examples in the matsim-code-examples project. The best starting point is the class RunSignalSystemsExample in the package fixedTimeSignals.

    If you want to visualize the created scenario try to get and run the OTFVis contribution to MATSim, see OTFVis (this contribution is unsupported). An example is also given in the code examples package: VisualizeSignalScenario.

    For more information and documentation see the javadoc in the subpackage org.matsim.contrib.signals.

    Packages 
    Package Description
    org.matsim.codeexamples.adaptiveSignals  
    org.matsim.codeexamples.fixedTimeSignals  
    org.matsim.codeexamples.simpleResponsiveSignalEngine  
    org.matsim.contrib.signals
    This package contains interfaces and classes that provide functionality to plug a signal system model in the MATSim framework.
    org.matsim.contrib.signals.analysis  
    org.matsim.contrib.signals.builder  
    org.matsim.contrib.signals.controller  
    org.matsim.contrib.signals.controller.fixedTime  
    org.matsim.contrib.signals.controller.laemmerFix  
    org.matsim.contrib.signals.controller.sylvia  
    org.matsim.contrib.signals.data
    Data model
    org.matsim.contrib.signals.data.ambertimes.v10
    Amber times
    org.matsim.contrib.signals.data.conflicts  
    org.matsim.contrib.signals.data.conflicts.io  
    org.matsim.contrib.signals.data.consistency  
    org.matsim.contrib.signals.data.intergreens.v10
    Intergreen times
    org.matsim.contrib.signals.data.signalcontrol.v20
    Signal Control
    org.matsim.contrib.signals.data.signalgroups.v20
    Signal Groups
    org.matsim.contrib.signals.data.signalsystems.v20
    Signal Systems Data
    org.matsim.contrib.signals.events  
    org.matsim.contrib.signals.model
    Signal Model
    org.matsim.contrib.signals.otfvis  
    org.matsim.contrib.signals.sensor  
    org.matsim.contrib.signals.utils  
    org.matsim.core.mobsim.qsim.qnetsimengine  
    org.matsim.jaxb  
    org.matsim.jaxb.amberTimes10  
    org.matsim.jaxb.intergreenTimes10
    This package was automatically generated and is part of MATSim.
    org.matsim.jaxb.signalcontrol20
    This package was automatically generated and is part of MATSim.
    org.matsim.jaxb.signalgroups20
    This package was automatically generated and is part of MATSim.
    org.matsim.jaxb.signalsystems20
    This package was automatically generated and is part of MATSim.