C# Class TrafficManager.Traffic.SegmentEnd

显示文件 Open project: Katalyst6/CSL.TransitAddonMod Class Usage Examples

Public Properties

Property Type Description
Type PriorityType

Public Methods

Method Description
AddVehicle ( ushort vehicleId, VehiclePosition carPos ) : void
GetVehicleMetricGoingToSegment ( float minSpeed, ExtVehicleType vehicleTypes = null, ExtVehicleType separateVehicleTypes = ExtVehicleType.None, bool debug = false ) : uint>.Dictionary

Calculates for each segment the number of cars going to this segment. We use integer arithmetic for better performance.

HasVehicle ( ushort vehicleId ) : bool
RemoveAllCars ( ) : void
RemoveVehicle ( ushort vehicleId ) : bool
SegmentEnd ( ushort nodeId, ushort segmentId, PriorityType type ) : System

Private Methods

Method Description
GetVehicle ( ushort vehicleId ) : VehiclePosition
getApproachingVehicles ( ) : VehiclePosition>.Dictionary
getCars ( ) : VehiclePosition>.Dictionary
getNumApproachingVehicles ( ) : int
getNumCars ( ) : int

Method Details

AddVehicle() public method

public AddVehicle ( ushort vehicleId, VehiclePosition carPos ) : void
vehicleId ushort
carPos VehiclePosition
return void

GetVehicleMetricGoingToSegment() public method

Calculates for each segment the number of cars going to this segment. We use integer arithmetic for better performance.
public GetVehicleMetricGoingToSegment ( float minSpeed, ExtVehicleType vehicleTypes = null, ExtVehicleType separateVehicleTypes = ExtVehicleType.None, bool debug = false ) : uint>.Dictionary
minSpeed float
vehicleTypes ExtVehicleType
separateVehicleTypes ExtVehicleType
debug bool
return uint>.Dictionary

HasVehicle() public method

public HasVehicle ( ushort vehicleId ) : bool
vehicleId ushort
return bool

RemoveAllCars() public method

public RemoveAllCars ( ) : void
return void

RemoveVehicle() public method

public RemoveVehicle ( ushort vehicleId ) : bool
vehicleId ushort
return bool

SegmentEnd() public method

public SegmentEnd ( ushort nodeId, ushort segmentId, PriorityType type ) : System
nodeId ushort
segmentId ushort
type PriorityType
return System

Property Details

Type public_oe property

public PriorityType Type
return PriorityType