Class LinkGTUTransceiver

All Implemented Interfaces:
Serializable, EventListener, EventListenerInterface, EventProducerInterface, Identifiable, org.opentrafficsim.imb.transceiver.EventTransceiver, org.opentrafficsim.imb.transceiver.Transceiver

public class LinkGTUTransceiver
extends AbstractTransceiver
OTS publishes events about the links to IMB, e.g. to know about the number of vehicles on a link.
At the start of the OTS simulation, or when a Link is added later, a NEW message is sent to IMB to identify the link, the coordinates of its design line, and the start and end nodes of the link. The CHANGE message is posted whenever a vehicle enters or leaves a link. When a Link is removed from the network, a DELETE event is posted. The Link NEW messages are posted after the Network NEW and Node NEW messages are posted.

NEW

 
Variable Type Comments
timestamp double time of the event, in simulation time seconds
networkId String Id of the Network where the Link resides
linkId String id of the Link; unique within the Network
startNodeId String id of the start node, provided in a Node NEW message
endNodeId String id of the end node, provided in a Node NEW message
designLine.numberOfPoints int number of points for the design line of the Link. The number of doubles that follow is 3 times this number
designLine.x1 double x-coordinate of the first point of the design line
designLine.y1 double y-coordinate of the first point of the design line
designLine.z1 double z-coordinate of the first point of the design line
...
designLine.xn double x-coordinate of the last point of the design line
designLine.yn double y-coordinate of the last point of the design line
designLine.zn double z-coordinate of the last point of the design line

CHANGE

 
Variable Type Comments
timestamp double time of the event, in simulation time seconds
networkId String Id of the Network where the Link resides
linkId String id of the Link
isVehicleAdded boolean true if vehicle added, false if vehicle removed
gtuId String id of the gtu that was added or removed from the Link
countAfterEvent int the number of vehicles on the link after the event

DELETE

 
Variable Type Comments
timestamp double time of the event, in simulation time seconds
networkId String Id of the Network where the Link resides
linkId String id of the Link that is removed from the Network

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

Version:
$Revision$, $LastChangedDate$, by $Author$, initial version Sep 13, 2016
Author:
Alexander Verbraeck, Peter Knoppers, Wouter Schakel
See Also:
Serialized Form
  • Constructor Details

    • LinkGTUTransceiver

      public LinkGTUTransceiver​(org.opentrafficsim.imb.connector.Connector connector, DEVSSimulatorInterface.TimeDoubleUnit simulator, OTSNetwork network) throws org.opentrafficsim.imb.IMBException
      Construct a new LinkGTUTransceiver.
      Parameters:
      connector - Connector; the IMB connector through which this transceiver communicates
      simulator - DEVSSimulatorInterface.TimeDoubleUnit; the simulator to schedule the incoming notifications on
      network - OTSNetwork; the OTS network on which Links are registered
      Throws:
      org.opentrafficsim.imb.IMBException - when the registration of one of the channels fails
      NullPointerException - in case one of the arguments is null.
  • Method Details