Commit Graph

2907 Commits

Author SHA1 Message Date
Dustin Carlino
7d6b720099 Add a search button to the LTN tool, because I really don't know my London street names yet 2021-11-16 15:13:12 -08:00
Dustin Carlino
81af262511 Fix the query params, update to the 0.3 link after all 2021-11-14 17:47:37 -08:00
Dustin Carlino
29fbf74c2d Show two LTN routes, to show effects of the new filters 2021-11-11 14:42:31 -08:00
Dustin Carlino
08223efed5 Whoops, forgot to not leak all the RAMs 2021-11-11 14:10:42 -08:00
Dustin Carlino
006839aec2 Make the LTN router actually avoid modal filters.
Accomplishing this through RoutingParams, rather than actually editing
the map. I don't want to commit to a map model representation of modal
filters and actually edit the map until we think through diagonal
filters. This effectively revives pathfind_avoiding_roads from the old
congestion capping experiment, but organized better.
2021-11-11 14:03:11 -08:00
Dustin Carlino
69ca5d60a4 Draw the neighborhood and modal filters in the 2 sub-states (rat runs, route tool). Not going to expose all the controls from the main view yet, until we understand the UX workflow a bit more. 2021-11-11 13:47:34 -08:00
Dustin Carlino
cf81200991 Refactoring the game crate's initial setup, to make special modes more explicit. #745 2021-11-11 13:23:42 -08:00
Dustin Carlino
0f76109ebf Convert game from CmdArgs to structopt in a brute-force way. #745 2021-11-11 12:58:57 -08:00
Dustin Carlino
2f18e4badc Remove broken code for Leaflet-named screenshots. #440
Gave up on Leaflet in favor of Mapbox GL, and the math was always wrong
here anyway.
2021-11-11 09:02:29 -08:00
Dustin Carlino
5888536aef Start a tool to route through or around an LTN. Just the skeleton reused
from Ungap the Map...
2021-11-10 12:00:59 -08:00
Dustin Carlino
684f9cc4cc A road with a modal filter belongs partially to two cells 2021-11-10 11:14:47 -08:00
Dustin Carlino
e999cd70af More explicitly store the position of a modal filter. This is a
precursor to fine-tuning that position and also to making roads with
filters belong to two cells, not become their own.
2021-11-09 11:47:29 -08:00
Dustin Carlino
c9d3c29a66 Working on rat runs:
- use movements, not turns
- adjust cost for entry/exit (but the costs still seem incorrect)
- fix the infinite loop in the floodfill
2021-11-09 11:26:58 -08:00
Dustin Carlino
cb3693bd7a Refactor: DirectedRoadID.road, not .id 2021-11-09 10:48:39 -08:00
Dustin Carlino
3903f3b564 Refactor vehicle_cost to include zone_cost, like the docs say it does 2021-11-09 10:34:50 -08:00
Dustin Carlino
57b40701a8 Working on rat-run detection:
- split the algorithm / UI module
- start and end the path just outside the neighborhood
2021-11-09 10:29:00 -08:00
Dustin Carlino
c76d0b9070 Round of clippy (and reverting a temporary bit that broke challenge modes) [rebuild] [release] 2021-11-07 12:04:55 -08:00
Dustin Carlino
98d1f2cd9f Prototype rat-run detection again. Not working yet, so leaving disabled. #794 2021-11-07 12:02:16 -08:00
Dustin Carlino
c0200bd3d7 Draw traffic cells as areas, using a simple grid diffusion. #794 2021-11-07 10:21:26 -08:00
Dustin Carlino
6b766ea750 Don't erase modal filters when switching neighborhoods 2021-11-06 15:58:28 -07:00
Dustin Carlino
7e07bac35a Make all of the secondary menu screens follow the style of the new title screen. Simplify things like the strange challenge picker UI by using the section styling. 2021-11-06 10:33:11 -07:00
Dustin Carlino
f751b7d54b Removing the pregame color scheme 2021-11-06 10:33:11 -07:00
Dustin Carlino
2fbc950da5 Switch to a consolidated title screen that switches between all the
apps. #780
2021-11-06 10:33:11 -07:00
Marcel Dejean
826acac086
structopt changed underscore options to hyphen (#798) 2021-11-05 07:27:34 -07:00
Dustin Carlino
a329915ef6 Start over with the LTN tool. #794
- Use the new blockfinder to initially classify neighborhoods
- Calculate cells within a neighborhood, and update them based on road
  filters
- For the moment, remove the tool that shows example rat runs
2021-11-04 17:28:51 -07:00
Dustin Carlino
2c08d62318 Track interior roads as we merge perimeters. It's much easier to retain this as we build it up, instead of later figuring out which side of a perimeter is the inside or outside. 2021-11-03 13:38:38 -07:00
Dustin Carlino
1c748cf304 Clump neighborhoods just by road rank. Bike-only pieces are usually an existing modal filter. So they're expected to be somewhere in the interior of a neighborhood. 2021-11-02 19:48:18 -07:00
Dustin Carlino
401d5fe297 Make it even easier to debug block order 2021-11-02 16:31:29 -07:00
Dustin Carlino
f4e0b4b1e3 Log warnings to explain why merging blocks fails 2021-11-02 13:42:25 -07:00
Dustin Carlino
478e6f28c4 Fix a silly bug with assigned block coloring getting lost 2021-11-02 12:21:32 -07:00
Dustin Carlino
2917361417 More aggressive block merging 2021-11-01 17:09:50 -07:00
Dustin Carlino
cfec9a2049 Avoid block merge crashes! But some neighborhoods don't get fully
merged.

Also make all the blockfinding algorithms deterministic, for easier
debugging.
2021-11-01 16:56:42 -07:00
Dustin Carlino
108f6a6fc2 Refactor blockfinding APIs to prep for actually merging everything in a
single neighborhood.
2021-11-01 15:49:56 -07:00
Dustin Carlino
a996b891ab Improve the algorithm for merging adjacent blocks. It now handles
internal dead-ends and blocks that share a sequence of common roads.

Still not robust enough, but huge step forwards.
2021-11-01 14:37:49 -07:00
Dustin Carlino
00df96f173
Render A/B Street's lanes and traffic simulation on top of Mapbox GL (#788)
[rebuild] [release]
2021-10-31 13:52:58 -07:00
Dustin Carlino
1eb7ec7ddf Detect perimeters hitting map boundaries upfront. This lets us more
easily work with perimeters and only transform to blocks when we need to
last minute. As a happy side effect, it vastly speeds up blockfinding --
the slowdown was attempting to mangle geometry for the huge broken
perimeters near boundaries!

Also improve the incremental merge debug UI
2021-10-29 16:43:35 -07:00
Dustin Carlino
d44fa4eb03 Use the road labels in the LTN tool too. Focus on one neighborhood's
roads.
2021-10-29 12:48:09 -07:00
Dustin Carlino
32fc46831b Draw arrows to show entrances/exits to a LTN.
(and rename Line::reverse for consistency with PolyLine)
2021-10-29 12:25:30 -07:00
Dustin Carlino
e62a41d45b Color adjacent blocks differently 2021-10-28 15:10:50 -07:00
Dustin Carlino
5e5e411de8
Detect neighborhoods with the new block abstraction (#793) 2021-10-28 10:11:57 -07:00
Dustin Carlino
f6e4c9b08e
Concave hull, you're drunk, go home (#792)
Add map_model Blocks and RoadLoops
2021-10-27 13:19:13 -07:00
Dustin Carlino
2ee2b991f4 Convert other non-UI things from CmdArgs to structopt. #745
structopt is forcing some hacks, but oh well.

There are some docs to update in the other repo, will get to that
soon...
2021-10-26 12:02:40 -07:00
Dustin Carlino
cf3d00f234 Fix the --diff map feature, broken by 57584a61b9 2021-10-25 13:51:01 -07:00
Dustin Carlino
007cf0b28d Split the importer into individual commands with structopt. #745 2021-10-25 13:02:00 -07:00
Dustin Carlino
57584a61b9
For Ungap's route mode, add a button to toggle back and forth between (#783)
the original and edited map. This is an easy way to evaluate how a
proposal influences a particular route.
2021-10-24 12:32:08 -07:00
Dustin Carlino
cce8c6c078 Remove the warning about out-of-date versions after 2 weeks. I'm gradually ending the promise of weekly releases. 2021-10-24 12:28:58 -07:00
Dustin Carlino
a75f874dbf Always load map edits permissively -- if there are broken commands, just
skip them.

This partly works around a bug loading remote edits from r/seattlebike.
The workaround isn't great, because the edits there are uncompressed --
there are multiple commands modifying the same road. The workaround will
ignore all but the first version.
2021-10-22 10:29:00 -07:00
Dustin Carlino
9f86365cf6 Upgrade to rust 1.56 and cutover to rust edition 2021 2021-10-21 09:38:06 -07:00
Dustin Carlino
49b2e6778d
Consolidate Ungap editing experience in the appropriate mode (#785)
Move proposal management from explore to edit pane

Co-authored-by: Michael Kirk <michael.code@endoftheworl.de>

Co-authored-by: Michael Kirk <michael.code@endoftheworl.de>
2021-10-20 12:39:42 -07:00
Dustin Carlino
002b41816d Actually, generalize UnzoomedLines to handle circles too. Make the route sketcher nicer to use at all zoom levels! 2021-10-18 17:54:58 -07:00
Dustin Carlino
749a7384c1 Make the route sketcher tool use UnzoomedLines, making it much easier to see the route on large maps.
Note the draggable waypoint circles are still a fixed size; you can't
easily manipulate the route when unzoomed far.
2021-10-18 17:54:58 -07:00
Dustin Carlino
b5cca3f18c Refactor a helper to draw unzoomed thick lines at a constant width.
To start, just make the bike network use this.
2021-10-18 17:54:58 -07:00
Dustin Carlino
a643c35014 Long overdue round of clippy 2021-10-18 13:52:10 -07:00
Dustin Carlino
a85915f647 Refine high_stress_for_bikes to take direction into account. Northbound bike lanes on Roosevelt don't really matter when going southbound.
Regenerate all maps, since this maybe affects edge weights.

And try some ideas for understanding why files change.
2021-10-18 13:41:31 -07:00
Dustin Carlino
981b421bd9 Consistently use imperial units for the barrier dropdown. Bug spotted by Tobias! 2021-10-14 10:59:34 -07:00
Michael Kirk
41060572c0 Space tab header/content more cohesively 2021-10-12 11:35:00 -07:00
Michael Kirk
871cbf7ecf Only enable controls when they do something 2021-10-12 10:21:12 -07:00
Dustin Carlino
3493c834af Be a little more clear in the quick sketch tool that we shouldn't expand road width 2021-10-12 09:24:00 -07:00
Dustin Carlino
8e1f34995b Make maybe_add_bike_lanes not create duplicate lanes when editing a road that already has them! 2021-10-12 09:17:43 -07:00
Dustin Carlino
876eff87dd Recalculate pathfinding at the right time, now that changing to the trip page can immediately trigger pathfinding 2021-10-12 09:05:28 -07:00
Dustin Carlino
d050c885c8 Brand the bike tool -- ungap the map, after all!
And print big numbers consistently for mode shift
2021-10-11 20:44:22 -07:00
Michael Kirk
56323116e1 Don't show details widget until 2+ waypoints
Otherwise there's no route, also this helps focus on the "add waypoint"
instructions.
2021-10-11 19:42:03 -07:00
Michael Kirk
f1f895eab2 Remember "current trip" when switching tabs 2021-10-11 19:42:03 -07:00
Michael Kirk
56c5bf31bd autosave trips 2021-10-11 19:42:03 -07:00
Dustin Carlino
5f83f5b46b Include my own Seattle bike network vision as a built-in proposal. #743
To avoid needing 3 copies of the proposal for different splits of the
map, make loading edits "permissive" (filtering out unknown roads) when
loading from proposals.
2021-10-11 17:34:14 -07:00
Michael Kirk
5e592447b7 organize trip controls vs. route controls
The file mgmt and waypoints are part of the "trip"

The toggles and details are part of the route. I considered combining
the toggle section into the "route details" section but... decided
against it to delineate "input" from "output". I could be persuaded to
keep iterating on this...
2021-10-11 16:03:05 -07:00
Michael Kirk
738c4ab865 clean up set_hovering tooltip style 2021-10-11 16:03:05 -07:00
Michael Kirk
8fd63f00db what goes up must come down
Showing both the change in climb and then change in descent is
redundant, since they'll always be equal given the same start/end.
2021-10-11 16:03:05 -07:00
Dustin Carlino
915b902c9a
Warn the user before doing expensive mode shift calculations. #448 (#774) 2021-10-11 15:10:28 -07:00
Dustin Carlino
112848f23b
Some quick last UX fixes to the bike tool: #743 (#773)
- after adding lanes, stay on the quick sketch page
- be clear people are uploading proposals in the public domain
- link to docs about mode shift
2021-10-11 15:06:34 -07:00
Michael Kirk
476f19142f
Consistent panel width (#772)
* reorder tabs: plan trip before adding lanes

This order of tasks should be more logical for most people.

* Copy tweaks

"trip" is better than "route" since you don't pick the route, only the
start/end points. The route is inferred based on the available roads.

* Smaller elevation plot

it was much wider than any other UI element, meaning the column
dramatically jumps sizes when switching to this tab.

* better align line-plot x-axis

* Avoid jittering UI while switching through tabs.

* fixup! Avoid jittering UI while switching through tabs.

* fixup! Copy tweaks

* fixup! reorder tabs: plan trip before adding lanes

* fixup! Copy tweaks
2021-10-11 15:02:41 -07:00
Dustin Carlino
be9ba5a80e Clean up the absurd number of Seattle maps. Ideally we'd have some way
to further organize them by purpose, but for the moment, two problems:

1) the city picker UI is getting way too crowded
2) on native, the initial download is up to 145MB

Removing:

- the 3 Aurora maps and Green Lake, added for the ARC workshop, but no
  longer the most active of collaborations
- Ballard is now subsumed by central Seattle -- the only advantage would
  be keeping its full scenario of walking and transit trips, but the
  simulation is horribly gridlocked there anyway
- the Rainier Valley map, originally meant for an SNG traffic light
  timing study
- the larger udistrict map
2021-10-11 14:37:59 -07:00
Dustin Carlino
da195f07dd Prevent crash in quick sketch, when there's only one waypoint set and the user drags it. #743 2021-10-11 12:08:18 -07:00
Dustin Carlino
f011461d6c
Change the styling for edited bike network roads -- just use bright c… (#771)
Change the styling for edited bike network roads -- just use bright cyan, not a texture on top of the different greens. Change route colors to not conflict with the cyan changed lanes. Adjust route waypoint colors too.
2021-10-09 12:31:35 -07:00
Dustin Carlino
5f75656cc3 Exclude light rail from steep streets layer 2021-10-08 14:31:52 -07:00
Dustin Carlino
a85ec6cccd Nest DrawLanes within DrawRoads. This is a followup to #747, motivated
by squeezing some start-up performance of huge maps. #746

Shaving at least 1 second off quadtree initialization in huge_seattle
from this, no noticeable effects otherwise.
2021-10-08 08:34:02 -07:00
Dustin Carlino
99876d245f Add the new proposal sharing feature to A/B Street's edit mode too! #765 2021-10-07 11:08:09 -07:00
Dustin Carlino
031cc0fe9d Make the quick sketch handle divided one-ways more reasonably. #743
Previously, the undirected graph search would switch sides sporadically.
Now it sticks to one side.

Now we probably just need an option to also include the other direction,
to avoid having to sketch over Aurora twice.
2021-10-06 14:14:59 -07:00
Dustin Carlino
4c2165f5cb Whoops, didn't actually include the reset button promised by previous commit. #743 2021-10-06 12:47:09 -07:00
Dustin Carlino
2936804f8f Make the quick sketch UI less clunky. #743
Let the map be panned even when we're snapped to an intersection.
Previously it's super obnoxious to start drawing a route in a huge map.
Also I'd love to switch to the new World API and stop with this ad-hoc
logic, but slightly confused about how to do that here...

Also add a reset button, otherwise I just switch tabs to force a reset,
which is silly.
2021-10-06 12:37:06 -07:00
Dustin Carlino
ca96be7c08 Fix spinners in mode shift tool. Always use feet, so the step size doesn't render in a silly way. #448 2021-10-06 12:04:28 -07:00
Dustin Carlino
d791f0dd48 Simplify routing preferences -- just checkboxes for avoiding hills or stress.#743 2021-10-06 10:26:21 -07:00
Dustin Carlino
2550f60c8b Simplify mode shift tool. Max biking time and elevation are the interesting knobs to turn. Biking distance is pretty related to biking time. And driving time is irrelevant for people considering a switch. #448
Also adjust initial elevation gain max from 30 to 100 feet
2021-10-06 09:47:24 -07:00
Dustin Carlino
28a4fb6fd2 Cutover to the prod proposal API, now that it's working! 2021-10-05 15:07:41 -07:00
Dustin Carlino
309db511c2 Record timing while applying map edits. Even in release mode, this is a long inexplicable pause for large-scale bike network changes. A loading screen is better. 2021-10-05 11:35:37 -07:00
Dustin Carlino
76b0ef2159 Change the share feature to live on a dedicated panel, with more disclaimers and ways to copy the URL. #765 2021-10-05 09:09:33 -07:00
Dustin Carlino
ea0440b6b2 Import fresh Seattle OSM, with the new Northgate station and bridge!
lakeslice gridlocks, because a traffic signal marked on a footway near
23rd and Judkins gets assigned to an alleyway. Worth fixing later.

And wallingford crashes the sim; I think more lane-changing bugs
exposed. It's kind of freeing to not worry about maintaining the
simulation right now...
2021-10-04 18:35:42 -07:00
Dustin Carlino
9f708354d8 Revive the feature to share proposals in the bike network tool. #765
Explicitly mark the edits as remote in the URL, and refresh the URL +
panel after sharing.
2021-10-04 15:16:28 -07:00
Dustin Carlino
eb9c4df3f2 Add a button to export throughput data to CSV 2021-10-04 08:09:00 -07:00
Dustin Carlino
066bdf0b8a Convert the collisions viewer to World. #763 2021-10-03 20:59:33 -07:00
Dustin Carlino
ddbadd2da3 Make waypoints and routes coexist in the same World. #763 [rebuild] [release]
The pattern is somewhat similar to how different components share a
Panel. The "outer-most" piece owns the World, calls into InputWaypoints
to fill out the World, and plumbs un-handled events to it.

Also handle a tricky low-level bug with ctx.normal_left_click() and
detecting drags vs clicks.

Now finally there's no buggy conflicts between dragging waypoints and
hovering on the alternate routes!
2021-10-03 14:28:44 -07:00
Dustin Carlino
41465c341b Convert the new bike routing tool to use World. #763
This one is the most complicated, and it's still not done, but it's not
any buggier than the ad-hoc implementation. I still need to figure out
how to merge the two worlds of waypoints and routes.

This one also required a large, but mechanical, refactor to lift
ToggleZoomed and the concept of unzoomed/zoomed from map_gui to
widgetry.
2021-10-03 14:28:44 -07:00
Dustin Carlino
43f8a6d1e7 Convert the signal demand dashboard to World. #763 2021-10-03 14:28:44 -07:00
Dustin Carlino
5a37e223c0 Cut over the story map tool to the brave new World. #763
Figure out how to make objects both clickable and draggable!
2021-10-03 14:28:44 -07:00
Dustin Carlino
8524cfce12 Create a new map-space World abstraction, and change the polygon editor to use it. #763 2021-10-03 14:28:44 -07:00
Dustin Carlino
e17e48a764 Adjust LTN modal filter placement near the perimeter roads 2021-10-02 10:24:24 -07:00
Dustin Carlino
2288b0d42a Add a smaller study area in Tehran.
- Procedurally generate houses there, so the automatic travel demand
  model doesn't produce totally silly patterns.
- Disable parking
- Allow vehicles to enter the intersection even when it looks like they
  might get stuck; this lets the default scenario complete without
  gridlock.
- Prebake the scenario, so a researcher can make edits and use all of
  the A/B testing data viz.

The home-to-work scenario produces laughably bogus patterns... everyone
working at Bank Sepah.
2021-09-30 14:51:56 -07:00
Dustin Carlino
5d93671ae3 Allow editing service roads that're bus-only. User reported an example in Tehran 2021-09-30 13:55:55 -07:00
Dustin Carlino
4ddfe66afd Finally clean up txt.with_bg. The last few uses were actually illegible from the default color! 2021-09-29 13:34:46 -07:00
Dustin Carlino
2905ca605d Cache the Dijkstra pathfinder for custom RoutingParams. This dramatically speeds up the bike network routing tool, since it's now restricted to just a few params. #743 2021-09-29 11:38:18 -07:00