* More conventional spelling of acronym identifiers
* `new` -> `new_state`
* Remove redundant field name
* Remove needless `collect`
* `to_controls` -> `make_controls`
* Simplify long if statement
* Fix module inception
* Simplify chained if let
* Return directly instead of creating a binding
* Disable clippy warning about `borrow` method
Implementing the `Borrow` trait instead would result in excessive type
annotations.
* Fix most remaining clippy warnings
* Allow clippy::type_complexity
* Fix bad merge from web editor
* Run cargo fmt
* Suppress large_enum_variant warnings
* Rename FYI state to ShowMessage
* Fix upper_case_acronyms warnings
Co-authored-by: Dustin Carlino <dabreegster@gmail.com>
The simulation analytics tracks problems per trip. The previous
measurements for delay at intersections is one case, and the new
cyclist-crossing-large-interection event is another. I removed the lane
speed measurement, since it's kind of redundant with the delay.
Consolidated the reporting in the trip info panel / drawn on the route.
The v1 path that all callers need is available by transforming PathV2 to
v1. The plan is to now gradually change callers to natively use PathV2
instead.
The lakeslice regressions were actually introduced over the last few
weeks as I scrambled to get elevation data working; it's not really
related to pathfinding v2. It's hard to blame individual changes for
making things here worse; the lakeslice map in particular has always
been super brittle. Emergent behavior means when things in one part of
the map slighly change, the ripple effects elsewhere can be harsh.
Originally #439 was motivated by a crash (in Ballard, I think), but
getting lakeslice to work so much better is worth reintroducing this.
When we find the bug again, we can solve it another way and do a better
job of watching for regressions in gridlock.
stop importing golf cart paths, even though they would be kind of
interesting to use for this proposal...
Interventions needed to keep lakeslice running, of course
Before: time starts when the vehicle reaches the front of the queue and
first requests their turn
After: time starts when the vehicle first becomes blocked on the queue
leading to the intersection.
Regenerate prebaked data.
scenarios, so we can run A/B tests with map edits. cyipt/actdev#114
To fix it up, I hand-timed
https://www.openstreetmap.org/node/2124133019, which could have smarter
heuristics as a button-operated half-signal in the future. And allowed
blocking-the-box on some small intersections near that area.
1) If a car is blocked by a conflicting turn and is part of a cycle,
wake up the car blocking it. In some cases, this wakes it up faster
and unsticks things. Otherwise, it just wastes a little bit of time.
2) If a car is part of a cycle, allow blocking-the-box.
3) Continue sorting people at a stop sign by the time they've been
waiting. But for cars "overflowing" their current lane, move them to
the front of this ordering. It unsticks one particular situation.
4) Fix wakeup_waiting entirely. Before, it was waking up protected turns
before permitted, but otherwise the ordering was arbitrary. Now actually
respect stop sign ordering. I expect this to improve many other
situations than the one I was checking.
This was all motivated by one particular roundabout in Poundbury. It
doesn't solve gridlock there, but it gets past a major blockage.
mark random people as highlighted when background traffic is active for
actdev. #539
This changes the unzoomed rendering to "fade out" unhighlighted people.
Next up, similar change for zoomed, info panels, and trip tables.
If starting an UT and blocked, remove the reservation, allowing others to proceed.
If awakened, and banned and reserved attempt to proceed through the intersection.
- Stop alerting when slow pedestrians can't make it through the minimum
crosswalk time
- Simpler iteration style in lagging_green.rs
- Totally delete the old brute force signal config code; it never worked
well, and the improved heuristics eliminate the need for it anyway
- Make a Duration::max function and use it in one case
Add a template for lagging green
Lagging green is variable. Crosswalks are also variable.
convert_to_ped_scramble() is refactored to allow a call that doesn't promote yield to protected; as this could unintentionally extend a variable phase.
* Skip all-walk if no demand
If you create an all-walk stage and make it adaptive, if there is no demand it will be skipped. Fixed crosswalks are never skipped, as they may be necessary for queue management.
reserved parking spots to avoid a leak and a later crash. #312
With this change, both montlake and lakeslice survive a full day of
traffic seitan making nefarious live edits...
Originally, the intention of the deleted calls was to not interrupt
Timer progress bars with warnings. But the output of things like the
importer is impossible to read anyway. Strongly considering explicitly
sending logs and timing info to separate places and using something like
multitail for live progress.
Unplumb timer from LOADS of places that just needed it for logging.
live map edits, when the followers will also be deleted soon. Previously
this was crashing. #312
traffic_seitan once again makes it through the full montlake scenario,
and crashes on lakeslice around 3am.
Also give living_streets in Krakow shoulders, so foot routing works
better there.
Now regenerate everything. Actually messes up routing for Trumpington;
71 cancelled trips up to 101. And have to intervene to keep lakeslice
not gridlocking, as usual.
geometry), don't generate crosswalks or stop signs. In reality, these
usually represent the middle of a complicatd intersection. Ideally these
cases would be merged into a single intersection, but before that's
feasible, at least improve some of the inferred things nearby. #457
This speeds up scenario instantiation (because picking a bus to use can
be spread out over time) and is a step towards simplifying the spawning
code. Starting downtown goes from 12.8s to 2.2s.
All vehicles spawning at a border now regress to using the 1st valid
lane, instead of random. Now that the choice is made when the trip
starts, this could later be improved to pick the least loaded lane.
Now regenerate everything.
widgetry, geom, and abstutil may wind up on crates.io in some form to
let other projects use widgetry. abstio has A/B Street-specific tricks
for reading data on native/web. Note widgetry still depends on abstio,
will figure out how to clean that up next.
If an intersection is short, and bike is spawned, another bike coming along will attempt to fit if force_entry is true. This results in a panic. To address this, if the reserved_length is >= the geom_len, false will be returned, even if forced_entry is true.
* Add a Variable phase
Variable provides a min duration, a delay duration, and an additional duration. The maximum cycle time is min + additional. Once min has been exhausted, if there is demand, the cycle is extended by delay until there isn't any demand or the additional duration has been consumed.
#295
saves lots of callers from cloning the request and separately plumbing
around the requested start/end distance. Also a step towards exposing
more granular distance crossed in a path for #392.
Still a few more places to simplify, but will do in a separate, smaller
change.
starting an uber-turn) the same as accepted turns, updating the
blocked-by graph and allowing a movement to start if a cycle is
detected.
No effect in montlake or lakeslice, and very slight progress at the
Krakow roundabout for #382 -- increasing a tiny 26 trips by 7:20 am.
1. Allow lane changing in an uber turn. Because of the way uber turns
work, we lock in and commit to all the lane changes just before
entering the uber turn.
2. Avoid overzealous lane changing by combining number-of-lanes-crossed
and numer-of-vehicles-in-lane into a single cost, rather than always
preferring the least number-of-vehicles-in-lane.
3. Don't lane-change unless the candidate lane's cost is strictly better
than the current lane cost.
optimizations avoided serializing Analytics and paths of to-be-created
agents, to reduce the file size. The logic to manage all of this isn't
worth the complexity anymore, because:
1) We don't queue up a bunch of spawn commands anymore; we defer
pathfinding until the last minute anyway.
2) We're not using savestates except for occasional manual debugging.
Previously, there was an idea to quickly preview prebaked traffic
mid-day. That idea was never fleshed out.
The schedule validation changes slightly. No-op trips between the same
origin/destination are now an error and get filtered out.
huge_seattle scenario goes from 129MB to 110MB with the redundant
endpoints removed.
TripEndpoints from TripLegs. #258
NOW regenerate scenarios. I'm confident this sweeping refactor didn't
break behavior, because prebaked data didn't budge. huge_seattle
scenario went from 147MB to 129MB. Not bad!
in favor of Option<TripEndpoint>. The bike/car contention tutorial stage
has to be tweaked manually, since there's no longer a nice way to spawn
vehicles at a non-border intersection and force them to use a certain
DirectedRoad. #258
remote trip goes between two locations off-map, specified just by a GPS
coordinate. The trips aren't simulated at all. They were originally
added to support Orestis's pandemic model, to handle transmission
off-map in shared buildings. This work has died off, there are no other
anticipated use cases for remote trips, and they complicate bigger
refactorings. #258
This also has the nice side effect of substantially reducing scenario
size -- huge_seattle from 177MB to 147MB. That unused metadata was
expensive!
biking_connection, which does a slow graph floodfill.
Prolet robot in Krakow: from 22.6s to 10.1s
Because Krakow now uses separate sidewalks and they're not properly
connected to the road graph yet, biking_connection has to search very
far. The speedup isn't noticeable in other cases.
struct. Whatever choices we make next about naming cities hierarchially
or not can be managed in just one place. #326
This is a pretty huge change, but the compiler gives reasonable
confidence it's correct. More bugs are likely to crop up in the next
step, when filenames start being namespaced by the city too.
order of vehicle deletion, we try to ask about stop sign and traffic
signal movements that may be deleted and would be irrelevant anyway if a
different deletion order happened. #312
We should really defer wakeup_waiting until after all cleanup is done,
but for now, willing to risk some stuckness at a stop sign...