MATSIM
Classes | Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | Static Private Attributes | List of all members
org.matsim.vis.snapshotwriters.PositionInfo Class Reference
Inheritance diagram for org.matsim.vis.snapshotwriters.PositionInfo:
Inheritance graph
[legend]

Classes

class  DirectBuilder
 
class  LinkBasedBuilder
 

Public Member Functions

final Id< PersongetId ()
 
final Id< LinkgetLinkId ()
 
final Id< VehiclegetVehicleId ()
 
final double getEasting ()
 
final double getNorthing ()
 
final double getAzimuth ()
 
final double getColorValueBetweenZeroAndOne ()
 
final AgentState getAgentState ()
 
final DrivingState getDrivingState ()
 
int getUserDefined ()
 
String toString ()
 

Public Attributes

String marker = "marker"
 

Private Member Functions

 PositionInfo (Id< Person > agentId, Id< Link > linkId, Id< Vehicle > vehicleId, double easting, double northing, double colorValue, AgentState agentState, DrivingState drivingState, int user)
 

Private Attributes

final Id< PersonagentId
 
final Id< LinklinkId
 
final Id< VehiclevehicleId
 
final double easting
 
final double northing
 
final double colorValue
 
final AgentState agentState
 
final DrivingState drivingState
 
final int user
 

Static Private Attributes

static final double TWO_PI = 2.0 * Math.PI
 
static final double PI_HALF = Math.PI / 2.0
 

Detailed Description

A helper class to store information about agents (id, position, speed), mainly used to create snapshots. It also provides a way to convert graph coordinates (linkId, offset) into Euclidean coordinates. Also does some additional coordinate shifting (e.g. to the "right") to improve visualization. In contrast to earlier versions of this comment, it does not define a physical position of particles in the queue model; that functionality needs to be provided elsewhere.

This class has two builders since different parts of the code set different things which are only loosely related. I guess this could be improved...

Author
mrieser, knagel

Definition at line 24 of file PositionInfo.java.

Constructor & Destructor Documentation

◆ PositionInfo()

org.matsim.vis.snapshotwriters.PositionInfo.PositionInfo ( Id< Person agentId,
Id< Link linkId,
Id< Vehicle vehicleId,
double  easting,
double  northing,
double  colorValue,
AgentState  agentState,
DrivingState  drivingState,
int  user 
)
private

Definition at line 39 of file PositionInfo.java.

References org.matsim.vis.snapshotwriters.PositionInfo.agentId, org.matsim.vis.snapshotwriters.PositionInfo.agentState, org.matsim.vis.snapshotwriters.PositionInfo.colorValue, org.matsim.vis.snapshotwriters.PositionInfo.drivingState, org.matsim.vis.snapshotwriters.PositionInfo.easting, org.matsim.vis.snapshotwriters.PositionInfo.linkId, org.matsim.vis.snapshotwriters.PositionInfo.northing, org.matsim.vis.snapshotwriters.PositionInfo.user, and org.matsim.vis.snapshotwriters.PositionInfo.vehicleId.

Referenced by org.matsim.vis.snapshotwriters.PositionInfo.DirectBuilder.build(), and org.matsim.vis.snapshotwriters.PositionInfo.LinkBasedBuilder.build().

Member Function Documentation

◆ getId()

final Id<Person> org.matsim.vis.snapshotwriters.PositionInfo.getId ( )

◆ getLinkId()

final Id<Link> org.matsim.vis.snapshotwriters.PositionInfo.getLinkId ( )

◆ getVehicleId()

final Id<Vehicle> org.matsim.vis.snapshotwriters.PositionInfo.getVehicleId ( )

◆ getEasting()

final double org.matsim.vis.snapshotwriters.PositionInfo.getEasting ( )

◆ getNorthing()

final double org.matsim.vis.snapshotwriters.PositionInfo.getNorthing ( )

◆ getAzimuth()

final double org.matsim.vis.snapshotwriters.PositionInfo.getAzimuth ( )

Implements org.matsim.vis.snapshotwriters.AgentSnapshotInfo.

Definition at line 77 of file PositionInfo.java.

77  {
78  throw new RuntimeException("this is deprecated. Get over it.");
79  }

◆ getColorValueBetweenZeroAndOne()

final double org.matsim.vis.snapshotwriters.PositionInfo.getColorValueBetweenZeroAndOne ( )

◆ getAgentState()

final AgentState org.matsim.vis.snapshotwriters.PositionInfo.getAgentState ( )

◆ getDrivingState()

final DrivingState org.matsim.vis.snapshotwriters.PositionInfo.getDrivingState ( )

◆ getUserDefined()

int org.matsim.vis.snapshotwriters.PositionInfo.getUserDefined ( )

◆ toString()

String org.matsim.vis.snapshotwriters.PositionInfo.toString ( )

Definition at line 102 of file PositionInfo.java.

References org.matsim.vis.snapshotwriters.PositionInfo.northing.

102  {
103  return "PositionInfo; agentId: " + this.agentId.toString()
104  + " easting: " + this.easting
105  + " northing: " + this.northing;
106  }

Member Data Documentation

◆ TWO_PI

final double org.matsim.vis.snapshotwriters.PositionInfo.TWO_PI = 2.0 * Math.PI
staticprivate

◆ PI_HALF

final double org.matsim.vis.snapshotwriters.PositionInfo.PI_HALF = Math.PI / 2.0
staticprivate

◆ agentId

final Id<Person> org.matsim.vis.snapshotwriters.PositionInfo.agentId
private

◆ linkId

final Id<Link> org.matsim.vis.snapshotwriters.PositionInfo.linkId
private

◆ vehicleId

final Id<Vehicle> org.matsim.vis.snapshotwriters.PositionInfo.vehicleId
private

◆ easting

final double org.matsim.vis.snapshotwriters.PositionInfo.easting
private

◆ northing

final double org.matsim.vis.snapshotwriters.PositionInfo.northing
private

◆ colorValue

final double org.matsim.vis.snapshotwriters.PositionInfo.colorValue
private

◆ agentState

final AgentState org.matsim.vis.snapshotwriters.PositionInfo.agentState
private

◆ drivingState

final DrivingState org.matsim.vis.snapshotwriters.PositionInfo.drivingState
private

◆ user

final int org.matsim.vis.snapshotwriters.PositionInfo.user
private

◆ marker

String org.matsim.vis.snapshotwriters.AgentSnapshotInfo.marker = "marker"
inherited

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