Commit Graph

2178 Commits

Author SHA1 Message Date
Michael Kirk
e1ec69f9f7 Replace Btn::plaintext_custom with new ButtonBuilder 2021-01-19 17:40:35 -08:00
Michael Kirk
743b74510d
replace Btn::close with new style (#463) 2021-01-19 16:17:11 -08:00
Michael Kirk
d7445d889e
button revamp groundwork (#459) 2021-01-19 10:10:18 -08:00
Dustin Carlino
a6c61e4fae Use Great Kneighton study area for Cambridge, not Trumpington. And bring
in Chapelford too. #449
2021-01-17 17:35:11 -08:00
Dustin Carlino
8928256909 Enable the scenario modifiers UI for all scenarios in sandbox mode, not just the Soundcast-based ones. No reason not to do this earlier; I originally was working on this tool for a specific purpose. 2021-01-14 09:28:28 -08:00
Dustin Carlino
e233012ee8 Use a full modal to select a scenario. During the button UI audit, we
realized a dropdown doesn't make sense. A larger panel gives room to
explain what the choices mean.
2021-01-14 09:05:44 -08:00
Robin Lovelace
4696134871 Change dropdown menu title, close #453 2021-01-14 08:23:57 -08:00
Dustin Carlino
38fa22d4b2 Include the importer in the release again -- I accidentally stopped
about a month ago and noticed in #452
2021-01-13 10:52:07 -08:00
Dustin Carlino
ff598f21a3 Add a new layer to star buildings. Autosave it. While trying out changes
for #446 in the UI, I kept losing track of the two buildings I'm
focusing on. A player-defined list of shortcuts seems generally helpful.
2021-01-12 19:22:50 -08:00
Dustin Carlino
f680de73aa Remove London from screenshot testing, and use Cambridge instead. #449
This will make it easier to visually track the progress improving the
import. Originally London was added to have one left-hand driving map
under the test, but Cambridge works for that too, and it also includes
separate cycleways.

Also fix a crash when trying to draw very very tiny arrows.
2021-01-12 12:30:21 -08:00
Dustin Carlino
ddc49e14b4 Add a signal editor tool to adjust the timing to some approximation of https://nacto.org/publication/urban-street-design-guide/intersection-design-elements/traffic-signals/signal-cycle-lengths/ for #446 2021-01-11 17:16:01 -08:00
Dustin Carlino
9f72de9434 Fix initial camera loading for game, broken in b4e72debcf. Booleans are hard. 2021-01-11 10:32:51 -08:00
Dustin Carlino
0542edc61e Don't crash when a trip succeeds now, but not in the prebaked results. [rebuild] [release] 2021-01-10 12:13:02 -08:00
Dustin Carlino
b4e72debcf Make the game crate also start by asynchronously loading any map, in the common case of starting with a map as an argument. #344
Now we can remove montlake.bin from the wasm also, bringing game down to
just 18MB!!!
2021-01-09 15:51:03 -08:00
Dustin Carlino
26f3726abd gzip two large SVG character files to trims down wasm size more for #377. game from 31MB to 24MB!
I didn't have to do anything to gunzip, because usvg is such a magical
crate that it already has flate2 support baked in.
2021-01-09 09:26:41 -08:00
Dustin Carlino
fea3ebbe5b Change the city picker UI to show cities on the left. After clicking one, open up the overview for that city. 2021-01-08 15:51:22 -08:00
Dustin Carlino
b487678ee0 Delete all out-of-date manual overrides for traffic signals, and make it
a hard error when they become out-of-date going forward.

Better heuristics make some of these unnecessary. And now the the JSON
files are in this repo, updating files manually when pulling down new
OSM data becomes less tedious.
2021-01-07 12:24:07 -08:00
Dustin Carlino
65b2b581fa Attempt to take many screenshots of one map at different zoom levels for Leaflet. Various bugs, but progress. #440 2021-01-06 16:33:53 -08:00
Dustin Carlino
92be9c57ed Optionally tile screenshots at smaller dimensions than the window. #440 2021-01-06 10:52:22 -08:00
Dustin Carlino
4cf133cc32 Make the new screencaps preserve alpha properly by switching to
premultiplied alpha. See option 1 of
https://stackoverflow.com/a/24380226

Upload the "new" screenshots (and lakeslice map)!
2021-01-05 18:28:30 -08:00
Dustin Carlino
7f0cdace5a Use OpenGL to take screenshots instead of scrot. Benefits:
- Simple -- one OpenGL call and feeding to the awesome image crate
- Faster -- seemingly don't need the sleep() for whatever vsync problems
- Portable -- doesn't use the Linux scrot tool
- I can switch windows and wiggle the cursor with impunity while this runs

One disadvantage: screencaps in S3 are now slightly larger PNGs, because
for some reason, the image/gif feature is super slow, even in release
mode.

For now, this makes the process of screenshot diffing map changes
easier. But it also might help with producing raster tiles for Leaflet. #440

Also, had to regenerate lakeslice because of the previous change --
it had an old adaptive signal baked in.
2021-01-05 14:58:31 -08:00
Dustin Carlino
6346302338 Remove the adaptive traffic signal experiment, now that Bruce's variable signals work. The adaptive case was added as a proof-of-concept, and its behavior is subsumed by the variable ones. Fixes #124 2021-01-05 13:06:44 -08:00
Dustin Carlino
802e020520 Import a SUMO network, transform it into an ABST map. So far, this gets
lanes and intersections displaying, but with lots of problems.
2021-01-05 12:44:38 -08:00
Dustin Carlino
e99def9124 Switch all error handling to anyhow. Nothing consumes our code as a
library yet, so this is a step forward from string errors. Manually
tested how errors show up (including the nice with_context bit).
2021-01-05 11:35:03 -08:00
Dustin Carlino
cd7dca87d7 Fix web build after rand upgrade. Unfortunately I think this has to happen in all of the binary crates individually: https://docs.rs/getrandom/0.2.1/getrandom/#indirect-dependencies 2021-01-05 11:12:03 -08:00
Dustin Carlino
bc3c3dfd6c Rename phase -> stage in the JSON traffic signal format. Meant to do this a long time ago. #295
Make this schema change backwards compatible for player edits.
2021-01-04 11:18:17 -08:00
Dustin Carlino
dedb041bdb Move CameraState to map_gui. Now widgetry has no dependency on abstio! #253 2021-01-04 10:39:15 -08:00
Dustin Carlino
bfa208ce6a Parameterize widgetry on a way to read SVG files. This is one of the last steps to remove the dependency on abstio. #253 2021-01-04 09:53:24 -08:00
Dustin Carlino
d529ae2e5c Upgrade usvg and rand 2021-01-04 09:19:54 -08:00
Dustin Carlino
965d999199 Upgrade misc other dependencies 2021-01-03 20:01:27 -08:00
Dustin Carlino
2945913fb3 Upgrade rand 2021-01-03 19:48:03 -08:00
Dustin Carlino
5c04923dff Split abstio crate out from abstutil. #253
widgetry, geom, and abstutil may wind up on crates.io in some form to
let other projects use widgetry. abstio has A/B Street-specific tricks
for reading data on native/web. Note widgetry still depends on abstio,
will figure out how to clean that up next.
2021-01-02 10:28:00 -08:00
Dustin Carlino
795c6bebb1 When producing GeoJSON, represent Polygons that arent Rings (like from SVGs) as a MultiPolygon of every pre-calculated triangle. #440 2021-01-01 15:33:11 -08:00
Dustin Carlino
302ec94e3d Try exporting the zoomed-in rendering of a map to geojson. #440
This approach has some manual effort and it's not capturing everything
yet, but it's a start.
2021-01-01 12:46:25 -08:00
Michael Kirk
acadad8bdf
fetch US census data from a hosted FlatGeoBuf (#432) 2020-12-31 16:20:32 -08:00
Dustin Carlino
9c63d9a181 Make a quick way of marking roads in the UI, dumping to a list, then
later overriding a .osm file with tags for these roads. This is a way to
test the effects of making simple OSM changes locally before
upstreaming.

Also handle repeated merging collapsing one of the roads. Not 100% what
happens here, but skipping the collapsed road works fine. The scary
Montlake intersections now look great with all the merging done, so
upstreaming the change! #114
2020-12-30 18:31:39 -08:00
Dustin Carlino
de4b026920 More turn restriction preservation... #114 2020-12-30 10:01:23 -08:00
Dustin Carlino
172dbf359c Try merging intersections with concave hull instead. #114 2020-12-28 16:05:41 -08:00
Dustin Carlino
17665a3d18 Prototype a simple idea for calculating merged intersection geometry using the original attempted shapes. #114 2020-12-28 15:43:48 -08:00
Dustin Carlino
32a3159d19 Express AmenityType as a proper enum. 2020-12-28 12:18:29 -08:00
Dustin Carlino
001aa836d2 Organize assets that're baked into widgetry. They don't belong in the
data/ directory, because they're statically bundled; they're not
actually read from the filesystem. #253

Two SVGs get duplicated between widgetry and abst assets -- dont_walk
and arrow_drop_down.
2020-12-28 10:40:55 -08:00
Dustin Carlino
af5811c33c Lift Cached to widgetry 2020-12-26 14:38:43 -08:00
Bruce
3be45b8221
Add a Variable phase (#433)
* Add a Variable phase

Variable provides a min duration, a delay duration, and an additional duration. The maximum cycle time is min + additional. Once min has been exhausted, if there is demand, the cycle is extended by delay until there isn't any demand or the additional duration has been consumed.

#295
2020-12-24 12:33:47 -08:00
Dustin Carlino
0a25d92e53 Include the intersection geometry in the shared-row export for 3D Street integration 2020-12-22 14:31:12 -08:00
Dustin Carlino
be589f7ef4 Switch A/B Street over to the new web loader with a progress bar. Initializing the .wasm may take a little longer, but it's not noticeable, and the progress bar for the large upfront download is really helpful. #377 2020-12-20 11:07:03 -08:00
Dustin Carlino
0bcf130b80 Lift the generic table to widgetry 2020-12-19 16:06:30 -08:00
Dustin Carlino
2baa0fa094 Update links to all the deployed web stuff 2020-12-18 13:02:36 -08:00
Dustin Carlino
d917008f2e Lift SimpleState to widgetry, since it doesn't depend on any details of
the App at all. Use it in the experiment a bit.
2020-12-17 12:23:57 -08:00
Dustin Carlino
0831d112ed Simplify the trace API even more -- everyone but the simulation deals with unmodified paths and wants the original start 2020-12-16 16:14:33 -08:00
Dustin Carlino
d00e7f7bca Simplify path trace API -- nobody needs dist_ahead. I think that was originally meant to be a performance trick to only draw the next little bit of a route 2020-12-16 16:09:11 -08:00
Dustin Carlino
b39aa2a45f Expose continuous distance crossed for pedestrians. #392 2020-12-16 15:09:06 -08:00
Dustin Carlino
f36854cc5b Simplify TripPhase now that PathRequest is embedded in the Path 2020-12-16 13:02:59 -08:00
Dustin Carlino
7efd2de939 Remove unused census generation UI from hackathon. We'll recreate this later, onc it's more clear what params there are to tune, and where the params will live. #424 2020-12-16 12:57:19 -08:00
Dustin Carlino
fccc98205c Refactor: Store the input PathRequest inside the resulting Path. This
saves lots of callers from cloning the request and separately plumbing
around the requested start/end distance. Also a step towards exposing
more granular distance crossed in a path for #392.

Still a few more places to simplify, but will do in a separate, smaller
change.
2020-12-16 12:55:57 -08:00
Dustin Carlino
2b4b92664e Much needed refactor: map.pathfind() returns a Result, stating the failed request. Many call sites were cloning the request and doing this anyway. 2020-12-16 10:06:12 -08:00
Dustin Carlino
16392a461f Refactor: GeomBatch::load_svg directly takes EventCtx or GfxCtx. The prerender struct should ultimately not be exposed outside of widgetry. 2020-12-15 11:44:58 -08:00
Dustin Carlino
02dd3613cd Refactor: Rename txt.render_to_batch to txt.render_autocropped, and make
it take EventCtx or GfxCtx
2020-12-15 11:35:40 -08:00
Michael Kirk
375e0caeb8
integrate census scenario (#426)
#424
2020-12-14 20:27:57 -08:00
Michael Kirk
8b9b3ce2b1
census areas import (#425)
#424
2020-12-14 17:48:47 -08:00
Dustin Carlino
3c2c3cda5a Output lane width as feet in the Streetmix export, not meters.
Also few unrelated tiny wording changes in the experiment
2020-12-14 16:13:32 -08:00
Dustin Carlino
607a8757dd Use widgetry to handle quitting things, so we don't just blow up on the
web.
2020-12-11 13:18:20 -08:00
Michael Kirk
d0f093d95a
fix compile error (#420) 2020-12-10 15:47:00 -08:00
Dustin Carlino
77a37f897b Wire together a UI to generate census-based scenarios 2020-12-10 09:35:50 -08:00
Dustin Carlino
dbbfe18076 Link to OSM objects from the area info panel, to help debug water polygons easily 2020-12-09 16:41:08 -08:00
Dustin Carlino
3d361074ab Draw traffic signals changing over time in the experiment 2020-12-08 09:05:06 -08:00
Dustin Carlino
86814f6867 Make A/B Street's minimap specialize the generic widget, instead of duplicating code. 2020-12-07 15:40:35 -08:00
Dustin Carlino
f57fb8f2f6 Run the experiment on the web 2020-12-02 13:44:10 -08:00
Michael Kirk
727fe32fdd little typo in summaries table 2020-12-02 10:51:46 -08:00
Dustin Carlino
57963126fa Fold number of housing units into Building; ditch the extra file approach. 2020-12-01 12:43:19 -08:00
Dustin Carlino
2ebaf99e0d A fresh attempt at finding the root causes of gridlock map-wide 2020-12-01 10:50:05 -08:00
Dustin Carlino
b5ea263fc1 Expose the blocked-by graph through the API, and add root-cause analysis
to the UI debugger. #392
2020-11-30 17:01:15 -08:00
Dustin Carlino
8501ec70f9 Make the blocked-by graph more exploreable. Remove older debug code that
did something similar. #392
2020-11-30 15:15:13 -08:00
Dustin Carlino
6dd14c8bed Don't crash when jumping to nonexistent trip or when clicking
follow/unfollow for a trip without an agent.
2020-11-30 14:20:37 -08:00
Dustin Carlino
be3d1dc83b Refactor github workflow, since most steps are OS-independent. Build all of the separate binaries. [rebuild] [release] 2020-11-29 16:01:18 -08:00
Dustin Carlino
2716c44bf7 Fix commuter patterns dashboard, which broke whenever we cleared the sim upon setup 2020-11-29 08:59:10 -08:00
Dustin Carlino
d6c179385e Start in night mode, and adjust minimap coloring there 2020-11-28 10:19:21 -08:00
Dustin Carlino
58b6c66c2b Consolidate console_log setup into abstutil, now that there are multiple binaries that should all have the behavior. 2020-11-26 14:40:05 -08:00
Dustin Carlino
ebcae62652 Slightly simplify how some states specify what map objects can be
selected and clicked on.
2020-11-26 13:42:31 -08:00
Dustin Carlino
65a4b578be Experiment with separating concerns in some simple States.
This is closer to a callback style, which might be more familiar to
people coming from other frameworks.

It's a pretty mechanical refactor now, but the hope is that looking at a
bunch of on_mouseover() functions will reveal further refactors more
easily than a bunch of monolithic event() functions.

I don't think every State fits this pattern; things like SandboxMode
need to carefully orchestrate the order of things. Make simple things
easy and hard things possible.
2020-11-26 13:11:12 -08:00
Dustin Carlino
70b40a7148 Stop doing custom stuff to spawn scenarios in the tutorial. Integrate
with SandboxLoader, which handles loading prebaked results on the web
correctly. #407
2020-11-25 12:15:22 -08:00
Dustin Carlino
4b6df883fb Organize challenges into a subdirectory, splitting out prebaking code
and bringing in cutscene, just to organize things a little better.
2020-11-25 11:31:37 -08:00
Dustin Carlino
b6ebee0dd8 Tiny refactor: Drawable::empty(ctx) 2020-11-25 11:19:26 -08:00
Dustin Carlino
903eab1bc4 Remove some old savestating optimizations from the simulation. The
optimizations avoided serializing Analytics and paths of to-be-created
agents, to reduce the file size. The logic to manage all of this isn't
worth the complexity anymore, because:

1) We don't queue up a bunch of spawn commands anymore; we defer
pathfinding until the last minute anyway.

2) We're not using savestates except for occasional manual debugging.
Previously, there was an idea to quickly preview prebaked traffic
mid-day. That idea was never fleshed out.
2020-11-24 15:38:20 -08:00
Dustin Carlino
314f01496e Save/restore camera state per map in all map_gui apps too. 2020-11-24 11:53:50 -08:00
Dustin Carlino
16b561a408 Move game/helpers into game/common. And fix github rustdoc workflow 2020-11-23 23:39:55 -08:00
Dustin Carlino
db736ceab5 Collapse some of the module indirections in the game crate. 2020-11-23 17:58:32 -08:00
Dustin Carlino
f3ff910c37 Cleanup from the great app split:
- move show_zorder into DrawMap
- reorganize modules in map_gui

Next is to reorganize/collapse modules in game.
2020-11-23 17:58:32 -08:00
Dustin Carlino
c450922211 Split out the 15min tool to its own crate. 2020-11-23 17:58:32 -08:00
Dustin Carlino
9f422033e9 Make a SimpleMinimap for map_gui. Will refactor later. 2020-11-23 17:58:32 -08:00
Dustin Carlino
c3db4de087 Lift the Navigator tools to map_gui. 2020-11-23 17:58:32 -08:00
Dustin Carlino
139d435bd3 Split out the OSM viewer to its own crate, porting over a simple form of current_selection. Temporarily omit the minimap and navigator from it. 2020-11-23 17:58:32 -08:00
Dustin Carlino
ad0d1ae7a4 Split out the OSM parking mapper into a separate app, temporarily
WITHOUT mouseover.
2020-11-23 17:58:32 -08:00
Dustin Carlino
e6d21d81e7 Add the city picker to the experiment, as a way to lift it to map_gui. 2020-11-23 17:58:32 -08:00
Dustin Carlino
859d78f2cf Refactor the CLI flag parsing that all apps will share. 2020-11-23 17:58:32 -08:00
Dustin Carlino
ab2f6fefec Split the controls experiment into a separate binary, get it to draw a
map way more simply than the game
2020-11-23 17:58:32 -08:00
Dustin Carlino
558eb6f716 Extract DrawMap into a separate crate, along with everything else it
depends on.

The goal is to be able to split things like the OSM viewer, parking
mapper, and 15 min tool into separate crates from the game, while still
sharing lots of code.
2020-11-23 17:58:32 -08:00
Dustin Carlino
67446d32b9 Refactor and rearrange misc App/PerMap things to prepare for extracting some shared functionality to other crates. 2020-11-22 19:48:09 -08:00
Dustin Carlino
f7504bf4d1 Tease AgentCache out of DrawMap 2020-11-22 19:35:35 -08:00
Dustin Carlino
0574af0b64 Move UnzoomedAgents management out of App and into AgentCache 2020-11-22 19:24:07 -08:00
Dustin Carlino
26a7277f50 Reorganize zorder_range out of PerMap and into DrawMap. 2020-11-22 19:05:09 -08:00
Dustin Carlino
abf3dbc859 Don't specify a widgetry backend by default; force every user to set the feature explicitly. 2020-11-22 18:35:03 -08:00
Dustin Carlino
0dd246c83f Remove the old --num_agents flag, used for debugging spawning agents 2020-11-22 18:27:25 -08:00
Dustin Carlino
ed8fe187cc new release 2020-11-22 13:41:58 -08:00
Dustin Carlino
f656468580 widgetry refactor: store all keys currently held down, let anyone query 2020-11-22 13:24:08 -08:00
Dustin Carlino
fba2391bc5 Experiment with winit key handling. And attempt [rebuild] [release] again 2020-11-22 12:56:22 -08:00
Dustin Carlino
47d09d61f0 Plumb the intended TripMode for cancelled trips; instead make the trip duration optional. Breaking change for anyone using the API. Makes way more sense. [rebuild] [release] 2020-11-22 11:21:44 -08:00
Dustin Carlino
d83133fa09 Fix the biking mode for #393 2020-11-22 10:48:41 -08:00
Dustin Carlino
594b376734 Figure out travel time for bikes. #393
Something's wrong with the results, but it's a start.
2020-11-21 15:10:49 -08:00
Michael Kirk
32a9915d2e
dont switch buildings while panning (#401)
for #393
2020-11-21 14:58:22 -08:00
Michael Kirk
d2cead2a82
15m neighborhood: switch neighborhoods (#400)
for #393
2020-11-21 14:51:40 -08:00
Dustin Carlino
78eedff7c7 UI glue for switching between walking/biking. #393 2020-11-21 14:02:24 -08:00
Gedalia Kott
657a24d328
add about button to hovering panel for 15 min neighborhood sub-app (#398)
for #393
2020-11-21 13:43:23 -08:00
Dustin Carlino
20523119cb Show a tooltip of the travel time to a building while hovering. #393 2020-11-21 13:22:56 -08:00
Dustin Carlino
d8b1df5975 Click amenity categories to get more details. #393 2020-11-21 12:47:42 -08:00
Michael Kirk
b076165e0b
Mkirk/switch buildings (#397)
for #393
2020-11-21 12:23:37 -08:00
Dustin Carlino
29da713903 Display a simple count of amenities reachable from a building. #393 2020-11-21 11:11:57 -08:00
Dustin Carlino
bf9d34d1a3 Drop results farther than 15 minutes away. #393
It'd be more efficient to terminate the Dijkstra's search directly, but
petgraph doesn't have an option for that, so we'll have to implement
Dijkstra's manually (shouldn't be hard).
2020-11-21 10:12:29 -08:00
Dustin Carlino
5c6eacf781 Add a --15min flag to jump right into the tool for #393 2020-11-21 09:34:52 -08:00
Dustin Carlino
e43f551af6 New query and debug viewer to get the full graph of agents waiting on others. #392 2020-11-20 14:19:19 -08:00
Dustin Carlino
d731d57814 Silence simulation alerts on the title screen; they're very obnoxiously spammy 2020-11-20 11:15:05 -08:00
Dustin Carlino
308eb90956 Bring in Seattle parcel data to experiment with filling the negative
space on maps with "private area around houses".

And a few tweaks to the KML viewer to make it more useful:

- optionally save the clipped file
- click an object to view all attributes in a scrollable popup
2020-11-20 10:30:13 -08:00
Dustin Carlino
d33d051d47 Make the isochrone use time, not distance, as a cost function. And
floodfill using Dijkstra's, instead of computing loads of paths.  #393
2020-11-19 14:11:59 -08:00
Dustin Carlino
5a5aaae6f7 Reorganize the half-broken isochrone tool into a dedicated mode, accessible from the main menu, in preparation for the Saturday hackathon. #393 2020-11-19 13:22:59 -08:00
Dustin Carlino
f6565988c9 Let parking aisles span multiple parking lots. 2020-11-19 12:34:31 -08:00
Dustin Carlino
3905131fe4 Track and expose total trip distance in the API. #392 2020-11-19 10:40:00 -08:00
Dustin Carlino
915e12ff7e Remove PersonID from Scenario; the simulation will assign IDs sequentially. They're redundant. #258
Slightly reduces scenario file size, and simpler code to construct
scenarios.
2020-11-18 14:13:25 -08:00
Dustin Carlino
cc254d86ae Fix bug with trip tables -- changing filters in the cancelled and unfinished tables would incorrectly jump back to the finished trip table. 2020-11-18 13:23:11 -08:00
Dustin Carlino
4ab98b1477 Compact the schedule in Scenario by just storing each TripEndpoint. #258
The schedule validation changes slightly. No-op trips between the same
origin/destination are now an error and get filtered out.

huge_seattle scenario goes from 129MB to 110MB with the redundant
endpoints removed.
2020-11-18 11:13:09 -08:00
Dustin Carlino
8d80668a56 The big cutover: a Scenario's trips are now just start/endpoints and mode, not the old SpawnTrip structure with a bunch of different cases and details picked out. #258
Not regenerating scenarios yet...
2020-11-17 16:28:52 -08:00
Dustin Carlino
8d28274736 Simplify the old ScenarioGenerator, mostly by removing OriginDestination
in favor of Option<TripEndpoint>. The bike/car contention tutorial stage
has to be tweaked manually, since there's no longer a nice way to spawn
vehicles at a non-border intersection and force them to use a certain
DirectedRoad. #258
2020-11-17 15:51:30 -08:00
Dustin Carlino
0599d4b47b Whittle down places constructing SpawnTrip manually. #258 2020-11-17 14:10:47 -08:00
Dustin Carlino
7bb1d5b59c Switch the UI's spawn_agents_around intersection to go through Scenarios instead of reaching into internal sim spawning gunk. Lock down visibility of some sim spawning things. #258 2020-11-17 11:13:42 -08:00
Dustin Carlino
2abeebc55e Add a third TripEndpoint case to appear at an exact Position (lane + distance). This is a necessary step before simplifying Scenario's IndividTrip to use TripEndpoints and mode instead of SpawnTrip. #258 2020-11-17 10:50:42 -08:00
Dustin Carlino
5ea3c2ba6f Remove support for remote trips, and stop plumbing off-map locations. A
remote trip goes between two locations off-map, specified just by a GPS
coordinate. The trips aren't simulated at all. They were originally
added to support Orestis's pandemic model, to handle transmission
off-map in shared buildings. This work has died off, there are no other
anticipated use cases for remote trips, and they complicate bigger
refactorings. #258

This also has the nice side effect of substantially reducing scenario
size -- huge_seattle from 177MB to 147MB. That unused metadata was
expensive!
2020-11-17 10:14:23 -08:00
Dustin Carlino
32dea68f5d Measure how many simulation events actually result in something
changing. #368
2020-11-16 11:51:24 -08:00
Dustin Carlino
754749a578 Parallelize part of scenario spawning. One of the code paths calls
biking_connection, which does a slow graph floodfill.

Prolet robot in Krakow: from 22.6s to 10.1s

Because Krakow now uses separate sidewalks and they're not properly
connected to the road graph yet, biking_connection has to search very
far. The speedup isn't noticeable in other cases.
2020-11-16 09:36:48 -08:00
Dustin Carlino
d3aa81d2d2 new tool to record a scenario consisting of all traffic around some intersections, to help with producing a better test case for #382 2020-11-15 16:57:33 -08:00
Dustin Carlino
a0daeb2f4b new release 2020-11-15 10:59:36 -08:00
Dustin Carlino
8101c2a820 Add a favicon to the web deployment, mostly to stop an error in the devconsole 2020-11-14 10:51:33 -08:00
Dustin Carlino
d43bf2c869 Import Paris, for helping the OSM community visualize all the awesome pop-up bike lanes there 2020-11-13 17:23:36 -08:00
Dustin Carlino
2d928b7ecf Little tweaks to the parking mapper mode to make it easier to tag dual
carriageways. #230
2020-11-12 22:00:57 -08:00
Dustin Carlino
69699600ea Prototype filling in the gaps near one-way roads. Needs more filtering
out, but solid start. #230

Regenerate map data, since the Area object changed.
2020-11-12 14:21:08 -08:00
Dustin Carlino
c96f84341a Incorporate intersection corners in the around-the-block polygon. #230 2020-11-12 13:41:47 -08:00
Dustin Carlino
1b6af3dfb1 Prototype a debug mode tool to trace a polygon on the interior of any "loop" of roads. Aka, find the polygon if you "walk around the block." This can be used to fill in the blank space between dual carriageways. #230
Algorithm needs some work -- it doesn't trace along sidewalk corners,
and it fails for some starting lanes.
2020-11-12 12:53:41 -08:00
Dustin Carlino
7854823c28 Change the to/from permanent map edits APIs to be a little more ergonomic 2020-11-12 10:13:32 -08:00
Dustin Carlino
3583d068a6 Fix a bug introduced in e3b9c42506 on the proposal saver, and allow blocking-the-box on another Ballard intersection 2020-11-11 13:20:56 -08:00
Dustin Carlino
e5ff76e00c Working on gridlock in the Ballard map. Allow blocking-the-box near the
famous Green Lake intersection, and add a little debug tool to see
current queue reservation length.
2020-11-11 12:43:28 -08:00
Dustin Carlino
aa966d7533 Upgrade a bunch of dependencies 2020-11-11 12:02:53 -08:00
Dustin Carlino
2a546e528c Skip applying no-op edits and recalculating pathfinding when leaving sandbox mode. For large maps, it's a noticeable delay 2020-11-10 15:19:41 -08:00
Dustin Carlino
9d7b8744f5 Manually recreate panels when day/night color swaps. 2020-11-10 14:13:10 -08:00