How it decides
A short rule, and what it leaves out
Two trips and one traffic reading go in. One answer comes out. Everything you can poke at on this page runs the same released code, so the chart can't drift from the real thing.
Only the legs after the fork
Both trips begin the same way. Whatever that first stretch costs, it costs both of them, so it can't tip anything. The first version compared whole trips anyway, and the shared miles drowned out the part that mattered. Now it only looks past the fork.
The margin grows with congestion
Being faster isn't enough. Driving has to beat the train by a margin, and that margin widens as the road jams up.
required = floor × (1 + CONGESTION_MARGIN_SCALE × congestion)
Congestion runs from 0 (clear) to 1 (jammed end to end). Drag the floor slider and watch the line move. A morning that lands above it saved enough time to be worth the drive. On the line or under it, take the train. Ties go to transit.
With a 5 minute floor, a clear road needs driving to save 5 minutes and a fully jammed road needs 20.
Put a morning on the chart
What a warning can do
A crash, a closure, a game tonight, track work, a rail alert. Each one lowers confidence and adds a reason to what you hear. None of them gets a vote on the answer. That only changes if the logs ever show a signal really does predict a slower drive.
| Penalty | Taken off | When |
|---|---|---|
PENALTY_UNSTABLE_ROAD | 0.3 | A live crash or fresh closure is on the route ahead. |
PENALTY_UNKNOWN_CONGESTION | 0.2 | The congestion reading, the one signal that sets the margin, is missing. |
PENALTY_TRACK_WORK | 0.2 | Planned track work is affecting the train right now. |
PENALTY_CLOSE_CALL | 0.2 | The time saved is within 2 minutes of the margin required. |
PENALTY_RAIL_ALERT | 0.15 | A live rail alert is out on a line the trip uses. |
PENALTY_ROUTE_DISRUPTION | 0.1 | A planned road closure or a neighboring-state incident sits on the route. |
PENALTY_EVENING_EVENT | 0.1 | A scheduled event near the destination falls this evening. |
PENALTY_UNKNOWN_INCIDENTS | 0.1 | The live incident lookup was tried and failed. |
PENALTY_UNKNOWN_FEED | 0.1 | Another data feed was tried and failed. |
PENALTY_PER_DEGRADED_SIGNAL | 0.1 | An optional signal is switched off, per signal. |
Confidence starts at 1 and each penalty comes straight off the top. It bottoms out at 0.1, since an answer was still given. What you hear is a word instead of a number,high from 0.75, moderate from 0.5, and low from 0.
Unknown is not clear
A signal the rule could not read is null, never 0. Zero says the road is open. Null says nobody knows, and that costs confidence.
The road reads clear
congestion = 0
- Drive and train
- 30 and 40 minutes
- Answer
- Keep driving
- Confidence
- 1
Keep driving. Driving is 30 minutes, the train is 40 minutes. You would arrive at 8:45 AM. Driving saves 10 minutes, more than the 5 needed, the road ahead is clear. Confidence is high. Keep driving.
The road has no reading
congestion = null
- Drive and train
- 30 and 40 minutes
- Answer
- Keep driving
- Confidence
- 0.8
Keep driving. Driving is 30 minutes, the train is 40 minutes. You would arrive at 8:45 AM. Driving saves 10 minutes, more than the 5 needed, congestion on the road ahead is unknown. Confidence is high. Keep driving.
Same times. Same answer. The confidence drops by 0.2, though, and the spoken line admits it doesn't know the congestion rather than calling the road clear.
Anatomy of the sentence
You hear the answer once, at highway speed, so every sentence follows the same order. Here's one taken apart.
- The verdict
Take the train.
It goes first. If you catch nothing else, you catch this. - The times
The train is 35 minutes, driving is 30 minutes.
Both trips in whole minutes, with the recommended one first. - The arrival
You would arrive at 8:50 AM.
A clock time for the option it just recommended. - The reasons
Driving saves only 5 minutes, less than the 10 needed, the road ahead is slow, Capital One Arena game at 7:00 this evening.
Up to 3 of them. Whatever the decision rests on leads, and road trouble comes before caveats, so you hear about a crash before a missing feed. - The confidence
Confidence is high.
A word, because a decimal means nothing at seventy miles an hour. - The verdict again
Take the train.
Road noise eats half a sentence sometimes. Saying it twice means the answer still lands.
