five-on-it / packages/ai/src/traffic-drive / DRIVE
Variable: DRIVE
constDRIVE:object
Defined in: packages/ai/src/traffic-drive.ts:81
The numbers of driving in traffic.
Type Declaration
accel
readonlyaccel:2.5=2.5
The acceleration a driver pulls away with at most (m/s²; the Intelligent Driver Model's a)…
ahead
readonlyahead:140=140
Route planned ahead of the lane the car is on (m)…
amberDecel
readonlyamberDecel:3.5=3.5
An amber light is run when stopping for it needs more than this (m/s²); decided once, and kept.
arrive
readonlyarrive:14=14
It arrives at a junction without a light this near its line, or within its braking distance at arriveDecel and 2 m (m, m/s²).
arriveDecel
readonlyarriveDecel:2.5=2.5
atStop
readonlyatStop:0.8=0.8
A stop this near (m) with the car this slow (m/s) is a car at its stop: the handbrake holds it.
bendFloor
readonlybendFloor:1=1
bendLag
readonlybendLag:0.25=0.25
A bend's plan aims this long before its point (s; the foot's lag) and treats the last metres as this many (m).
blockedTicks
readonlyblockedTicks:1200=1200
Ticks behind something that never moves before it is stuck, or (scared) bails out.
busClear
readonlybusClear:20=20
A bus's stop keeps this far from a junction's line and its box's exit (m).
busDoor
readonlybusDoor:3=3
…and the bus stops with its front this far past it, its front door by the queue (m)…
busDwell
readonlybusDwell: readonly [240,420]
Ticks a bus waits at its stop, at least and at most.
busEase
readonlybusEase:10=10
busEvery
readonlybusEvery: readonly [140,280]
…and each next one (m).
busFirst
readonlybusFirst: readonly [40,140]
A new bus's first stop this far on, at least and at most (m)…
busKerb
readonlybusKerb:0.8=0.8
busOvershoot
readonlybusOvershoot:2=2
…a stop it has run this far past still the one it stops at (m).
busPull
readonlybusPull:30=30
Within this of its stop (m) a bus in the rightmost lane steers this much closer to the kerb (m), eased in over this many metres, never nearer the kerb than this (m).
corridor
readonlycorridor:0.4=0.4
Clearance beside the car within which something counts as in front (m).
creep
readonlycreep:2=2
decel
readonlydecel:4=4
The comfortable braking (m/s²; the model's b): what a queue and a stop line are approached at…
decelMax
readonlydecelMax:8=8
…and the emergency reserve, never exceeded by the driver (a crash is the physics').
flipTicks
readonlyflipTicks:60=60
flipUp
readonlyflipUp:0.3=0.3
Its roof's up axis below this for so many ticks is a flipped car.
freeExponent
readonlyfreeExponent:4=4
The exponent of the free acceleration's approach to the free speed (the model's δ).
gridlockTicks
readonlygridlockTicks:1200=1200
Ticks held at a junction's line by the others (giving way, a box it could not leave) before it is stuck: a gridlock.
jamTicks
readonlyjamTicks:180=180
Ticks stopped in a box behind another car before it creeps on regardless, at this speed (m/s).
jerk
readonlyjerk:8=8
How fast the commanded acceleration may change (m/s³): a driver's foot, and in an emergency.
jerkEmergency
readonlyjerkEmergency:40=40
kerbClear
readonlykerbClear:0.3=0.3
lateral
readonlylateral:6=6
Lateral acceleration allowed in the bend being steered (m/s²).
longAccelShare
readonlylongAccelShare:0.6=0.6
…a bus or a truck (isLong) at this share of it…
longHalf
readonlylongHalf:3.5=3.5
A vehicle longer than twice this (m) keeps straight on at a junction where a way out lines up within this cosine.
lookAxles
readonlylookAxles:1.2=1.2
…and never nearer than this many axle distances (a bus's wheel turns less for the same point: it never swerves at a kerb).
lookMax
readonlylookMax:18=18
lookMin
readonlylookMin:4=4
lookShare
readonlylookShare:0.5=0.5
The pursuit point: this share of the speed ahead (m per m/s), within these bounds (m)…
lostOff
readonlylostOff:10=10
Farther than this off its route (m) for so many ticks is a lost car.
lostTicks
readonlylostTicks:120=120
minGap
readonlyminGap:2.5=2.5
The gap kept to the car in front: so many metres plus so many seconds of speed.
modeShare
readonlymodeShare:0.2=0.2
The interaction (as a share of the acceleration) from which what holds the speed names the mode.
panicAccel
readonlypanicAccel:4.5=4.5
…and a scared driver (m/s²).
panicBlocked
readonlypanicBlocked:90=90
panicDecel
readonlypanicDecel:6=6
…a scared driver's…
panicShare
readonlypanicShare:1.4=1.4
panicTop
readonlypanicTop:0.95=0.95
…nor, scared, beyond this share of it, at this share of the road's limit.
passAhead
readonlypassAhead:25=25
passBehind
readonlypassBehind:10=10
…from this far behind to this far ahead of the car (m).
passTicks
readonlypassTicks:90=90
Ticks held behind something that never moves before it moves over to the lane beside, when it is clear…
patience
readonlypatience:600=600
Ticks it waits at such a junction before it goes anyway.
planDecel
readonlyplanDecel:3=3
The braking planned for a bend or a stop (m/s²): a point's braking is blended in by the square of its share of it, exact beyond it.
replanAhead
readonlyreplanAhead:70=70
…and planned again once less than this is left (m).
reverseAccel
readonlyreverseAccel:2=2
reverseSpeed
readonlyreverseSpeed:2.5=2.5
Backing out of a stall: this fast (m/s) at this acceleration (m/s²).
reverseTicks
readonlyreverseTicks:60=60
roadTop
readonlyroadTop:0.85=0.85
Cruising never beyond this share of the class's top speed…
rollBackStop
readonlyrollBackStop:0.3=0.3
A car rolling backwards unasked brakes to a stop within this long (s).
senseMax
readonlysenseMax:60=60
senseMin
readonlysenseMin:20=20
How far ahead it looks for something to brake for: at least, seconds of speed, at most (m, s, m).
senseTime
readonlysenseTime:3=3
stallSpeed
readonlystallSpeed:0.5=0.5
Slower than this while asking for speed is stalled (m/s), after so many ticks; it reverses for so many.
stallsToGiveUp
readonlystallsToGiveUp:3=3
So many stalls within so many ticks and it is stuck.
stallTicks
readonlystallTicks:120=120
stallWindow
readonlystallWindow:1200=1200
stopHeadway
readonlystopHeadway:0.4=0.4
A stop line (a red, a junction given way at, a bus stop) is a standing car queued behind at this time headway instead (s).
stopMargin
readonlystopMargin:0.4=0.4
Stopped this far short of a stop line (m).
stopped
readonlystopped:0.5=0.5
stopReach
readonlystopReach:9=9
A bus stop this far from a bus's route at most is on it (m)…
stopsAhead
readonlystopsAhead:80=80
Stops and bends looked at ahead (m).
straightCos
readonlystraightCos:0.88=0.88
timeGap
readonlytimeGap:0.9=0.9
vanDwell
readonlyvanDwell: readonly [1200,2100]
Ticks an ice-cream van stands at the kerb serving, at least and at most.
wetSlowing
readonlywetSlowing:0.12=0.12
On a road soaked through the drivers cruise this share slower (GAME_DESIGN §5.7).