Commit Graph

58 Commits

Author SHA1 Message Date
Dustin Carlino
bac81d25b8 Fix standard app buttons from LTN impact tool that weren't wired up 2022-02-04 10:00:26 +00:00
Dustin Carlino
487e1ba870 Move traffic counting code into synthpop. In the short-term, I want to quickly check a generated demand model against sensor data. Eventually some kind of calibration may live in this crate. Regardless, counts aren't just a UI concept. 2022-02-02 14:24:02 +00:00
Dustin Carlino
7509d0fa11 Don't draw border intersection outlines when they're filtered 2022-02-02 10:03:50 +00:00
Dustin Carlino
a7ded378e1 Apply the auto-LTN heuristics to the whole map with one click 2022-02-02 10:01:36 +00:00
Dustin Carlino
d6dc9de221 Add a mode to show quietness / rat runs for all neighborhoods at once 2022-02-02 09:51:01 +00:00
Dustin Carlino
635f508540 At really low zoom levels, draw modal filters using the scale-invariant
circles. Otherwise they're just impossible to see. Since they're the
most important thing to show in the LTN tool, seems worth it.

This helps proceed on #851
2022-02-02 09:20:10 +00:00
Dustin Carlino
428451478c Conveniently open OSM objects from LTN tool. #851 2022-02-01 14:58:03 +00:00
Dustin Carlino
e3bdc086ac Add road search tool to per-neighborhood states. #848 2022-02-01 10:27:45 +00:00
Dustin Carlino
e0b6e94f26 In the LTN browse and connectivity tool, draw the areas after the map
background and water/parks, but before everything else. It's much easier
to understand the actual basemap this way -- you can see roads clearly.
2022-02-01 09:31:28 +00:00
Dustin Carlino
060decbdd3 Put a minimal UI around saving/loading LTN proposals 2022-01-31 13:30:55 +00:00
Dustin Carlino
f8dfe32c04 Save LTN edits to files and load from CLI. No proper UI yet, and the
format isn't future-proof at all.
2022-01-31 13:30:55 +00:00
Dustin Carlino
942c3ecdaf Make SimpleApps all manage their own CLI parsing, so they can add their own overrides. 2022-01-31 13:30:55 +00:00
Dustin Carlino
638e93c36a Stop re-exporting stuff from synthpop in sim 2022-01-28 13:13:43 +00:00
Dustin Carlino
6c2a581be5 Simplify traffic count code -- directly deal in Counters 2022-01-28 10:40:56 +00:00
Dustin Carlino
fefe8f5be2 Swap the traffic counts in the UI 2022-01-27 15:21:21 +00:00
Dustin Carlino
e542011614 More fluid UI for comparing traffic counts -- hotkeys
Had to change the API of on_click...
2022-01-27 15:13:24 +00:00
Dustin Carlino
e21c57b70a When calculating traffic volumes, deduplicate path requests first.
Around 2x less paths to calculate.

Even though the deduplication throws away some info, the net effect for
measuring traffic volumes is practically equivalent, so it's a
worthwhile optimization. Used the new comparison UI to verify that!
2022-01-27 14:26:36 +00:00
Dustin Carlino
edfd320908 A new generic UI to compare counts from two files.
Also moving some of the counts stuff to map_gui, accordingly
2022-01-27 14:26:36 +00:00
Dustin Carlino
c33ba85cfe Make LTN impact prediction use the new common code 2022-01-27 14:26:36 +00:00
Dustin Carlino
a6b4f8879a Refactor parts of the LTN impact prediction into a separate UI just for
comparing count data.

Don't use it yet
2022-01-27 14:26:36 +00:00
Dustin Carlino
ee8c8d8611 Simplify impact results plumbing 2022-01-27 09:44:13 +00:00
Dustin Carlino
be57975a91 Start to shape the LTN impact tool into something more general to plug a
demand model into routing and compare throughput before/after some
change.

Add in a bunch of filters for trips. (Most even work!)
2022-01-26 14:17:24 +00:00
Dustin Carlino
5dfb8f26f0 Refactor ColorNetwork to use ToggleZoomed 2022-01-26 11:31:33 +00:00
Dustin Carlino
ec0fd1b94d Stop running out of video memory in the LTN impact prediction tool.
- One batch for all neighborhoods
- One batch for all roads/intersections
- No pre-built tooltips

This all comes at more repetitive code. Need to make World generate some
stuff dynamically (#763)
2022-01-26 11:26:03 +00:00
Dustin Carlino
0203de046d Don't repeatedly try to merge blocks in the select boundary UI. An optimization to workaround new sanity checks introduced for #841 2022-01-26 10:15:31 +00:00
Dustin Carlino
dfbd9785f3 While merging adjacent perimeters for the LTN tool, don't proceed if
intermediate results can't be turned into a polygon. It'll break
something later. #841

There's a particular bug where a perimeter can be turned into a polygon,
but after collapsing internal dead-ends, it can't.

If we don't do this, the LTN select boundary UI crashes, and reasoning
about block -> neighborhood mappings gets very hairy. I'd like to
address all the root causes of failing to make a polygon, but until
then...

TRADE-OFF: it _really_ slows down the select boundary UI.
2022-01-25 18:12:15 +00:00
Dustin Carlino
2683f32d28 Clarify an error message 2022-01-24 15:42:14 +00:00
Dustin Carlino
7bb8c13270 At last, support splitting neighborhoods while selecting boundaries!!! 2022-01-24 15:33:34 +00:00
Dustin Carlino
e7aeaf39de Remove confusing and redundant state in the select boundary UI. 2022-01-24 15:13:15 +00:00
Dustin Carlino
246d3347ca Don't use a special color for the current neighborhood in the select boundary UI. The red outline accomplishes the same thing, and it's less confusing to jump colors from the browse screen 2022-01-24 13:26:48 +00:00
Dustin Carlino
f777d0ba10 Shift logic from the select boundary UI to the partitioning structure.
That was the original intention, but it wound up being easier to
prototype otherwise.

Should be no behavioral changes.
2022-01-24 13:13:05 +00:00
Dustin Carlino
2c089cf1a3 Refactor select boundary logic, carefully 2022-01-24 10:15:27 +00:00
Dustin Carlino
3b6391f18d Create new neighborhoods when we remove a block from an edge.
It works! But with uncomfortably duplicated code
2022-01-24 09:41:31 +00:00
Dustin Carlino
f91f70f5d4 Improve boundary selection. When removing a block, search the whole
perimeter for another neighborhood to donate to, before concluding we're
near the map boundary.
2022-01-24 09:26:56 +00:00
Dustin Carlino
33332bd12f Be careful with relative count math, avoiding one crash. [rebuild] [release]
But also, just disable the analysis for the release. It eats through all
my GPU memory on larger maps.
2022-01-23 09:37:45 +00:00
Dustin Carlino
b6b69aa886 Be smarter with LTN impact prediction memory usage.
... but this doesn't actually fix the mysterious crash in Camden and
other maps?!
2022-01-23 09:37:45 +00:00
Dustin Carlino
bc97ed2d3a Prototyping Andy's idea for a dataviz to compare traffic counts
before/after. Road width is based on the baseline count, color is based
on the relative difference.

Lots of work needed, but this is probably a good way forward
2022-01-23 09:37:45 +00:00
Dustin Carlino
7a9ad22fd7 Just split impact module, since it's growing so much 2022-01-23 09:37:45 +00:00
Dustin Carlino
e36337a91f Use an enum for a more clear API to handle caching temporary
pathfinders. Should be no behavior changes yet
2022-01-23 09:37:45 +00:00
Dustin Carlino
1a05da2824 Change how pathfinding works when avoiding modal filters.
Before, it was just a large 3 hour penalty for crossing a filter -- so
it shouldn't happen, but it was possible, and so some (but not all!) LTN
code had an extra paranoia step to filter out paths that crossed.

Now, actually make it impossible at the pathfinding layer.

Also, fix colors in the LTN pathfinding tool that were backwards
2022-01-23 09:37:45 +00:00
Dustin Carlino
d2ace68366 Don't recalculate counts before LTN changes 2022-01-23 09:37:45 +00:00
Dustin Carlino
e2d32e15a4 Reset LTN state when switching maps, much more carefully 2022-01-23 09:37:45 +00:00
Dustin Carlino
fc2817670a Recalculate LTN impact when something changes; don't make the user figure it out 2022-01-23 09:37:45 +00:00
Dustin Carlino
ba02ead72b Also predict what intersections become more/less busy due to LTNs
... by blindly copying code
2022-01-23 09:37:45 +00:00
Dustin Carlino
3d8b7ca965 Still show LTN neighborhood 2022-01-23 09:37:45 +00:00
Dustin Carlino
e0965db22b Switch LTN impact to World 2022-01-23 09:37:45 +00:00
Dustin Carlino
e33c6996d6 Add the LTN impact heatmap showing both better/worse 2022-01-23 09:37:45 +00:00
Dustin Carlino
c6e26e5e20 Flesh out the LTN impact tool -- calculate impact after, add tooltips 2022-01-23 09:37:45 +00:00
Dustin Carlino
fc705318a9 Start a simple prediction of how vehicle traffic will be affected by an LTN scheme, based on a travel demand model. Super similar to Ungap's equivalent. 2022-01-23 09:37:45 +00:00
Dustin Carlino
0367a7238c Handle LTN geojson export in the web version too 2022-01-22 17:22:17 +00:00