Commit Graph

1417 Commits

Author SHA1 Message Date
Dustin Carlino
20de91bae7 Also refactor walking speeds. #82 2021-04-01 15:03:20 -07:00
Dustin Carlino
892afddcd5 Refactor uses of biking speed between the sim and pathfinding, in preparation for incorporating incline. #82
(This was a bigger mess than I expected, so worth doing separately.)
2021-04-01 11:52:25 -07:00
Dustin Carlino
3c601b50c1 Clean up the trip table rectangular selection UI: #574
- explicit clear/apply buttons
- show start/end filters on the trip table preview
2021-03-31 16:35:56 -07:00
Dustin Carlino
0e86b94408 Make the start/end rectangular filter actually apply to the trip tables. #574 2021-03-31 16:35:56 -07:00
Dustin Carlino
afb962f73b Use the start/end markers in the interactive trip spawner. 2021-03-31 13:44:19 -07:00
Dustin Carlino
90e2e4f249 Grab fresh Seattle OSM to fix the entrance to Broadmoor for #537. Also
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
2021-03-20 14:26:48 -07:00
Dustin Carlino
e071b39553 Add a button to save scenarios to a file if they're generated. This is useful for avoiding the performance hit of regenerating them again. 2021-03-17 10:02:52 -07:00
Dustin Carlino
95b1d884cf Rename Map::new to be more clear that it should only be used in non-UI
tools. There's one place in the UI that doesn't work on the web!
2021-03-12 06:38:17 -08:00
Dustin Carlino
f254bb53cc Measure intersection delay more intuitively. #549
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.
2021-03-10 16:38:35 -08:00
Dustin Carlino
bf8f51ae05 Consistently count hours for a time. There was some disagreement between
recorded analytics and code that later summed things up, making the
relative throughput layer more confusing than it is already. #85
2021-03-10 13:59:38 -08:00
Dustin Carlino
957d08e8b9 Add tooltips to the relative throughput layer, to get exact before/after counts of the data being displayed. #85
(The before counts are still bucketed on the hour mark)
2021-03-10 13:24:56 -08:00
Dustin Carlino
d13478f355 Make Poundbury run more smoothly, and prebake sim data for all
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.
2021-03-09 10:45:44 -08:00
Dustin Carlino
7170efbdba Improve some gridlock cases near roundabouts particularly. #114, #75
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.
2021-03-08 17:47:01 -08:00
Dustin Carlino
f260fc3b40 Fix warping to bikes by ID 2021-03-08 14:42:51 -08:00
Dustin Carlino
9118ae6216 Hook up the actdev UI to the new scenarios with background traffic mixed in. #556 2021-03-05 16:37:06 -08:00
Dustin Carlino
14ccddf15e Create people that live or work (or both) off-map. #556 2021-03-05 15:50:56 -08:00
Dustin Carlino
9dc181a7c5 Start to detect cases when one vehicle may want to over-take a slower-moving leader. #81 2021-03-03 14:07:32 -08:00
Dustin Carlino
0c12948c86 Also grey out unhighlighted people when zoomed in. #539 2021-03-02 12:03:26 -08:00
Dustin Carlino
17e2f485b4 Add support for highlighting certain people in the simulation. For now,
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.
2021-03-02 10:46:21 -08:00
Dustin Carlino
378122a329 Specify trip purpose when importing external scenario data. 2021-02-25 11:00:43 -08:00
Michael Kirk
2ed55f40a1 cargo fmt 2021-02-23 07:24:48 -08:00
Dustin Carlino
c87940a858 Fix an issue with a6dfc95aa9: districts in a city are ordered in a z-order friendly way 2021-02-16 14:52:47 -08:00
Bruce
e6e3fc844a
Improve Uberturns (#518)
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.
2021-02-16 13:32:59 -08:00
Dustin Carlino
3685f7b18a
Cache the list of nearby intersections to wake up for uber-turns. #497 (#513)
This shouldn't have any behavioral change.
2021-02-12 22:12:46 -08:00
Dustin Carlino
03538faf3f
A few traffic signal cleanups: (#512)
- 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
2021-02-12 15:10:32 -08:00
Bruce
121377467a
Lagging green (#510)
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.
2021-02-11 13:21:26 -08:00
Dustin Carlino
fc213d1d38 Optionally skip importing external trips that don't match an endpoint, for the Grid2Demand integration. 2021-02-06 14:59:45 -08:00
Bruce
1704d93050
When a turn completes, wake up intersections in a cluster (#505)
#497
2021-02-06 13:33:17 -08:00
Dustin Carlino
d62b5e9e0c
Slightly randomize where people decide to look for parking. #498 (#501) 2021-02-04 18:42:32 -08:00
Dustin Carlino
73e405e382 Upgrade most dependencies 2021-02-03 18:13:06 -08:00
Dustin Carlino
2bbc43b529 Avoid crashing when we try to draw a vehicle that's literally just
spawned at a border and hasn't advanced at all.
2021-02-01 18:18:46 -08:00
Dustin Carlino
8a856d6608 Include transit riders in /data/get-agent-positions. #392 2021-02-01 12:27:55 -08:00
Dustin Carlino
ba5ea18101 Filter throughput layer by mode. #456 2021-02-01 11:02:10 -08:00
Dustin Carlino
3e40686a6b Fix a bunch of links after the repository renaming. 2021-01-31 15:50:48 -08:00
Bruce
cf5ce637f3
Skip all-walk if no demand (#442)
* 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.
2021-01-27 11:13:19 -08:00
Dustin Carlino
f69335edf0 Let individual maps override the street parking length. #457
Now regenerate all map data, because the schema changed. Also had to
revert part of the last commit to unbreak transit route snapping in
Berlin.
2021-01-25 12:36:49 -08:00
Dustin Carlino
f393cc923b Mark vehicles waiting off-map to spawn at a border as active, so that they get a trip ID assigned in the API. 2021-01-23 19:42:54 -08:00
Dustin Carlino
6cb951f545 Grab fresh Cambridge data again; geofabrik hadn't picked up all of the
changes when I downloaded it. #449

And a small parking fix to better investigate a live edit crash.
2021-01-23 19:24:31 -08:00
Dustin Carlino
e55079fcab When we nuke cars while live editing, sometimes we need to clean up
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...
2021-01-23 19:05:53 -08:00
Dustin Carlino
c9c6f240ae Remove timer.{note, warn, error} in favor of the log crate. #262
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.
2021-01-21 19:22:02 -08:00
Dustin Carlino
7797d17ff0 When cancelling a driving trip, sometimes we need to delete the parked car from the origin if the person hasn't actually left yet. #312 2021-01-21 12:33:15 -08:00
Dustin Carlino
fa30a7ee78 Deleting cars was actually leaking queue.reserved_length. Undo the
previous commit and fix the root problem properly. #312
2021-01-21 12:25:39 -08:00
Dustin Carlino
3efdb1962a For live map edits, don't crash if we can't figure out who somebody is
blocked by. There's a possible leak of reserved_length used for
uber-turns, but not sure. #312
2021-01-21 10:04:56 -08:00
Dustin Carlino
bccf389058 Don't attempt to wake up follower agents behind agents deleted during
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.
2021-01-19 16:56:25 -08:00
Dustin Carlino
e4bf32a145 Handle deleting cars live from the middle of uber-turns. #312 2021-01-19 15:43:01 -08:00
Dustin Carlino
4c6d7af76d Bring in linear pedestrian highways as cycleways+shoulders. #458
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.
2021-01-16 17:03:13 -08:00
Dustin Carlino
0a353f67f8 When importing external scenario data for cyipt/actdev#32, snap border endpoints based on the allowed modes of each border. Without this, some driving trips snap to the cycleway next to a road.
212 cancelled trips (that immediately failed) down to 140.
2021-01-15 21:45:42 -08:00
Dustin Carlino
48a60c965b For extremely short roads (under 2 meters after calculating intersection
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
2021-01-15 15:32:01 -08:00
Dustin Carlino
3143b57b19 When importing external scenario data, snap points outside the map boundary to the nearest border.
Now the desire lines for cyipt/actdev#32 import without errors.
2021-01-14 17:32:44 -08:00
Dustin Carlino
ff598f21a3 Add a new layer to star buildings. Autosave it. While trying out changes
for #446 in the UI, I kept losing track of the two buildings I'm
focusing on. A player-defined list of shortcuts seems generally helpful.
2021-01-12 19:22:50 -08:00