Class CarDriver
Standard implementation of a driver agent that is bound to a single car and drives around with it on the given
osmRoute.
Inheritance
AbstractAgent
CarDriver
Assembly: SOHCarModel.dll
Syntax
public sealed class CarDriver : AbstractAgent, ICarSteeringCapable, ISteeringCapable, IPassengerCapable, IPositionable
Constructors
CarDriver(CarLayer, RegisterAgent, UnregisterAgent, Int32, Double, Double, Double, Double, ISpatialEdge, String, String)
Declaration
public CarDriver(CarLayer layer, RegisterAgent register, UnregisterAgent unregister, int driveMode, double startLat = null, double startLon = null, double destLat = null, double destLon = null, ISpatialEdge startingEdge = null, string osmRoute = "", string trafficCode = "german")
Parameters
Type |
Name |
Description |
CarLayer |
layer |
|
RegisterAgent |
register |
|
UnregisterAgent |
unregister |
|
System.Int32 |
driveMode |
|
System.Double |
startLat |
|
System.Double |
startLon |
|
System.Double |
destLat |
|
System.Double |
destLon |
|
ISpatialEdge |
startingEdge |
|
System.String |
osmRoute |
|
System.String |
trafficCode |
|
Properties
BrakingActivated
Declaration
public bool BrakingActivated { get; }
Property Value
Type |
Description |
System.Boolean |
|
Car
Declaration
public Car Car { get; set; }
Property Value
CurrentEdgeId
Declaration
public string CurrentEdgeId { get; }
Property Value
Type |
Description |
System.String |
|
CurrentlyCarDriving
Declaration
public bool CurrentlyCarDriving { get; }
Property Value
Type |
Description |
System.Boolean |
|
GoalReached
Declaration
public bool GoalReached { get; }
Property Value
Type |
Description |
System.Boolean |
|
Latitude
Declaration
public double Latitude { get; }
Property Value
Type |
Description |
System.Double |
|
Longitude
Declaration
public double Longitude { get; }
Property Value
Type |
Description |
System.Double |
|
MaxSpeed
Declaration
public double MaxSpeed { get; set; }
Property Value
Type |
Description |
System.Double |
|
NextTrafficLightPhase
Indicates the current light phase (red,green,yellow) of the next traffic light if available.
Declaration
public string NextTrafficLightPhase { get; }
Property Value
Type |
Description |
System.String |
|
OvertakingActivated
Declaration
public bool OvertakingActivated { get; set; }
Property Value
Type |
Description |
System.Boolean |
|
Position
Declaration
public Position Position { get; set; }
Property Value
Type |
Description |
Position |
|
PositionOnEdge
Declaration
public double PositionOnEdge { get; }
Property Value
Type |
Description |
System.Double |
|
RemainingDistanceOnEdge
Declaration
public double RemainingDistanceOnEdge { get; }
Property Value
Type |
Description |
System.Double |
|
RemainingRouteDistanceToGoal
Declaration
public double RemainingRouteDistanceToGoal { get; }
Property Value
Type |
Description |
System.Double |
|
Route
Declaration
public Route Route { get; }
Property Value
SpeedLimit
Declaration
public double SpeedLimit { get; }
Property Value
Type |
Description |
System.Double |
|
StableId
Declaration
public string StableId { get; set; }
Property Value
Type |
Description |
System.String |
|
TrafficCode
Get or sets the intersection behaviour model identified by code when no traffic signals are available
"german" = right before left rule
"southAfrica" = first in first out (FIFO) rule
Declaration
public string TrafficCode { get; set; }
Property Value
Type |
Description |
System.String |
|
Velocity
Declaration
public double Velocity { get; set; }
Property Value
Type |
Description |
System.Double |
|
VelocityInKm
Declaration
public double VelocityInKm { get; }
Property Value
Type |
Description |
System.Double |
|
Methods
Notify(PassengerMessage)
Declaration
public void Notify(PassengerMessage passengerMessage)
Parameters
Tick()
Declaration
public override void Tick()
Implements
IPositionable