Commit Graph

2885 Commits

Author SHA1 Message Date
Dustin Carlino
ecd69e48a9 Refine the rat run algorithm: don't look for paths between different cells. That forces weird U-turns, using cul-de-sacs, using the perimeter road, etc 2021-12-29 10:28:53 +00:00
Dustin Carlino
451a4f1a5d Warn when a cell is totally cut off with too many filters 2021-12-29 10:11:25 +00:00
Dustin Carlino
352b97828a Track where cells touch the neighborhood boundary 2021-12-29 10:01:39 +00:00
Marcel Dejean
cfe248fdab Include contraflow turns in get_turns_for, get_turns_from_lane,
Change get_next_turns_and_lanes (unused) to not take intersection, then fix uses of get_turns_from for sidewalks to use it

Add get_next_turns_and_lanes_for and use for floodfill
2021-12-20 23:11:36 +00:00
Marcel Dejean
65f086ecb3 PathStep::ContraflowTurn to allow walking turns both ways
* Also implement ContraflowMovement for pathfinder v2
* Change uses of Turn to Turn | ContraflowTurn
* Reverse contraflowturn geometry when tracing pathstep
* Don't start or end a path in a ContraflowTurn either
2021-12-20 23:11:36 +00:00
Dustin Carlino
fd852795c2 Make the rat-run detector respect modal filters.
Overall results still not right, but getting closer. Some "rat-runs"
retained will only be in the neighborhood out of "necessity" -- they
should maybe be totally filtered out for the heatmap counts.
2021-12-19 12:27:33 +00:00
Dustin Carlino
83bf6953d1 Rank each street inside a neighborhood as quiet/busy, based on the number of rat-runs through it.
Show this through a heatmap and tooltips
2021-12-19 12:06:42 +00:00
Dustin Carlino
5542632d61 Take a third stab at finding rat runs in a neighborhood. This new
definition finds all entrances and exits to a neighborhood, grouped by
the name of the perimeter road they connect to. Then the shortest
driving path between every pair is found, and the results are sorted to
emphasize paths that spend most of the time inside the neighborhood.

This new version doesn't crash and seems to produce reasonable results
everywhere I've looked.

It doesn't yet pay attention to the modal filters people have created,
or summarize which roads are likely to be quiet or not.
2021-12-19 11:24:11 +00:00
Dustin Carlino
904ba3c249 Don't even allow selecting intersections that aren't 4-way, since no diagonal filters can be manipulated there. 2021-12-19 10:28:50 +00:00
Dustin Carlino
f0a1110d04 Draw planters when zoomed in. Icon by Trang 2021-12-17 13:31:49 +00:00
Dustin Carlino
eb4060b071 Improve LTN tool rendering when zoomed in. Outlines around selected
objects are less thick and opaque, to cover up less of the road.
2021-12-17 11:37:54 +00:00
Dustin Carlino
4e79d19765 Revert "When calculating LTN cells, don't cross bike-only roads."
This reverts commit 02420f920e.

Did not mean to push this yet, sorry!
2021-12-16 14:02:41 +00:00
Dustin Carlino
02420f920e When calculating LTN cells, don't cross bike-only roads. 2021-12-16 14:02:21 +00:00
Dustin Carlino
e77ce12537 Draw custom LTN boundaries, by painting blocks. #794
Still need to think through the UX of how to manage custom boundaries
and incorporate them in the "browse neighborhoods" screen.
2021-12-14 10:33:42 -08:00
Dustin Carlino
611ca97a28 Conveniently jump from the main apps to the RawMap editor, to debug geometry more fluidly 2021-12-11 11:24:37 +00:00
Dustin Carlino
ec9ed9c64c Import a small slice of Kennington with a very representative set of London-specific map model issues. Add it to the screenshot tests, replacing Great Kneighton as the GB test. And trim out lakeslice from the test; we don't need quite so much redundancy for Seattle. 2021-12-09 14:31:20 +00:00
Dustin Carlino
56a42f9f21 Fix crash in ungap's route sketcher. If you drag intermediate waypoints
such that the path is impossible, don't move the waypoint.
2021-12-07 15:25:46 +00:00
Dustin Carlino
fc674df9ac Cleaning up the map_model transit representation a bit. #372 2021-12-07 03:10:38 -08:00
Dustin Carlino
6e11c386ac Mechanical refactor: bus {stop, route} -> transit. #372
(Mostly renaming map_model code everywhere, not yet sim layer and above)
2021-12-07 03:10:38 -08:00
Dustin Carlino
7eba7a10cf Update map URL in the LTN tool. #766
It's increasingly lucrative to try refactoring this.
2021-12-05 14:13:57 +00:00
Dustin Carlino
8318bbf5d2 Fix clippy warnings. [rebuild] [release] 2021-12-05 12:29:35 +00:00
Dustin Carlino
815ae47e02 Model diagonal LTN filters. #794 [rebuild] [release]
Only supported at 4-way intersections currently.
2021-11-21 12:55:50 -08:00
Dustin Carlino
8e7d54f135 Add some explanation to the LTN route tool 2021-11-21 11:54:29 -08:00
Dustin Carlino
41dfabe28f Clean up from past few days:
- upload the GTFS files now being imported
- disable the half-started area-based traffic spawner
2021-11-21 10:58:00 -08:00
Andrew Wei
65f187f250
Adding main road penalty to ltn (#810) 2021-11-20 15:28:59 -08:00
Dustin Carlino
3d228861b2 Prototype a tool to spawn traffic between two areas. One intended use is
to manually sketch traffic patterns that try to cut through LTNs.

Just get the UI selection stuff going for now
2021-11-20 12:26:42 -08:00
Dustin Carlino
42e6efd962 Place modal filters where you click on a road, not arbitrarily in the middle. (Written with Andrew pair programming during Hack to Give Thanks) 2021-11-20 11:18:38 -08:00
Dustin Carlino
27894c02cb Road labels don't need to be shown zoomed-in for LTN 2021-11-17 08:00:58 -08:00
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