Class Controller

  • All Implemented Interfaces:
    java.io.Serializable

    public class Controller
    extends java.lang.Object
    implements java.io.Serializable
    Traffic Light Controller

    Copyright (c) 2013-2020 Delft University of Technology, PO Box 5, 2600 AA, Delft, the Netherlands. All rights reserved.
    BSD-style license. See OpenTrafficSim License.

    Version:
    $Revision: 1155 $, $LastChangedDate: 2015-07-26 01:01:13 +0200 (Sun, 26 Jul 2015) $, by $Author: averbraeck $, initial version 15 jul. 2015
    Author:
    Alexander Verbraeck, Peter Knoppers
    See Also:
    Serialized Form
    • Constructor Detail

      • Controller

        public Controller​(java.lang.String name,
                          DEVSSimulatorInterface.TimeDoubleUnit simulator)
                   throws GTUException,
                          NetworkException,
                          javax.naming.NamingException
        Parameters:
        name - String; the name of the OnOffTrafficLight
        simulator - DEVSSimulatorInterface.TimeDoubleUnit; the simulator to avoid NullPointerExceptions
        Throws:
        GTUException - when GTU cannot be created.
        javax.naming.NamingException - if an error occurs when adding the animation handler
        NetworkException - when the GTU cannot be placed on the given lane
    • Method Detail

      • unBlock

        protected void unBlock()
      • addTrafficLight

        public void addTrafficLight​(int sequence2,
                                    SimpleTrafficLight trafficLight)
        Parameters:
        sequence2 - int; sequence2
        trafficLight - SimpleTrafficLight; trafficLight
      • toString

        public final java.lang.String toString()
        Overrides:
        toString in class java.lang.Object