Commit Graph

5095 Commits

Author SHA1 Message Date
Dustin Carlino
69c8ce4cbe Before the .wasm loads, display "Loading" 2020-10-07 23:02:10 -07:00
Dustin Carlino
79e313da24 When crashing, dump edits to a file instead of STDOUT. They take too much space and sometimes overflow the terminal's buffer. 2020-10-07 15:53:27 -07:00
Dustin Carlino
2c3fd09378 Add an example Python tool that works with the JSON map export. Support
specifying trip endpoints by building or intersection when importing
traffic demand data.
2020-10-07 15:37:59 -07:00
Dustin Carlino
536429f37f Fix lakeslice again. Some manually fixed traffic signals weren't
imported, because they referenced way IDs from before the service road
import. That happened after a bad Cargo.lock merge undid the effects of
pinning to the latest seattle_traffic_signals.
2020-10-07 15:06:03 -07:00
Michael Kirk
2ed916e89f
show parking intent (#362) 2020-10-07 14:16:58 -07:00
Dustin Carlino
0f806b2055 Document the sim crate 2020-10-06 18:25:39 -07:00
Dustin Carlino
a3b7ed18cd Cache the unedited map, for #361 2020-10-06 16:58:48 -07:00
Dustin Carlino
84e50d561d Workaround one case of #361 in an expensive way: temporarily revert
map edits when viewing the "before" version of a trip.
2020-10-06 15:35:11 -07:00
Dustin Carlino
d844646cb9 Implement per-road caps for #325, necessitating a tiny map edits version
bump.
2020-10-06 14:17:55 -07:00
Dustin Carlino
24c20e1599 Add a layer to visualize congestion caps. #325 2020-10-06 13:47:53 -07:00
Dustin Carlino
6fd8422cf5 Woops, fix headless build break 2020-10-06 13:05:23 -07:00
Dustin Carlino
34920064ed Fix some Unicode characters crashing in web (ea9ce84336) 2020-10-06 09:17:09 -07:00
Dustin Carlino
68a5731e41 Fix mistake in git merge 2020-10-05 20:32:08 -07:00
Dustin Carlino
f258c50595 Organize import blocks using https://github.com/dabreegster/organize_rust_imports 2020-10-05 20:29:22 -07:00
Dustin Carlino
27d94945c6 Manually move mod block after the use block, to match what CLion does. 2020-10-05 20:29:22 -07:00
Dustin Carlino
41ecd62e69 Support textures on the web as well 2020-10-05 19:50:52 -07:00
Dustin Carlino
b9eda7305a Fix the web canvas size. I was mixing examples improperly; our code appends a canvas to the DOM dynamically, so we don't need to hardcode one. 2020-10-05 19:50:52 -07:00
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