Commit Graph

5278 Commits

Author SHA1 Message Date
Dustin Carlino
6cce3b1946 Make z-order changes work on web too, restoring tooltips 2020-10-05 19:50:52 -07:00
Dustin Carlino
982b0bc194 Support opening new browser tabs on web. The webbrowser crate claims it's experimental, but works fine for me, and the impl is pretty much what I'd try anyway. 2020-10-05 19:50:52 -07:00
Dustin Carlino
bb6dbb0731 Switch from stdweb to websys for #21.
When I added web support in February, it was easier to get started with
stdweb, since it has the nice cargo web tool. However, stdweb is
unmaintained, winit is deprecating support for it, and the next steps
for web (downloading maps dynamically) have better support for web-sys.

With Alvin's guidance, I got
https://github.com/dabreegster/minimal_websys_winit_glow_demo working
first. This PR cuts A/B Street over too.

I tested abst and the widgetry demo in both native and web. The only
major regression from stdweb is the canvas placement and size. I
attempted some fixes, but at this point, I'll leave it as a smaller
followup instead.
2020-10-05 19:50:52 -07:00
Michael Kirk
14cbb0f0c1
update panels and their scrollbars when window resizes (#358)
* match unfork to fork

TBH I don't know of problem currently being caused by this, but it
seemed wrong to unfork without a matching fork.

* variable rename (no behavior change)

"c" was holdover from when panels were called composites

* resize container dims when window resizes

* make panel.top_level private

* Show/Hide scrollbars as window is resized

* alignment demo

* Fix scrollbar positioning

* separate out scrollbar work so we can profile it easier

* mem::replace is more concise than mem::swap

* fixup size of MaxPercent

* restore scroll position after redrawing scroll bars
2020-10-05 17:46:50 -07:00
Dustin Carlino
ac342445ed Cleanup: Use roxmltree instead of quick-xml to parse kml 2020-10-05 16:25:11 -07:00
Dustin Carlino
5706226790 Also lift list_all_objects. Now the native/web IO stuff has a smaller surface area, making it easier to add more web support for #21. 2020-10-05 15:03:49 -07:00
Dustin Carlino
e5365254e9 Make load_all_objects IO-backend (native/web) agnostic 2020-10-05 14:48:34 -07:00
Dustin Carlino
e973d1e5a1 Organize abstutil io into a native and web crate 2020-10-05 14:16:29 -07:00
Dustin Carlino
dd252d45e2 Remove the long unusued abstutil Profiler (originally for measuring cumulatively how long part of an inner loop takes) 2020-10-05 12:23:26 -07:00
Dustin Carlino
67268f5461 Organize abstutil a little better. Split out modules for generating the data/ paths and for working with serde. 2020-10-05 12:20:52 -07:00
Dustin Carlino
178404bd0e Remove unused RNG stuff from abstutil, and start to think about how to tease it apart a bit 2020-10-05 11:48:29 -07:00
Dustin Carlino
a5cf5877e6 Experiment with focusing on negative space 2020-10-05 10:13:28 -07:00
Dustin Carlino
8e49aac42f Make traffic seitan close roads that agents are about to use, causing a
crash. And start to figure out the debugging story.
2020-10-05 08:49:16 -07:00
Dustin Carlino
5b84ac897c new release 2020-10-04 15:34:54 -07:00
Dustin Carlino
50de6b191f prep for new release [rebuild] 2020-10-04 14:58:44 -07:00
Dustin Carlino
fa45590041 Tag E 24th as narrow and assign it narrower width. This still doesn't
quite fix the wacky geometry at Madison/24th, but it gets closer.

Also redo two outdated traffic signals, speeding up lakeslice more.
2020-10-03 18:17:35 -07:00
Dustin Carlino
50e8a94946 Use an absolute color scale for throughput, instead of the weird ranked thing. If a few roads have a ridiculously high throughput compared to others, we actually care about those outliers. And don't show counts in the legend after all; it just climbs over the whole day, and confusingly mixes roads/intersections, which're actually colored independently. 2020-10-03 16:44:36 -07:00
Dustin Carlino
98d26d8979 Refactor calls to calculate_current_selection 2020-10-03 16:37:56 -07:00
Dustin Carlino
acaf7eb587 Split compare throughput into separate State 2020-10-03 16:13:58 -07:00
Dustin Carlino
5354d1ba2b Show counts in throughput layer tooltips 2020-10-03 16:04:58 -07:00
Dustin Carlino
b7818a52be Capture the reason for cancelled trips, for #312 2020-10-03 15:35:29 -07:00
Dustin Carlino
9ccbf40dba Merge the concept of cancelled and aborted trips, in preparation for storing the reason for cancellation, for #312 2020-10-03 10:41:53 -07:00
Dustin Carlino
ffdedcb0a7 When multiple source lanes can turn left* to multiple destination lanes,
only allow the leftmost source lane to turn to any destination lane. As
a future improvment, need to handle multiple explicitly tagged left turn
lanes, but this gets closer to reality, particularly helping some crazy
maneuvers along Mercer in downtown.

*or right

Also had to update lanes along Madison and fiddle a bit to keep
lakeslice running. Spotted some major traffic signal bottlenecks due to
stage generation falling back, will iterate on that separately.
2020-10-03 09:40:15 -07:00
Dustin Carlino
533fca1f61 Upgrade winit and glutin [rebuild] 2020-10-02 21:31:56 -07:00
Dustin Carlino
cfa203a4d3 Add an API call to dump all traffic signals' current state 2020-10-02 21:03:29 -07:00
Dustin Carlino
5aee85f19d Allow colorschemes to optionally color zoomed-in lanes based on OSM road rank. Most schemes don't do this, but one needs to, and maintaining a separate git branch has become annoying.
Should have no behavioral change to existing color schemes.
2020-10-02 08:06:35 -07:00
Dustin Carlino
f73d9da080 Conjure Traffic Seitan, a tool to make byzantine live map edits, to cause chaos and flush out bugs... 2020-10-01 18:24:35 -07:00
Dustin Carlino
afa27e0903 Just adjusting dark colorscheme 2020-10-01 16:36:00 -07:00
Dustin Carlino
ac5aa927db Test turn generation via goldenfiles instead. Revert the "import from a
raw string" stuff from the previous commit.

Add tests of a few interesting intersections. The results right now
aren't ideal, but this sets things up for fast iteraton.
2020-10-01 15:34:43 -07:00
Dustin Carlino
f951b296f7 Cap all roads in the Python experiment. Right now, this'll unintentionally merge adjacent zones with the same cap into zones. 2020-10-01 15:13:18 -07:00
Dustin Carlino
c2ef091fb4 Try some greyscale color schemes, from Mapbox 2020-10-01 13:49:03 -07:00
Dustin Carlino
fd460a2f43 Fix blackholed buildings with --infinite_parking. Before, they were just
skipped outright. Now they redirect to a reasonably close building that
isn't blackholed. #329

(For context, https://dabreegster.github.io/abstreet/map/index.html#connectivity
explains "blackhole")

I'm increasingly convinced I made the wrong decision to split the
normal/infinite parking implementation. It's low-priority, but I'll try
consolidating them later.
2020-10-01 11:57:30 -07:00
Dustin Carlino
ec114e51e1 Prototype an idea for unit testing the turn generation code. Hardcode a
simple .osm, turn it into a full Map, and inspect the results.
2020-09-30 16:30:28 -07:00
Dustin Carlino
68b8276879 Start a doc brainstorming the platformification of map_model. Very
tentative ideas from recent conversations with different groups
2020-09-30 15:15:49 -07:00
Dustin Carlino
778b33bd55 Confirm export of roads to shared-row with a popup 2020-09-30 12:40:36 -07:00
Dustin Carlino
2b87736dd4 Pull in fresh OSM, with fixed turn lanes near the notorious Madison / Lake Wash Blvd. NOW it runs without gridlock again! 2020-09-30 10:30:01 -07:00
Dustin Carlino
e8d6525c59 Trim out unrealistic left and right turns. Find cases where multiple
lanes all lead to a single lane via left/right turn, and just keep the
left/rightmost lane.

Sanity checked at Rainier / S Massachusetts, and 23rd / S Massachusetts.
2020-09-30 10:30:01 -07:00
Dustin Carlino
f6614f02a6 Fix the caching for the wasm build [rebuild] 2020-09-30 10:02:02 -07:00
Dustin Carlino
2775a7a05d Start building WASM target, to make sure it doesn't build-break again
[rebuild]
2020-09-30 09:49:05 -07:00
Dustin Carlino
c36f8026f0 Remove the old per-lane delay layer in favor of the new per-agent one 2020-09-30 09:19:24 -07:00
Dustin Carlino
fd212b474c Get wasm running again; cargo web was hitting
https://github.com/koute/cargo-web/issues/217. After adding some
debugging to that tool, discovered the problem was generic-array, pulled
in by the new geo version. Forcing that to the older version fixes
things.
2020-09-29 23:34:10 -07:00
Dustin Carlino
2c63a485cc Undo some uses of impl trait. Originally added for performance in a big
refactor, they complicate the function signatures significantly and have
no observable perf impact, since all of the methods just happen in map
importing.
2020-09-29 15:53:08 -07:00
Dustin Carlino
a64fe01c3a Actually, absolute scale for the debug destinations tool makes more sense than ranked 2020-09-29 15:30:24 -07:00
Dustin Carlino
49f4d3e3dc
Add a tool to see where people blocked on a traffic signal are trying to go (#354) 2020-09-29 15:22:05 -07:00
Dustin Carlino
9ca7ea6cc2 Improve the experiment to draw area names by fixing z-ordering. But
leave disabled; sizing is still way off.
2020-09-29 14:51:07 -07:00
Dustin Carlino
de4f5c7768
Add a layer to color unzoomed agents based on their current delay, to help debug gridlock. Something like this used to exist as a first-class way to change unzoomed color schemes, but until we have more ideas about showing agent intent on the minimap, just implementing this as a separate layer. (#353) 2020-09-29 11:51:37 -07:00
Dustin Carlino
4e4e11b404 A few documentation adjustments after
5de05a6fe3
2020-09-29 09:21:36 -07:00
Dustin Carlino
e7e3a30a25 Fix crash on Windows when minimizing window 2020-09-28 19:23:54 -07:00
Dustin Carlino
823297b71e See unzoomed routes for trips better. #331 2020-09-28 18:26:41 -07:00
Michael Kirk
27b25a71a5
doc typos (#352) 2020-09-28 17:17:22 -07:00