City Based Parking and Routing System API Documentation

Vehicle Members

Vehicle overview

Public Static Properties

BrakeProbability Gets or sets the random braking probability.
CriticalZone Gets or sets the critical zone start position.
LeftToRightProbability Get or sets the probability that a vehicle will automatically change from left to right.
PreCriticalZone Gets or sets the precritical zone starting position.
vOffset Gets or sets the v Offset that determine the flow on the passing lane.

Protected Static Fields

cCarLenght The length of the Car in cells.
cCarMaxSpeed The maximum speed in cells this car is able to travel.
cCriticalZoneStart Start of the critical zone, vehicles within this zone must change lanes if theirs is not the correct one.
cPreCriticalZoneStart Start of the pre-critical zone, vehicle in this zone may only change lanes if their is correct for the turn they need to make.
sPBrake The probability that a driver will slow his car down more than is needed.
sPl2r Probability of a left to right change.
sRandom Randomizer for the Nagel-Schrekenberg algorithm.
sVOff Offset variable that allows one to control the flow and density on the passing lane.

Public Instance Constructors

Vehicle Constructor Constructor

Public Instance Properties

Behind Gets the position directly behind the vehicle.
Color Gets the vehicle color
Id Gets the id of the vehicle.
IsBraking Gets a boolean indicating if the car is braking.
Lane The Lane the vehicle is currently driving on.
Length Gets the length of the vehicle in cells.
MaxSpeed The maximum speed at which this car can travel.
MustChangeLanes Gets or sets a boolean that indicates that the vehicle must change lanes to reach its destination.
Position The cell the vehicle is currently occupying on the Lane.
Route Gets or sets the route the vehicle is currently following.
Speed The speed at which the vehicle is currently traveling.
TurnIndicator Gets the current status of the turn signal of the vehicle

Public Instance Methods

BackwardGap Calculates the backward gap between the current and the specified vehicle.
ChangeLanes Determines if a car want to change to left or right lane.
ChangeTo Executes the actual lane changing procedure. lane change.
ChangeToLeft Attempts a lane change from current lane to the lane on the left.
ChangeToRight Attempts a lane change from current lane to the lane on the right.
CriticalZoneChange Allows vehicles to change lanes that have entered the critical zone.
Equals (inherited from Object)Determines whether the specified Object is equal to the current Object.
ForwardGap Calculates the forward gap between the current and specified vehicle.
GetHashCode (inherited from Object)Serves as a hash function for a particular type. GetHashCode is suitable for use in hashing algorithms and data structures like a hash table.
GetType (inherited from Object)Gets the Type of the current instance.
IntializeRoute Initialize the current route for the vehicle depending on the algorithm used.
Move Moves the current vehicle to a new position.
PreCriticalZoneChange Allows the vehicle to change lanes before entering the critical zone.
Reset Resets the vehicle to is post constructor state.
ResolveLaneChangeDeadLock Resolves a deadlock situation where two vehicles want to change to each others lane and are stopped in the critical zone.
ToString (inherited from Object)Returns a String that represents the current Object.
UpdateRoute Updates the vehicles routing information.

Protected Instance Fields

_Braking Indicates if the vehicle is braking.
_Id The Id number of the vehicle
_Lane The Lane on which the vechicle is currently driving.
_MustChange Boolean indicating that the vehicle must change lanes before proceeding (Deadlock) detection.
_Position The position the vehicle is currently at.
_Route The Route the vehicle is currently following.
_Speed The speed (in cells) at which the vehicle is currently moving.
_TailLight The taillight status of the vehicle.

Protected Instance Methods

Finalize (inherited from Object)Allows an Object to attempt to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection.
MemberwiseClone (inherited from Object)Creates a shallow copy of the current Object.
MoveVehicle Moves The vehicle towards forward on the current lane.
SetTailLight Sets the taillight of the vehicle based on the route.

See Also

Vehicle Class | CBPRS.Infrastructure Namespace