MATSIM
Public Member Functions | List of all members
org.matsim.vis.snapshotwriters.SnapshotWriter Interface Reference
Inheritance diagram for org.matsim.vis.snapshotwriters.SnapshotWriter:
Inheritance graph
[legend]

Public Member Functions

void beginSnapshot (double time)
 
void endSnapshot ()
 
void addAgent (AgentSnapshotInfo position)
 
void finish ()
 

Detailed Description

Interface to implement custom snapshot writers. A snapshot contains information about agents (location, speed) at a specific moment in time. Depending on the format, multiple snapshots can be stored in one file. A snapshot writer should implement a custom constructor to initialize it. For each snapshot, first the method beginSnapshot() will be called, followed by several calls to addAgent() and a final call to endSnapshot(). When no more snapshots will have to be written, finish() is called.

Author
mrieser

Definition at line 34 of file SnapshotWriter.java.

Member Function Documentation

◆ beginSnapshot()

void org.matsim.vis.snapshotwriters.SnapshotWriter.beginSnapshot ( double  time)

Tells the snapshot writer that a new snapshot begins at the specified time.

Parameters
timeThe time of the snapshot.

Implemented in org.matsim.vis.snapshotwriters.TransimsSnapshotWriter.

◆ endSnapshot()

void org.matsim.vis.snapshotwriters.SnapshotWriter.endSnapshot ( )

Tells the snapshot writer that no more vehicles will be added to the current snapshot.

Implemented in org.matsim.vis.snapshotwriters.TransimsSnapshotWriter.

◆ addAgent()

void org.matsim.vis.snapshotwriters.SnapshotWriter.addAgent ( AgentSnapshotInfo  position)

Adds an agent to the current snapshot.

Parameters
positionThe position, id, and speed of the agent.

Implemented in org.matsim.vis.snapshotwriters.TransimsSnapshotWriter.

◆ finish()

void org.matsim.vis.snapshotwriters.SnapshotWriter.finish ( )

Tells the snapshot writer that no more snapshots will be added ("destructor").

Implemented in org.matsim.vis.snapshotwriters.TransimsSnapshotWriter.


The documentation for this interface was generated from the following file: