C# 클래스 TrafficManager.TrafficLight.TimedTrafficLightsStep

상속: ICloneable
파일 보기 프로젝트 열기: Katalyst6/CSL.TransitAddonMod 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
lastFlowWaitCalc uint
maxTime int
maxWait float
minFlow float
minTime int
segmentLights CustomSegmentLights>.Dictionary
startFrame uint
waitFlowBalance float

공개 메소드들

메소드 설명
Clone ( ) : object
GetLight ( ushort segmentId, ExtVehicleType vehicleType, int lightType ) : RoadBaseAI.TrafficLightState
MaxTimeRemaining ( ) : long

Countdown value for max. time

MinTimeRemaining ( ) : long

Countdown value for min. time

SetLights ( ) : void

Updates "real-world" traffic light states according to the timed scripts

SetLights ( bool noTransition ) : void
SetStepDone ( ) : void
Start ( ) : void

Starts the step.

StepDone ( bool updateValues ) : bool
TimedTrafficLightsStep ( TimedTrafficLights timedNode, int minTime, int maxTime, float waitFlowBalance, List groupNodeIds, bool makeRed = false ) : System
UpdateLights ( ) : void

Updates timed segment lights according to "real-world" traffic light states

calcWaitFlow ( float &wait, float &flow ) : bool

Calculates the current metrics for flowing and waiting vehicles

isValid ( ) : bool

비공개 메소드들

메소드 설명
ChangeLightMode ( ushort segmentId, ExtVehicleType vehicleType, CustomSegmentLight mode ) : void
addSegment ( ushort segmentId, bool makeRed ) : void

Adds a new segment to this step. After adding all steps the method `rebuildSegmentIds` must be called.

calcLightState ( RoadBaseAI previousState, RoadBaseAI currentState, RoadBaseAI nextState, bool atStartTransition, bool atEndTransition ) : RoadBaseAI.TrafficLightState
calcMaxSegmentLength ( ) : void
getCurrentFrame ( ) : uint
isEndTransitionDone ( ) : bool

Checks if the green-to-red (=yellow) phase is finished

isInEndTransition ( ) : bool

Checks if the green-to-red (=yellow) phase is currently active

isInStartTransition ( ) : bool

메소드 상세

Clone() 공개 메소드

public Clone ( ) : object
리턴 object

GetLight() 공개 메소드

public GetLight ( ushort segmentId, ExtVehicleType vehicleType, int lightType ) : RoadBaseAI.TrafficLightState
segmentId ushort
vehicleType ExtVehicleType
lightType int
리턴 RoadBaseAI.TrafficLightState

MaxTimeRemaining() 공개 메소드

Countdown value for max. time
public MaxTimeRemaining ( ) : long
리턴 long

MinTimeRemaining() 공개 메소드

Countdown value for min. time
public MinTimeRemaining ( ) : long
리턴 long

SetLights() 공개 메소드

Updates "real-world" traffic light states according to the timed scripts
public SetLights ( ) : void
리턴 void

SetLights() 공개 메소드

public SetLights ( bool noTransition ) : void
noTransition bool
리턴 void

SetStepDone() 공개 메소드

public SetStepDone ( ) : void
리턴 void

Start() 공개 메소드

Starts the step.
public Start ( ) : void
리턴 void

StepDone() 공개 메소드

public StepDone ( bool updateValues ) : bool
updateValues bool
리턴 bool

TimedTrafficLightsStep() 공개 메소드

public TimedTrafficLightsStep ( TimedTrafficLights timedNode, int minTime, int maxTime, float waitFlowBalance, List groupNodeIds, bool makeRed = false ) : System
timedNode TimedTrafficLights
minTime int
maxTime int
waitFlowBalance float
groupNodeIds List
makeRed bool
리턴 System

UpdateLights() 공개 메소드

Updates timed segment lights according to "real-world" traffic light states
public UpdateLights ( ) : void
리턴 void

calcWaitFlow() 공개 메소드

Calculates the current metrics for flowing and waiting vehicles
public calcWaitFlow ( float &wait, float &flow ) : bool
wait float
flow float
리턴 bool

isValid() 공개 메소드

public isValid ( ) : bool
리턴 bool

프로퍼티 상세

lastFlowWaitCalc 공개적으로 프로퍼티

public uint lastFlowWaitCalc
리턴 uint

maxTime 공개적으로 프로퍼티

The number of time units this traffic light remains in the current state at most
public int maxTime
리턴 int

maxWait 공개적으로 프로퍼티

maximum mean "number of cars waiting for green" / "average segment length"
public float maxWait
리턴 float

minFlow 공개적으로 프로퍼티

minimum mean "number of cars passing through" / "average segment length"
public float minFlow
리턴 float

minTime 공개적으로 프로퍼티

The number of time units this traffic light remains in the current state at least
public int minTime
리턴 int

segmentLights 공개적으로 프로퍼티

public Dictionary segmentLights
리턴 CustomSegmentLights>.Dictionary

startFrame 공개적으로 프로퍼티

public uint startFrame
리턴 uint

waitFlowBalance 공개적으로 프로퍼티

public float waitFlowBalance
리턴 float