Class GtuDumper

java.lang.Object
org.opentrafficsim.core.gtu.GtuDumper

public class GtuDumper extends Object
GTUDUmper; create a text file with the locations, directions and speeds of all GTUs at regular intervals.

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

Author:
Alexander Verbraeck, Peter Knoppers, Wouter Schakel
  • Constructor Summary

    Constructors
    Constructor
    Description
    GtuDumper(org.djunits.value.vdouble.scalar.Duration firstDumpTime, org.djunits.value.vdouble.scalar.Duration interval, Network network, String fileNamePrefix)
    Construct a new GTUDumper.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Write all GTU positions in a file.
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • GtuDumper

      public GtuDumper(org.djunits.value.vdouble.scalar.Duration firstDumpTime, org.djunits.value.vdouble.scalar.Duration interval, Network network, String fileNamePrefix) throws SimRuntimeException
      Construct a new GTUDumper.
      Parameters:
      firstDumpTime - the time of the first dump
      interval - the interval until each subsequent dump
      network - the network (that will contain the GTUs to dump)
      fileNamePrefix - directory and first part if the file names; the simulation time of the dump will be appended to the file name. The file type will be .txt
      Throws:
      SimRuntimeException - when scheduling the first dump time fails
  • Method Details

    • dump

      public void dump()
      Write all GTU positions in a file.
    • toString

      public String toString()
      Overrides:
      toString in class Object