Class ControlParser


  • public final class ControlParser
    extends java.lang.Object
    NodeParser takes care of parsing the CONTROL tags for the Traffic Lights in the XML network.

    Copyright (c) 2003-2018 Delft University of Technology, Jaffalaan 5, 2628 BX Delft, the Netherlands. All rights reserved. See for project information www.simulation.tudelft.nl. The source code and binary code of this software is proprietary information of Delft University of Technology.
    Author:
    Alexander Verbraeck
    • Method Detail

      • parseControl

        public static void parseControl​(OTSRoadNetwork otsNetwork,
                                        OTSSimulatorInterface simulator,
                                        java.util.List<CONTROL> controls)
                                 throws NetworkException,
                                        java.net.MalformedURLException,
                                        java.io.IOException,
                                        SimRuntimeException,
                                        TrafficControlException
        Creates control objects.
        Parameters:
        otsNetwork - OTSRoadNetwork; network
        simulator - OTSSimulatorInterface; simulator
        controls - List<CONTROL>; control objects
        Throws:
        NetworkException - when sensors could not be added to the network
        java.io.IOException - when a TrafCOD engine cannot be loaded
        java.net.MalformedURLException - when a TrafCOD engine cannot be loaded
        TrafficControlException - when a TrafCOD engine cannot be constructed for some other reason
        SimRuntimeException - when a TrafCOD engine fails to initialize