Class LaneGTUTransceiver

java.lang.Object
org.djutils.event.EventProducer
org.opentrafficsim.imb.transceiver.AbstractTransceiver
org.opentrafficsim.imb.transceiver.urbanstrategy.LaneGTUTransceiver
All Implemented Interfaces:
Serializable, EventListener, EventListenerInterface, EventProducerInterface, Identifiable, org.opentrafficsim.imb.transceiver.EventTransceiver, org.opentrafficsim.imb.transceiver.Transceiver

public class LaneGTUTransceiver
extends AbstractTransceiver
OTS publishes events about the lanes to IMB, e.g. to know about the number of vehicles on a particular lane.
At the start of the OTS simulation, or when a Lane is added later, a NEW message is sent to IMB to identify the lane, the coordinates of its center 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, Node NEW and Link 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
laneId String id of the Lane, unique within the Link
laneNumber int identification of the lane number within the Link.
centerLine.numberOfPoints int number of points for the center line of the Lane. The number of doubles that follow is 3 times this number
centerLine.x1 double x-coordinate of the first point of the center line
centerLine.y1 double y-coordinate of the first point of the center line
centerLine.z1 double z-coordinate of the first point of the center line
...
centerLine.xn double x-coordinate of the last point of the center line
centerLine.yn double y-coordinate of the last point of the center line
centerLine.zn double z-coordinate of the last point of the center line

CHANGE

 
Variable Type Comments
timestamp double time of the event, in simulation time seconds
networkId String Id of the Network where the Lane resides
linkId String id of the Link to which the lane belongs
laneId String id of the Lane, unique within 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 Lane
countAfterEvent int the number of vehicles on the Lane 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
laneId String id of the Lane that is removed from the Network

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$, $LastChangedDate$, by $Author$, initial version Sep 13, 2016
Author:
Alexander Verbraeck, Peter Knoppers, Wouter Schakel
See Also:
Serialized Form
  • Constructor Details

    • LaneGTUTransceiver

      public LaneGTUTransceiver​(org.opentrafficsim.imb.connector.Connector connector, DEVSSimulatorInterface.TimeDoubleUnit simulator, OTSNetwork network) throws org.opentrafficsim.imb.IMBException
      Construct a new LaneGTUTransceiver.
      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 for Lanes 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