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
Dustin Carlino
a4dfa2f40a
Automatically toggle between day/night colorschemes at 6am and 6pm, if
...
you pass --day_night. Fails to update all panels immediately.
2020-11-10 14:13:10 -08:00
Dustin Carlino
ef34b36d9f
Display tooltips in the collision viewer. #87
2020-11-10 12:49:08 -08:00
Dustin Carlino
07ac288e72
Refactor: rename Pt2D::from_gps to just gps.to_pt(bounds)
2020-11-10 12:00:43 -08:00
Dustin Carlino
e3b9c42506
Refactor: panel.replace() will set the same name on the new element
2020-11-10 11:49:55 -08:00
Dustin Carlino
b17d638d34
Display individual collisions and allow filtering by severity/time. #87
2020-11-10 11:41:35 -08:00
Dustin Carlino
8ab7855926
Update some throughput plot terminology. Also pin to upstream earcutr, now that a fix is merged. #331
2020-11-10 09:00:05 -08:00
Dustin Carlino
8ddaba0563
Base the night mode color scheme on Egregoria
2020-11-09 15:50:34 -08:00
Dustin Carlino
6ac49c3a50
Document how data/ is arranged. #195
2020-11-09 11:25:36 -08:00
Dustin Carlino
c9e24ce752
Wire up github actions to sometimes pass a feature flag to pin to a versioned directory in S3. And on that note, [rebuild] [release]. #326 , #195
2020-11-07 19:06:33 -08:00
Dustin Carlino
1b4e25e12f
Get the downloader UI to actually fetch stuff. #326
2020-11-07 18:39:15 -08:00
Dustin Carlino
54ced5b5b4
Stub out a native-only UI to download extra cities. Move the config
...
about what cities somebody has opted into downloading to JSON and a more
common place. #326
Note this is a breaking change for this config file, but I don't think
many people have started using this yet.
2020-11-07 16:20:27 -08:00
Dustin Carlino
e0a8d82b61
Reorganize polygon files to importer/config, instead of data/input.
...
Nothing in data/input should be under version control; all of it is
managed by the updater. #326
2020-11-06 10:10:03 -08:00
Dustin Carlino
31fcf1b863
Prototype a UI to view aggregated collisions. #87
2020-11-05 17:53:54 -08:00
Dustin Carlino
ad7a25f7f2
Prototype a simple data format for collision data. Import data for Leeds and London. #87
2020-11-05 16:16:40 -08:00
Dustin Carlino
ac6eff31ef
Rename some maps to remove the now-redundant city. #326
2020-11-05 15:24:02 -08:00
Dustin Carlino
3d84defb71
Also organize screenshots by city. #326
2020-11-05 14:42:40 -08:00
Dustin Carlino
cda586dfc9
Cleanup by moving some methods to belong to MapName. #326
2020-11-05 14:18:13 -08:00
Dustin Carlino
4f2cda8d53
Reorganize data/system/ files by city! The only interesting change is
...
abstutil::path_all_maps becoming abstutil::list_all_maps. #326
2020-11-05 14:05:48 -08:00
Dustin Carlino
576e64e246
Consolidate integration tests from the map_tests crate and some of the
...
stuff smushed into game for some reason
2020-11-05 12:42:52 -08:00
Dustin Carlino
c8f6e4d2c9
Cache the currently loaded Scenario, instead of re-reading it from the filesystem or (shudder) web. #377 ( #385 )
2020-11-05 09:25:02 -08:00
Dustin Carlino
67530bec07
Future-proof file organization by changing map_name from a string to a
...
struct. Whatever choices we make next about naming cities hierarchially
or not can be managed in just one place. #326
This is a pretty huge change, but the compiler gives reasonable
confidence it's correct. More bugs are likely to crop up in the next
step, when filenames start being namespaced by the city too.
2020-11-04 17:26:32 -08:00
Dustin Carlino
b47121ec8b
Make the generic KML viewer also support CSV files containing one (lat, lon) point. More convenient way to explore data for #87
2020-11-04 09:47:19 -08:00
Dustin Carlino
e99dd5bba7
Use inferred sidewalks for Leeds, after detecting another geometry bug
...
when building sidewalk corners. Raw sidewalks from OSM aren't suitable
for traffic simulation yet.
2020-11-04 08:46:06 -08:00
Dustin Carlino
c481567ebb
Cut over from Dropbox to S3. #195 , #326
...
Uploading files individually to Dropbox is flaky, and the unique URL per
file complicates data/MANIFEST.
While we're at it, start carving aside a directory structure for keeping
data for the last few releases.
[rebuild] to make sure github actions can download everything
2020-11-02 17:36:02 -08:00
Dustin Carlino
28aaae110e
Make the native and web file loaders detect binary/JSON files from the extenson. This unbreaks the dump_scenario example described at https://dabreegster.github.io/abstreet/dev/api.html#working-with-scenarios
2020-11-02 12:18:10 -08:00
Dustin Carlino
0fcd7af895
A few improvements for the OSM viewer:
...
- hotkey to expand the city picker to the full list
- add a button to edit an OSM way (just for roads, not sure there's
value for intersections, parking lots, or buildings)
- include the Z-order picker
2020-11-02 11:35:49 -08:00
Dustin Carlino
6e417340e4
Generate turns much more simply for intersections of footpaths. #161
...
Also gets rid of some annoying warnings about roads with missing names.
I could continue to skip the warning for more situations, but I think
this sort of data quality check could be done better in the OSM viewer.
2020-11-01 18:20:32 -08:00
Dustin Carlino
5862835196
Fix content type on the html web runner page. Without this, initially
...
loading jumped to >30s with a warning in the console. Back to the usual
few seconds with this fix.
2020-10-31 18:37:46 -07:00
Dustin Carlino
8920c2c0b8
Store gzipped files in S3 and decompress upon loading. A few basic tests
...
showed this is faster than downloading the uncompressed files, but of
course it probably depends on network speed vs CPU. #326
Also cut over the updater to use gzipped files using flate, instead of
single-file .zip's. [rebuild]
2020-10-31 18:09:48 -07:00
Dustin Carlino
3e6e10f45a
Show better error messages in the web file loader for HTTP errors, instead of trying to decode the HTML body of the 404 page
2020-10-31 10:10:01 -07:00
Dustin Carlino
ca2ff08d71
Don't render intersections between footways with a special color. Also
...
cut Kraków over to using the new experimental footpath support. #161
2020-10-30 14:11:00 -07:00
Michael Kirk
b1f4ca0b1b
loading screen ( #373 )
...
fancy loading screen
2020-10-29 18:39:51 -07:00
Dustin Carlino
771dcd1c34
Plumb through failures (like 404) through the web file loader
2020-10-29 15:54:01 -07:00
Dustin Carlino
1707b6fe37
Consolidate some PolyLine geometry code, and refactor some geom->geojson
...
mappings
2020-10-29 12:23:39 -07:00
Dustin Carlino
c8b565e57b
Make the city picker handle 100's of maps slightly better, by splitting out into a separate list with autocomplete
2020-10-28 16:08:09 -07:00
Dustin Carlino
37896c9d37
Don't draw building paths in the OSM viewer. They're messy and don't reveal anything semantically interesting, whereas in A/B Street it's kind of important to see which road a trip will begin/end at for buildings on corners
2020-10-28 12:17:05 -07:00
Dustin Carlino
0167b4be31
A tiny start to the great UI button refactor: make the "X" button
...
consistent. #331
2020-10-28 12:04:36 -07:00
Dustin Carlino
3b838c1225
Finish formatting distance/duration/speed units nicely. And remove the
...
number of lanes from trip info; it's misleading and not useful. #331
2020-10-28 11:33:48 -07:00
Dustin Carlino
3b26d25fe4
Build a wasm binary that jumps straight into the OSM viewer
2020-10-27 15:34:58 -07:00
Dustin Carlino
57b3d0719d
Make a way to jump straight into the OSM viewer from the command line. Also slightly collapses some of the app startup creation flow
2020-10-27 15:17:21 -07:00
Dustin Carlino
fd1afbad02
Speed up the OSM viewer's business search panel. It was constantly recalculating the entire thng
2020-10-27 12:52:26 -07:00
Dustin Carlino
ae62bf082e
Consolidate Slider and AreaSlider. They share most logic, just look different.
2020-10-27 12:13:20 -07:00
Dustin Carlino
6a8e01d4cd
Remove an unnecessary slider from the polygon debugger, and lock down set_percent, which is causing some scrollabr dragging bugs.
2020-10-27 11:31:37 -07:00
Dustin Carlino
fda4c4da7b
Refactor a few utilities, and use convex hull of the city boundaries to simplify them considerably. #326
2020-10-26 14:15:25 -07:00
Dustin Carlino
1cc7982ff7
fix web build and redeploy
2020-10-26 10:23:24 -07:00
Dustin Carlino
47fa997f72
Refactor a proper Amenity struct. Leave room for optional raw OSM tags.
...
Don't expose the tags in the UI yet. [rebuild]
2020-10-25 11:49:46 -07:00
Dustin Carlino
1a630c6361
Highlight categories of businesses in the osm viewer
2020-10-24 15:19:51 -07:00
Dustin Carlino
34b41a909e
Optionally keep building OSM tags. Display in info panels and the new viewer, when present.
...
Don't keep the tags by default. File size increase from the empty map is
negligible.
2020-10-24 14:19:22 -07:00
Dustin Carlino
ad23da1f6c
Workaround widgetry panel bug in the osm viewer, where scrollbars aren't
...
recomputed when panel contents change size.
2020-10-24 13:41:06 -07:00
Dustin Carlino
614c744dc9
Add a POI search to the new viewer
2020-10-24 13:13:04 -07:00
Dustin Carlino
a538b5cd64
Add the minimap to the OSM viewer, making a variation that hides some features
2020-10-24 12:27:27 -07:00
Dustin Carlino
6fef09fb8d
Flesh out the OSM viewer:
...
- outline around fixed objects
- open OSM keys in the wiki
- info panels for buildings, intersections, and parking lots
- show turns from lanes
2020-10-24 11:38:19 -07:00
Dustin Carlino
8339c893eb
Show some OSM key/values for roads in the new viewer
2020-10-23 21:15:09 -07:00
Dustin Carlino
ecabf2436f
Experiment with a dedicated OSM viewer, to debut at Connect 2020. For
...
now, this is still embedded in A/B Street, to take advantage of
everything that already exists. But later, the idea is to split it into
a separate crate, sharing lots of code.
2020-10-23 16:28:47 -07:00
Dustin Carlino
c2b6c917ae
Generalize the State/Transition GUI structure, moving it into widgetry.
...
Nothing about it is specific to A/B Street, and other apps built with
widgetry could organize themselves as a stack of states. This is also a
first step towards sharing more common code between A/B Street and a
future OSM viewer.
Mostly mechanical change. Some more cleanup / documentation coming up
next.
2020-10-22 17:34:59 -07:00
Dustin Carlino
89977b3b31
Move grey_out_map out of State, in preparation for generalizing state/transition. #253
2020-10-22 16:53:15 -07:00
Dustin Carlino
4a3ea8b5c7
Add a tool to export a road to streetmix. Untested, because still having trouble making manual API calls.
2020-10-22 16:29:42 -07:00
Dustin Carlino
83c1c09936
Notify the player how many trips got oofed after live map edits. #312
2020-10-22 11:58:16 -07:00
Dustin Carlino
ad41303e5c
After making live map edits, indicate that results aren't finalized. #312
2020-10-22 11:05:07 -07:00
Dustin Carlino
8e6aa08d59
Breakdown agent counts much more in the tooltips. #331
2020-10-21 14:26:59 -07:00
Dustin Carlino
035b8ee96f
Fix alpha colors on the web by making the background canvas black instead of white. https://webglfundamentals.org/webgl/lessons/webgl-and-alpha.html has other workarounds, but I can't figure out how to control the webgl context parameters.
...
Also improve the loading message that appears before wasm has taken
over.
2020-10-21 10:50:40 -07:00
Dustin Carlino
8a1525ddfa
Lift parsing of --scenario_modifiers to a more common place, so it can be done in run_scenario too. #368
2020-10-21 08:35:38 -07:00
Dustin Carlino
ead7960112
Collapse one case of possible nested loading screens. Slightly simpler
...
code, but this doesn't solve the bug of a second squished loading screen
for scenarios.
2020-10-20 18:24:37 -07:00
Dustin Carlino
d8910ad04f
Build a quadtree of unzoomed agents while drawing, to later speedup mouseover. This seems to make performance fine in debug mode, so get rid of the flag guarding of this feature! [rebuild]
2020-10-20 11:38:38 -07:00
Dustin Carlino
bc3110ba9d
Add sidewalk borders to the new color scheme. Possibly need to rethink
...
sidewalk geometry again for this.
2020-10-20 11:28:45 -07:00
Dustin Carlino
177484d2b6
A few adjustments to the mapbox-ish color scheme: highway marking color, solid center lines
2020-10-20 10:51:03 -07:00
Dustin Carlino
af70904377
Document as much of geom as I can before my battery dies. And a mechanical API changes, Angle::new_degs -> Angle::degrees
2020-10-19 19:55:05 -05:00
Dustin Carlino
c435d3fce2
Consolidate two scenario modifiers, allowing all walking trips to be cancelled, for #368
2020-10-19 18:03:17 -05:00
Dustin Carlino
21e30aac94
Stop drawing arrows in the trip info panels to show where off-map trips begin/end. These were added way back when modelling remote trips for the pandemic sim, but they're just noisy otherwise.
2020-10-19 14:29:36 -05:00
Dustin Carlino
3f69b76bae
Make the 'cancelled' and future trip info panels closer to the others, with buttons to jump to the start/end point
2020-10-19 14:27:58 -05:00
Dustin Carlino
954aab953e
Add an "abstract" camera angle to just show buildings as uniform shapes.
...
A place to play around with showing symbols, not real geometry.
2020-10-19 13:14:44 -05:00
Dustin Carlino
913dd0c4db
Try Yuwen's new colors for the 'faded zoom' color scheme
2020-10-19 12:52:02 -05:00
Dustin Carlino
06f088afcc
More clearly handle the different strategies for filesystem access. On
...
native, only look at local files -- so now importing new maps locally
works again. On web, look at statically bundled files AND remote files
declared through the manifest.
In the future for native, we will also want to sometimes show remote
files available and integrate part of the updater, but only in a
specific view, not in general for all files.
2020-10-16 13:44:05 -05:00
Dustin Carlino
a18f494416
Don't crash on the web when loading a nonexistent file. This now happens, because we try to load prebaked results for synthetic scenarios.
2020-10-16 13:38:39 -05:00
Dustin Carlino
422882c03b
Ditch cpuprofiler in favor of cargo flamegraph. Add a tool that just
...
runs a scenario headlessly, since that's easier than sending a few curl
commands to the API. #368
2020-10-15 17:12:38 -05:00
Dustin Carlino
4a197fa13d
Until there's a faster implementation, just flag-guard selecting unzoomed agents
2020-10-15 14:58:07 -05:00
Dustin Carlino
38394c4a08
Comment some code to clarify things in #365 , and switch the color for
...
selecting unzoomed agents
2020-10-15 14:58:07 -05:00
Dustin Carlino
028d1df62c
Allow selecting and clicking unzoomed agents. [rebuild]
2020-10-15 14:58:07 -05:00
Dustin Carlino
1e0d8536a4
Fix #367 by making all constructors of SandboxMode appropriately defer
...
work that must happen after the map/scenario are loaded.
2020-10-14 17:43:28 -05:00
Dustin Carlino
e7fb9b1a4a
Handle the info panel rewind-sim case for #367 . I'm increasingly happier
...
with how the async reactions to loading SandboxMode are.
2020-10-14 17:24:39 -05:00
Dustin Carlino
81dae1e39c
Slightly simplify some plumbing of variables through nested closures, by
...
remembering that FnOnce exists
2020-10-14 15:36:08 -05:00
Dustin Carlino
5ef48a5d1c
Express the SandboxMode constructor as a full state machine, with the
...
ability to defer things like pushing the time warp state onto the stack
of states. This fixes the edit mode case of #367 , but other callers of
SandboxMode::new still need updating.
2020-10-14 15:13:10 -05:00
Dustin Carlino
84a65c293b
Make it easier to test scenario modifiers by specifying them on the CLI
2020-10-14 12:16:38 -05:00
Dustin Carlino
bc856a4c2b
Fix the signal demand dash, broken by 1906fb0913
. And enable warp to ID for non-dev mode too.
2020-10-13 10:22:19 -05:00
Dustin Carlino
1906fb0913
Remove the GetDrawAgents indirection. Originally the UI could pull the
...
set of agents to draw either from the simulation or from this
"time-traveler" plugin, which would let you rewind sim time. That plugin
is long gone, and it never worked well, because much of the UI would use
the GetDrawAgents to select something, then query the live sim for lots
of details anyway. The plugin never served all of those calls, so the
results would be kind of out-of-sync anyway.
There are some parts of the UI that need to temporarily not draw agents.
Use the same suspended_sim trick that edit mode does.
2020-10-12 11:52:05 -05:00
Dustin Carlino
b9efdaef20
Refactor the trip timeline code, fixing the icon spacing. Temporarily
...
take out the delays from the timeline -- they complicate the code. Will
add back in later, once the code's a little more clear.
2020-10-11 11:35:00 -07:00
Dustin Carlino
a1c53d5e1c
Humble start to adjusting how distances and durations are printed in the UI. #331
...
Also trimmed out a few old UI settings; they kind of started as
experiments, but now the alternative feels useless to maintain.
2020-10-11 10:45:13 -07:00
Dustin Carlino
a2d36274a2
Prep for release [rebuild]
2020-10-10 13:11:11 -07:00
Dustin Carlino
1791ef70a5
More cleanup of https://github.com/dabreegster/abstreet/pull/363 : fix the build break in info/trip
2020-10-10 12:31:52 -07:00
Dustin Carlino
e38858129b
Cleanups after https://github.com/dabreegster/abstreet/pull/363 :
...
- cargo +nightly fmt
- upload new prebaked data
2020-10-10 12:24:42 -07:00
Sam
4c5a858238
Delay highlighting ( #363 )
...
* Initial storing of intersection delays
* Initial highlighting of delays on route
* Added label of delay
* Info overlay works
* Added supoprt for pedestrian delays (only intersection delay currently)
Bike also works, but is treated as a car, so the avg speed is flagged as very slow (Needs fix)
* Capitalised describe trip phase
Now uses min of (speed limit and vehicle max speed) for the maximum speed check
Added trip blocked time query
Lots of work on tool tips
Icons are broke
* Nearly complete, just fmting and a crash to fix
Color assertion?
* Fixed text font colour crash
Added new custom TextSpan size function
* Cargo +nightly fmt
* Cargo +nightly fmt
* Clion auto import formatting
Doesn't quite match the existing "changes"
* Fixing merge issues
* Fixing icon placement issues
* Requested changes (Part 1)
* Requested changes (Part 2)
Co-authored-by: Sam <a>
Co-authored-by: Dustin Carlino <dabreegster@gmail.com>
2020-10-10 12:23:02 -07:00
Dustin Carlino
94449e49e0
Launch the web version! #21
2020-10-09 22:55:13 -07:00
Dustin Carlino
34e95dd861
WIP load scenarios
2020-10-09 22:31:31 -07:00
Dustin Carlino
d4358586d6
Refactor the MapLoader into a more generic file loader...
2020-10-09 17:26:11 -07:00
Dustin Carlino
fbf651f1c2
Give up on generic_prebake_all, an unused method that would very generically crawl all challenges, calculate their scenario, and prebake results for them. It forces GameplayMode -> Scenario to have a certain form, which seemingly blocks transitioning to an asyncish loading screen.
2020-10-09 16:36:31 -07:00
Dustin Carlino
be3b2e8abb
Finally, cut over the last app.switch_map caller
2020-10-09 16:27:28 -07:00
Dustin Carlino
2cd59ead37
Remove the special handling for synthetic maps, which were JSON RawMaps
...
that could directly be loaded. The few examples have been long broken
and unused. They complicate map loading, because they have a weird path.
2020-10-09 16:08:11 -07:00
Dustin Carlino
3feb9d6dbe
Make the proposals picker use the new map loading mechanism
2020-10-09 15:57:20 -07:00
Dustin Carlino
03eac377d6
Convert ScreenshotTest away from app.switch_map
2020-10-09 15:07:35 -07:00
Dustin Carlino
2ad832d01a
Whittle down callers of app.switch_map: changing color scheme. (As a
...
bonus, now this doesn't reset the sim and everything!)
2020-10-09 14:51:35 -07:00
Dustin Carlino
a8b41370bc
Refactor the CityPicker HTTP trick into a native/web loading screen
...
state for switching maps. Use it just from the CityPicker for the
moment...
2020-10-09 14:35:02 -07:00
Dustin Carlino
e4707ca223
Ehem, fix build break in web from last commit. Hard to test a single commit against both native/web, because switching targets clears the entire build cache...
2020-10-09 14:04:56 -07:00
Dustin Carlino
1ae4c6e41f
Make the web CityPicker do all of the same stuff that app.switch_map does
2020-10-09 14:02:08 -07:00
Dustin Carlino
1de7065562
Move a few things from App down to PerMap: layer, suspended_sim,
...
prebaked
2020-10-09 13:50:30 -07:00
Dustin Carlino
906dc0a8e5
Rearrange responsibilities of App::new and PerMap::new, to prepare for
...
cleaning up switch_map
2020-10-09 13:35:51 -07:00
Dustin Carlino
dd0df29571
Suppress the trip summaries tab if we have no prebaked data to compare to
2020-10-09 13:04:36 -07:00
Dustin Carlino
b9d3052c87
Show the elapsed time in the web loading screen, to kind of reassure people things aren't frozen
2020-10-09 09:14:24 -07:00
Dustin Carlino
7236fa558f
Fix clicking on regions in citypicker. #21
2020-10-08 17:02:08 -07:00
Dustin Carlino
17416d9fd6
Start deploying the web build to s3... #21
2020-10-08 16:29:06 -07:00
Dustin Carlino
31854344ec
Proper loading screen for web. #21
2020-10-08 15:07:23 -07:00
Dustin Carlino
62b3af324b
Bundle data/MANIFEST.json in wasm. Now loading all maps from HTTP works! #21
2020-10-08 14:41:02 -07:00
Dustin Carlino
4d66e4e91d
Make the city picker list maps from the manifest, not local files. #21
2020-10-08 14:26:35 -07:00
Dustin Carlino
d1d1d1532c
Silence warnings when compiling wasm
2020-10-08 12:26:54 -07:00
Dustin Carlino
64bc4ee318
On the web, load different maps by making asynchronous HTTP calls. #21 ( #364 )
...
* On the web, load different maps by making asynchronous HTTP calls. #21
This is a very strange, specializd approach; it's unclear how it'll
generalize to reading scenarios and prebaked results. Ideally we could
call abstutil::read_binary as we currently do and somehow hide this async
trickery underneath, but I'm not sure how yet. In the meantime, this
moves us forward with the hack well-contained.
Next steps for web: stop bundling in all of data/system in the .wasm,
now that we can load from HTTP.
2020-10-08 10:51:13 -07:00
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
Michael Kirk
2ed916e89f
show parking intent ( #362 )
2020-10-07 14:16:58 -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
24c20e1599
Add a layer to visualize congestion caps. #325
2020-10-06 13:47:53 -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
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
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
Dustin Carlino
e5365254e9
Make load_all_objects IO-backend (native/web) agnostic
2020-10-05 14:48:34 -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
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
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
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
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
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
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
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
Dustin Carlino
371d26f707
Bring in alleyways from OSM! [rebuild] ( #351 )
2020-09-27 12:20:27 -07:00
Dustin Carlino
84891f8b96
Some map fixes to prepare for alleyways:
...
- Temporarily workaround snap_cycleways crash in Xi'an
- Fix interpretation of blank turn restrictions. https://www.openstreetmap.org/way/739621435 was missing a right turn, which was causing vehicles to do this crazy loop to go from Madison EB to Lake Wash SB.
- Ignore turn restrictions when they don't match the number of lanes. https://www.openstreetmap.org/way/428090702 and similar need some updating.
Regenerate all data, but give up on lakeslice running fully. Going to
sacrifice that one for a bit to get new roads imported.
2020-09-27 11:21:35 -07:00
Dustin Carlino
4916b10190
Small style cleanups after #346 (Import grouping, simplify Spinner logic)
2020-09-27 10:26:38 -07:00
NoSuchThingAsRandom
0921a4aae5
Pedestrian crossing time ( #346 )
...
* Fixed ui being able to select traffic light times that are shorter than the time it takes to walk across the crosswalk
* Fixing operands and renaming
* Fixed spinner out of bounds issue
Traffic light generation now, ensures that there is enough time to cross the crosswalk
And enforces the minimum time duration
* Cargo +nightly fmt
* Request fixes: https://github.com/dabreegster/abstreet/pull/346
Still need some things to clarify:
Spinner checks on increment/decrement
Calling enforce_minimum_crosswalk_time inside get_possible_policies, requires the removal or modification of the validation function
* Moved enforce_minimum_crosswalk_time inside get_possible_policies
Now runs stage_time_validation at the end of get_possible_policies and removes invalid policies
Could do the same with the validation function as well?
* Fixing import order
* Fixed ui being able to select traffic light times that are shorter than the time it takes to walk across the crosswalk
* Fixing operands and renaming
* Fixed spinner out of bounds issue
Traffic light generation now, ensures that there is enough time to cross the crosswalk
And enforces the minimum time duration
* Cargo +nightly fmt
* Request fixes: https://github.com/dabreegster/abstreet/pull/346
Still need some things to clarify:
Spinner checks on increment/decrement
Calling enforce_minimum_crosswalk_time inside get_possible_policies, requires the removal or modification of the validation function
* Moved enforce_minimum_crosswalk_time inside get_possible_policies
Now runs stage_time_validation at the end of get_possible_policies and removes invalid policies
Could do the same with the validation function as well?
* Fixing import order
* Moving stage validation inside validation function
Co-authored-by: Sam <a>
2020-09-27 10:21:30 -07:00
Dustin Carlino
2ddd9a62ff
Cleanups for #346 :
...
- Add Distance::min()/max()
- Bring in log crate everywhere
- Consolidate traffic signal validation
2020-09-26 10:11:08 -07:00
Dustin Carlino
5a3bee0264
A first attempt to snap separately mapped cycleways to main roads. Emit ( #348 )
...
an extra KML file during importing to debug; don't bring into the main
map yet. #330
Not regenerating yet
2020-09-25 15:22:47 -07:00
Michael Kirk
f0be8dc0f0
Coalesce render flavors ( #349 )
2020-09-25 15:09:18 -07:00
Michael Kirk
e19bb42492
Clean up "trips" (info/person.rs) ( #347 )
...
* center pill
* padding insets
* use disclosure glyph instead of unicode arrows
2020-09-25 13:05:32 -07:00
Dustin Carlino
0f78920aeb
Start overhauling th trip summary page. #331
2020-09-25 11:55:07 -07:00
Michael Kirk
241d2faad3
Apply a few more pop_up buttons
...
...rather than formatting text w/ unicode arrows
Addendum to 452fb06ae
2020-09-25 09:47:08 -07:00
Michael Kirk
00fb0ef8cd
Cleanup dropdown - stop using unicode "down arrow"
...
We were drawing "pop-up" style buttons in several places, using
copy/pasted logic - which was simple enough when using a unicode glyph.
But we want to use a different glyph which isn't in our font. Further,
using an svg like this gives us finer grained control around the layout
around the button "handle" than we could get with just space characters.
2020-09-24 19:12:39 -07:00
Dustin Carlino
119e887425
New dashboard picker. #331
2020-09-24 10:40:18 -07:00
Dustin Carlino
597ef473f2
Upgrade most dependencies
2020-09-24 09:36:26 -07:00
Dustin Carlino
de86258402
Inch towards new trip table design: hover color, move pagination controls. #331
2020-09-23 14:03:08 -07:00
Dustin Carlino
d77271f9d8
Export trip times to CSV [rebuild]
2020-09-23 13:06:22 -07:00
Dustin Carlino
fa0c5ee02c
Multiple lane type transformations in bulk edit. #331
2020-09-23 11:55:19 -07:00
Dustin Carlino
6f110d9e7f
Add unfinished trips table. #331
2020-09-22 16:18:03 -07:00
Dustin Carlino
530a9ee4e4
Add a dashboard showing cancelled trips. Further refactor trip table
...
states along the way. #331
2020-09-22 14:16:51 -07:00
Dustin Carlino
f57bd57ac3
Avoid crashing for underground isometric buildings
2020-09-22 12:35:57 -07:00
Dustin Carlino
023bee5954
Simplify the parking table using the new API. Closes #53
2020-09-22 12:13:06 -07:00
Dustin Carlino
6a13ec0841
Refactor the trip table and parking overhead table into a generic table
...
API, with sorting, filtering, and pagination. This will be invaluable
when implementing more tables and the new table style (see Figma for
both). #53
2020-09-22 12:13:06 -07:00
Michael Kirk
848251fca4
use osm data for actual building height ( #340 )
2020-09-22 11:59:50 -07:00
Michael Kirk
59fec852a8
fix "don't draw" option for jump-to-delay ( #339 )
2020-09-21 13:42:01 -07:00
Dustin Carlino
31d888024b
Display the 3 categories of trips in the table differently. Not
...
clickable yet. #331
2020-09-21 12:57:10 -07:00
Michael Kirk
8042ad414f
fix building overlap for isometric view (mostly) ( #338 )
2020-09-21 11:54:39 -07:00
Dustin Carlino
8e32314979
Style the loading screen and add tips/news. Closes #180 [rebuild]
2020-09-20 13:02:27 -07:00
Dustin Carlino
990aa74d03
More ways to find signal demand dash. #331
2020-09-20 10:18:18 -07:00
Dustin Carlino
4a07164394
Add the concept of trip purpose. Seed it from Soundcast data, or assign
...
it for the prolet robot model. Expose it in the trip info panel.
Total scenario size from 385MB to 412MB, but that's not so bad, and this
seems worth it.
2020-09-19 13:02:36 -07:00
Dustin Carlino
bb3342de27
Individual hitboxes for multiple signals in the sidebar. #331
2020-09-19 11:52:15 -07:00
Dustin Carlino
3c11dca9ba
Remove the selection outline on the side panel when hovering on the map. About to flip the direction of this. #331
2020-09-19 11:17:25 -07:00
Dustin Carlino
3cc6a8ce12
And finally, a UI to tune offset between two signals! [rebuild]
2020-09-19 11:10:45 -07:00
Dustin Carlino
8170faa03c
Start a UI to display absolute signal offsets and offsets relative to one chosen intersection
2020-09-19 11:10:45 -07:00
Dustin Carlino
08805f6a32
Rip out the old signal offset UI first.
2020-09-19 11:10:45 -07:00
Dustin Carlino
57e5183c2c
Make signal demand explorer much nicer, with selectable movements. #331
2020-09-19 10:51:27 -07:00
Dustin Carlino
83ff6db16c
Improve the signal demand dash with keys to change hour. And slightly
...
refactor styled keys in text.
2020-09-19 10:18:23 -07:00
Dustin Carlino
94eaa7010d
Slightly improve current demand panel by adding outlines to all unselected arrows
2020-09-18 23:06:48 -07:00
Dustin Carlino
15af3846b1
Round driving costs for pathfinding more carefully. When we create
...
uber-turns (sequences of turns through a few intersections) due to OSM
turn restrictions, we have to be a little careful how we sum up the cost
for the entire sequence, only rounding at the end.
2020-09-18 15:39:35 -07:00
Dustin Carlino
66ee865ad1
Debug uber-turns by showing their cost in the viewer
2020-09-18 14:13:11 -07:00
Dustin Carlino
d9e50a7e38
Use .into() for specifying keys to widgetry more ergonomically. #253
2020-09-18 09:26:14 -07:00
Dustin Carlino
2f66a714d8
Adjust file naming dialog. Don't allow overwriting files at all. #331
2020-09-18 08:50:52 -07:00
Dustin Carlino
987f76ebdb
Adjust signal editor arrow colors. #331
2020-09-18 08:30:25 -07:00
Michael Kirk
2b36b9f03a
add textured theme ( #335 )
2020-09-18 07:43:05 -07:00
Michael Kirk
cb84b729f6
FancyColor -> Fill ( #334 )
2020-09-17 23:34:25 -07:00
Dustin Carlino
16ed4ca457
Use crosswalk icons in the editor. #331
2020-09-17 18:42:20 -07:00
Dustin Carlino
69622bb86d
Overhaul traffic signal editor. Movements can be directly clicked now;
...
the turn icons (now circles) are just for currently banned turns. #331
[rebuild]
Still a little work left (tuning arrow styles and using special icons
for crosswalks), but this mostly seems to match Yuwen's design.
2020-09-17 17:21:36 -07:00
Dustin Carlino
60cb96bc91
Just detangling code in draw_signal_stage...
2020-09-17 15:31:28 -07:00
Dustin Carlino
f59b738692
Simplify traffic signal rendering before big turn icon overhaul by
...
removing some older styles.
2020-09-17 15:06:35 -07:00
Dustin Carlino
ddb933d682
Fix active traffic crash, due to the polygon being too detailed [rebuild]
2020-09-17 10:58:01 -07:00
Michael Kirk
08f330cfad
track worker capacity of commercial buildings
2020-09-16 16:43:11 -07:00
Dustin Carlino
2e6e338b98
New bulk lane edit UI. #331
2020-09-16 16:07:48 -07:00
Dustin Carlino
6e10f40801
Overhaul lane editor UI. #331
2020-09-16 12:32:11 -07:00
Dustin Carlino
da287ae68f
Discard changes from traffic signal editor. #331
2020-09-16 11:50:57 -07:00
Dustin Carlino
3dcdb9ec02
Update OSM data (and fix the stage icon)
2020-09-16 10:29:51 -07:00
Dustin Carlino
1331b629aa
Track how long cars have been parked in one spot
2020-09-16 09:42:02 -07:00
Dustin Carlino
4beff2b7bf
Fix some zero-length paths in the parking efficiency layer. #329
2020-09-16 08:47:40 -07:00
Dustin Carlino
5ca884eedd
Filling out the UI
2020-09-15 13:27:56 -07:00
Dustin Carlino
fcc05afda7
Add a flag to use the infinite parking sim. Start to test for real...
2020-09-15 13:27:56 -07:00
Dustin Carlino
7bd1d937f9
Some of Yuwen's cosmetic traffic signal editor changes
2020-09-15 09:32:46 -07:00
Dustin Carlino
4d6fc18c26
Woops, fix edit mode crash from previous commit
2020-09-14 18:06:25 -07:00
Dustin Carlino
ac3bc51af2
Restore the traffic signal stage indicator
2020-09-14 18:02:53 -07:00
Dustin Carlino
fff75fa5ba
Yuwen's new changelist UI (except for describing some of the changes in detail)
2020-09-14 17:40:04 -07:00
Dustin Carlino
d68273086b
Autosave even the untitled edits!
...
Possibly when the player explicitly says "discard proposal", we should
actually delete the file.
2020-09-14 14:25:09 -07:00
Dustin Carlino
0a3479a3d0
Implement the new file management part of Yuwen's edit mode sidebar UI.
...
Some bugs introduced when working with the default untitled proposal.
About to change the behavior of that in the next commit.
2020-09-14 13:58:12 -07:00
Dustin Carlino
ce4e429648
Rename edits -> proposals, at least in the UI layer.
2020-09-14 12:52:06 -07:00
Dustin Carlino
ec28132286
Implement Yuwen's split jump to time/delay UI [rebuild]
2020-09-14 10:28:25 -07:00
Dustin Carlino
8b7cb7a601
Split code for speed / time warp controls
2020-09-14 09:40:43 -07:00
Dustin Carlino
faf1379062
Add a new experimental layer to show the distance between every parked car and its owner
2020-09-14 09:18:24 -07:00
Dustin Carlino
f3a04b4d96
Add 4 configurable isometric camera views for buildings, disabled by default.
2020-09-13 21:36:45 -07:00
Dustin Carlino
e5bb98511a
Few adjustments to KML viewer to make it easier to deal with huge .kml files
2020-09-12 10:06:04 -07:00
Dustin Carlino
037e22e69e
Cleanup last few things for left-hand maps. Fixes #311 !
2020-09-11 14:17:31 -07:00
Dustin Carlino
033b20f004
Fix parking rendering for left-hand maps. Tested by temporarily forcing
...
some onstreet parking in London. #311
2020-09-11 14:09:45 -07:00
Dustin Carlino
d88ccf98b7
Make pedestrians walk on the left side of the sidewalk in the UK. #311
2020-09-11 13:55:26 -07:00
Dustin Carlino
d56d1fd0e3
Show trips affected by congestion capping in the trip table and info
...
panels
2020-09-11 11:21:39 -07:00
Dustin Carlino
2895d50a1e
Add tooltips to the agent meters, and stop showing both buses and passengers. Fixes #239 ( #323 )
2020-09-11 11:08:26 -07:00
Dustin Carlino
edbc674970
Fix stop sign placement for left-handed maps. #311
2020-09-11 11:03:59 -07:00
Dustin Carlino
bee5890212
Remove the purple parking agents from the unzoomed view. Instead, add them to the parking layer, so supply and demand can be seen in the same place. ( #322 )
2020-09-11 10:04:10 -07:00
Dustin Carlino
e1270a1338
Make trip timeline phases hoverable with a tooltip, but not be a clickable button
2020-09-10 16:54:30 -07:00
Dustin Carlino
0cc1c654d1
Allow selecting multiple traffic signals when unzoomed, and show the
...
number of signals selected.
2020-09-10 16:15:42 -07:00
Dustin Carlino
1388694eec
Flag off the live map edits, since it's going to take lots more work to stabilize this, but git branches are scary to maintain for more than a few days. #312
2020-09-09 15:03:14 -07:00
Dustin Carlino
220f33e2ec
Abort cars bound to park on edited lanes. #312
2020-09-09 15:03:14 -07:00
Dustin Carlino
39290f899c
Handle some of the live changes to parking by deleting parked cars on
...
edited lanes. #312
2020-09-09 15:03:14 -07:00
Dustin Carlino
61acf25b8e
Initialize intersections converted live to traffic signals. #312
2020-09-09 15:03:14 -07:00
Dustin Carlino
d8011a90f4
Handle live edits by just aborting any current trips that cross an
...
edited road or closed intersection. #312
Along the way, refactor more context plumbing in DrivingSimState.
2020-09-09 15:03:14 -07:00
Dustin Carlino
39ab06df7d
Prepare for editing the map live in all cases by making the UI changes. #312
2020-09-09 15:03:14 -07:00
Dustin Carlino
5c6e781016
Collapse a few more of the Transitions
2020-09-07 10:49:20 -07:00
Dustin Carlino
0b9b7e1a65
Fix a crash opening challenge modes. If somebody hits this in the latest
...
release, will put out a new build
2020-09-07 10:26:57 -07:00
Dustin Carlino
5be4c2ca84
Add an API to add a new trip in the middle of the simulation. Fixes #313
...
[rebuild]
2020-09-06 13:53:31 -07:00
Dustin Carlino
65e07d9cc7
Read/write scenarios in JSON, so people can manipulate them in any language. #313
2020-09-04 10:57:52 -07:00
Dustin Carlino
38ba8d55f3
Produce proper lanes for left-hand driving by intervening at the LaneSpec layer for #311 . Since London looks reasonable, opt it into the screenshot tests
2020-09-04 10:01:06 -07:00
Dustin Carlino
f610c66572
Remove the weird shifting/angle inversions from DrivingSide. First step
...
of #311 . Tested to not break righthand maps.
2020-09-04 10:01:06 -07:00
Dustin Carlino
787b6046b6
Remove the RAM measurement utility. Only work on Linux, I'm not convinced it's correct, and the information isn't useful to see
2020-09-03 17:19:40 -07:00
Dustin Carlino
574bf99e17
WIP
2020-09-03 16:36:47 -07:00
Dustin Carlino
fbd3a603dc
Dodge a traffic signal rendering crash encountered near Trafalgar Square
2020-09-03 16:12:52 -07:00
Dustin Carlino
4576e9c1d0
Start importing a tiny slice of London, to start working on left-hand driving again
2020-09-03 16:09:17 -07:00
Dustin Carlino
74aca40c0c
Mechanicallyish rename TurnGroup -> Movement for #197 , as decided in ( #306 )
...
https://github.com/dabreegster/abstreet/pull/302#discussion_r479571931
2020-08-29 15:18:54 -07:00
Michael Kirk
f58b60d7f1
timewarp restores last picked halt_limit ( #305 )
2020-08-28 17:20:50 -07:00
Dustin Carlino
a36ef99c06
Rename Phase -> Stage, to be more in line with standard traffic signal ( #302 )
...
controller terminology. Part of #197 .
Holding off on touching PhaseType and all of the serialized
seattle_traffic_signals format, since this will all change in Kyle's PR
anyway.
2020-08-28 17:19:23 -07:00
Michael Kirk
b861bec515
avoid jiggle in warp screen ( #303 )
2020-08-28 16:45:45 -07:00
Dustin Carlino
00840f1bbc
Now that @michaelkirk figured out how to preserve space, use it in a few more places in the UI. There are a few remaining places in the tutorial that use "- ", but I think the bullet point style is reasonable there. Maybe a Unicode dot would look better.
2020-08-28 16:35:10 -07:00
Michael Kirk
db5b1622ad
preserve whitespace ( #304 )
...
* maintain whitespace in text (except trailing)
Note, until https://github.com/RazrFalcon/resvg/issues/317 is addressed,
trailing space does not affect the size of the text bounding box.
* remove space-holders now that spacing is preserved
2020-08-28 16:26:00 -07:00
Michael Kirk
b67701c414
show sim time and speed ( #301 )
2020-08-28 14:37:40 -07:00
Michael Kirk
e5620aeb10
configurable "jump to delay"
2020-08-28 13:20:05 -07:00
Dustin Carlino
696c6c6d9e
Fix crash in edit mode
2020-08-27 19:38:54 -07:00
Dustin Carlino
de6a12e472
After much deliberation, rename Composite -> Panel ( #253 )
2020-08-27 12:12:44 -07:00
Dustin Carlino
2935d2379b
Mechanical rename of ezgui -> widgetry, a much better name to enchant the Rust community. #253 [rebuild]
2020-08-27 10:37:04 -07:00
Dustin Carlino
57b5791f1f
Refactor a helper to produce EditCmd::ChangeRoad. Looked at doing the
...
same for ChangeIntersection, but not sure it's worth it.
2020-08-27 10:25:18 -07:00
Dustin Carlino
e283b8944a
Restore the ability to see individually changed lanes. Give up on the
...
"revert" button for lanes; it was always kind of confusing.
2020-08-27 09:36:00 -07:00
Dustin Carlino
1c98dd55b7
Simplify original_roads by recomputing from OSM data
2020-08-27 09:36:00 -07:00
Dustin Carlino
b6ab06d51a
Remove the old EditCmds. Realizing the new ChangeRoad does have some
...
gaps with detecting changes to individual lanes in the UI, though...
2020-08-27 09:36:00 -07:00
Dustin Carlino
30bfe93b5c
Produce the new EditCmd::ChangeRoad in the UI. Tested the scenario that
...
caused #113 (change lane types, reverse some lane, save edits, load from
scratch) -- now it works!
2020-08-27 09:36:00 -07:00
Dustin Carlino
aacb17297d
Introduce a consolidated EditCmd::ChangeRoad. Unused so far, and not
...
handling backwards compatibility yet. One step towards fixing #113 and
2020-08-27 09:36:00 -07:00
Dustin Carlino
59b14426bb
Improve shared left turn lane markings and reorg some docs
2020-08-26 12:35:29 -07:00
Dustin Carlino
8b7ad86647
Regularly import Tel Aviv!
2020-08-26 10:25:45 -07:00
Dustin Carlino
8c1686c25f
Add a tool to screenshot all of the maps currently under diff testing. This tiny bit of automation saves me some manual labor.
2020-08-26 09:41:03 -07:00
Dustin Carlino
95c43f8e1c
Finally replace the underlying storage in Road
2020-08-25 12:08:54 -07:00
Dustin Carlino
376cf1292a
And more. Now all the deprecated stuff is locked down to map_model, and
...
it's pretty much related to map construction and edits
2020-08-25 12:08:54 -07:00
Dustin Carlino
b6a4657dbb
Whittle down more deprecated Road stuff
2020-08-25 12:08:54 -07:00
Dustin Carlino
aa3bd5073b
Make some new methods on Road to handle child lanes from left-to-right,
...
not split by direction. Update many callers, and lock down the
visibility of the old methods.
Tested a few maps manually to make sure there's no behavioral diff. Only
problem right now is the z-order of adjacent lanes covering up half of
the white stripe sometimes. Have some ideas to fix that later, and not
_super_ important in the meantime.
2020-08-25 12:08:54 -07:00
Dustin Carlino
4005adecf8
Refactor: create a Direction enum, in preparation for two-way cycletracks on one side of a road.
2020-08-24 13:30:13 -07:00
Dustin Carlino
b41b52d7bd
fix crash in debug mode when opening info panels
2020-08-24 09:01:27 -07:00
Dustin Carlino
6b7747c37a
Overhaul lane markings:
...
- Cut off the one-way markings before the end of the road, to stop stomping over turn markings
- Draw turn arrows to every road, not each lane
- Only draw turn arrows when a lane is restricted from going to some
outbound lane. At most intersections, all turns are legal, so don't draw
anything.
[rebuild]
2020-08-23 12:00:25 -07:00
Dustin Carlino
0fd40bd04e
Explicitly mark buildings with private off-street parking from OSM. 2ebf463635
added parking icons to all buildings with > 10 spots, but this makes the downtown map look ridiculous. The intention was to show the tagged buildings, so just go do that.
2020-08-23 11:09:00 -07:00
Dustin Carlino
6250cb8393
Be more specific about access restrictions in info panel. For capped roads, print the value and current counter.
2020-08-23 09:41:12 -07:00
Dustin Carlino
ca8af784c7
Add an explicit version number to the edits schema
2020-08-23 09:22:41 -07:00
Dustin Carlino
83c0a31e62
show roads with changed access restrictions in edits layer
2020-08-22 20:27:04 -07:00
Dustin Carlino
66151e8aa4
Dump route goldenfiles during the smoke-test, so that it's run when all
...
data is regenerated. (Ideally screenshots would also be automated, but
that's a little trickier.)
_NOW_ regenerate all data! The only diff anywhere is the binary map
format, so there's confidence the last few commits haven't changed
anything.
2020-08-22 10:53:05 -07:00
Dustin Carlino
11832aa606
Record throughput through a traffic signal by direction, expose through
...
the API (#245 ), and beef up the Python example.
Impact to prebaked file size is tiny -- for lakeslice, the original
intersection_thruput is 2MB and the new traffic_signal_thruput is 435KB.
[rebuild]
2020-08-22 09:13:16 -07:00
Dustin Carlino
5b2a548c93
When regenerating all map data, make sure proposals still work. Lo and
...
behold, I've broken two of them by updating OSM!
2020-08-21 15:49:28 -07:00
Dustin Carlino
ad423b22e9
Remove the glium backend, now that @michaelkirk has gotten the glow native/wasm backends ship-shape. Got rid of the glutin fallback behavior for now; need to ideally upstream something there for #103
2020-08-20 16:59:54 -07:00
Dustin Carlino
fa83554eb4
Consolidate code for loading edits from JSON
2020-08-20 16:33:08 -07:00
Dustin Carlino
084b9d74cd
Store delay for traffic signals per direction of travel, using a compressed representation of turn groups. No substantial increase in prebaked file size.
2020-08-20 16:21:52 -07:00
Dustin Carlino
14c66c5528
A humble start to a Percent type for #274 . There are so many places to
...
use it; just start a few in ezgui. Also a good time to object to the API
so far.
2020-08-20 11:01:59 -07:00
Dustin Carlino
2c5bbd3e7e
Use alternate language building names and amenities, when available. Fixes #271 .
...
Tested in Shinjuku. No substantial file size increase for any maps.
2020-08-20 10:39:28 -07:00
Dustin Carlino
f31c4ec7fb
New tool to union two scenarios. One use case is manually defining some
...
new trips, then seeing the impact they'll have on the normal weekday
scenario. So how much externality would be caused by a bunch of new
trips if some building is built?
Demo showing the whole flow: https://youtu.be/adpED0KGQ7Q . Why do those
few trips at the beginning impact some later trips so much? Who knows.
Likely parking spots get gobbled up.
2020-08-19 17:49:39 -07:00
Dustin Carlino
24a8d4a836
Prepare to support capping the number of vehicles that can pass through
...
a zone per hour. This is part of support for some kind of congestion
charging experiments. This step just rearranges the data to define the
cap and makes a UI to edit it. Not enforcing the cap yet.
2020-08-19 17:46:40 -07:00
Dustin Carlino
2ebf463635
Handle buildings tagged as parking garages in OSM.
2020-08-19 17:19:54 -07:00
Dustin Carlino
d427893843
Model parking lots with extra un-renderable spots. This fixes #150 , lots
...
without aisles, and #265 , multi-story garages.
2020-08-19 17:19:54 -07:00
Dustin Carlino
71ab485022
Attempt curved road labels for #173 . Two issues left before enabling it:
...
- Need to draw a background underneath the curved text
- Sometimes the text is "upside-down" relative to what's expected; we
should be able to reverse the polyline sometimes to deal with that. But
when?
2020-08-19 13:43:36 -07:00
Dustin Carlino
8f258b33a6
Add dev-mode buttons to open OSM objects for buildings and parking lots too. Noticed they were missing while working on #271
2020-08-19 11:43:27 -07:00
Dustin Carlino
6749edb2b6
Change language of roads via settings, for #271
2020-08-18 17:32:49 -07:00
Dustin Carlino
9a350b7568
Regularly import Xi'an
2020-08-17 19:37:34 -07:00
Dustin Carlino
b75867f0c2
Implement Yuwen's interactive signal demand UI, fixing #277
2020-08-17 15:31:36 -07:00
Dustin Carlino
7d460f27c8
squish_polygons_together infinite loops sometimes. until a proper fix, just limit it to 100 relaxations
2020-08-16 08:36:00 -07:00
Dustin Carlino
a6520b26c0
Omit trip timeline buttons to jump to the beginning/end of a trip in freeform mode. When you reset there, the sim is empty; there's no scenario. So it'll just crash, because the person doesn't exist.
2020-08-15 11:14:13 -07:00
Dustin Carlino
a70131b629
While hovering on turn icons in map-space, highlight the intersection and offset in the side panel to help orient. Little laggy, but worth it...
2020-08-15 11:04:22 -07:00
Dustin Carlino
3623296548
Improve rendering of multiple traffic signals in the side-bar by
...
"compressing" empty space between intersections. The result is a little
unexpected sometimes, but it's an improvement over the previous thing.
@michaelkirk suggested a variation in Slack that I'll try soon.
2020-08-15 10:40:15 -07:00
Dustin Carlino
100d126d62
Also lazily render road center-lines. London from 42s down to 32s
2020-08-14 20:57:46 -07:00
Dustin Carlino
49ea9f2d54
Faster London:
...
- wire up the flag to skip building contraction hierarchies in one-shot
importer. 406s to import london without, 230s by skipping CH
- lazily render zoomed parking lot details. 72s and laggy X11 mouse
before, 42s and no GPU melting after
- add my script for stress-testing the importer
2020-08-14 20:50:22 -07:00
Dustin Carlino
5bede4aca2
Start some initial UI for tuning offset of multiple intersections
2020-08-14 20:50:13 -07:00
Dustin Carlino
3f86af0dc0
Add back some primitive control for signal offset at a single
...
intersection. Interpret the value in the simulation layer again (it was
removed around bb3da1f8eb
or so due to
being unused).
2020-08-14 20:50:13 -07:00
Dustin Carlino
e6c1d960ec
In traffic=none mode, allow recording (most of) the manually specified
...
trips as a Scenario to later re-run. This is useful for quickly defining
"test cases" for development, and it's a start to a UI for letting
players specify (and eventually share) traffic patterns they define.
2020-08-14 18:53:39 -07:00
Dustin Carlino
377e154a1c
Refactor the Transition enum, collapsing enum variants that were
...
combining primitive transitions into sequences.
Brief context on the state/transition system: The game crate is
organized as a stack of states, with the topmost one being active.
Transitions manipulate this stack. For example, the stack might look
like: [main menu, sandbox mode, edit mode, traffic signal editor, signal
picker]
2020-08-14 14:38:50 -07:00
Dustin Carlino
b8e9155ada
Adjust picker UI
2020-08-13 15:12:03 -07:00
Dustin Carlino
340d61d33e
Refactor how signal editor applies a single new change
2020-08-13 15:12:03 -07:00
Dustin Carlino
92a7279a44
Just warn when lining up phases for multiple signals. Not sure what the
...
UX should look like for undoing the synchronization.
2020-08-13 15:12:03 -07:00
Dustin Carlino
06c7beb369
Proper UI for picking multiple traffic signals to edit together
2020-08-13 15:12:03 -07:00
Dustin Carlino
d7eb07502b
Reorganize signal editor code into some submodules
2020-08-13 15:12:03 -07:00
Dustin Carlino
91f0076d35
Remove the old TrafficSignalEditor, cut over to the new variant for both individual and multiple signals
2020-08-13 15:12:03 -07:00
Dustin Carlino
dcc7ff9e72
Add back the "Edit entire signal" menu, only when editing one
...
intersection.
2020-08-13 15:12:03 -07:00
Dustin Carlino
c84833feb4
More steps on the multi-signal editor, adapted from the old editor:
...
- Add a header to the side panel
- Prevent leaving the editor with missing turns
- Apply edits properly when leaving
2020-08-13 15:12:03 -07:00
Dustin Carlino
11cefb118a
And the same thing for OriginalIntersection
...
Actually, don't need to regenerate map data. Thanks to the magic of
zero-cost wrapper types, the binary format is the same.
2020-08-13 11:48:13 -07:00
Dustin Carlino
843d24b6ed
Refactor: OriginalBuilding should just be OsmID. The purpose of
...
OriginalBuilding was to refer to buildings in a stable way across
different maps and across OSM updates. Recently, OsmID and friends
appeared. The double layer of wrapping is an annoying API.
Not regenerating map data yet; about to do the same thing for
OriginalIntersection
2020-08-13 11:37:06 -07:00
Dustin Carlino
f70d01626f
Fix bug introduced in 9ce7ab1c88
. Don't
...
cache intersection_type in DrawIntersection; it changes when converting
stop signs<->traffic signals<->closed for construction.
2020-08-13 08:21:27 -07:00
Dustin Carlino
d9da24b3d1
Work around the initial window size being wrong by reseting the minimap
...
when the window is resized. This is a bit unexpected if done
interactively in-game, but not unreasonable.
This mostly fixes the issue that sometimes happens starting with --dev.
When the resize happens late on X11, the minimap looks initially better,
but still cut off horizontally. Zooming in and out fixes it. (Before,
even zooming in/out would keep it tiny, because base_zoom was never
reset.)
2020-08-13 08:15:21 -07:00
Dustin Carlino
ae18b09b3b
refactor separators
2020-08-12 16:46:11 -07:00
Dustin Carlino
9af8aafb44
now that we're drawing lots in the multi-sig editor, cache it
2020-08-12 15:50:23 -07:00
Dustin Carlino
e4a2f35bb0
glue more basic functionality to the multi-sig ed
2020-08-12 15:50:23 -07:00
Dustin Carlino
490471848a
copy over lots of the misc functionality to the new multi-signal editor
2020-08-12 15:50:23 -07:00
Dustin Carlino
ca501b7b80
initially synchronize all signals in a group
2020-08-12 15:50:23 -07:00
Dustin Carlino
5803e5721e
add turn icons to the new multi-signal editor
2020-08-12 15:50:23 -07:00
Dustin Carlino
c08e244d23
tiny start to a new multi-intersection traffic signal editor. just get
...
the left panel to display some kind of merged view
2020-08-12 15:50:23 -07:00
Michael Kirk
58d360668e
add glow feature
2020-08-12 15:44:48 -07:00
Michael Kirk
f7f4fd889e
consolidate screenspace and mapspace methods since they now behave the
...
same.
rg -l screenspace_svg | xargs sed -i .bak 's/screenspace_svg/load_svg/'
rg -l mapspace_svg | xargs sed -i .bak 's/mapspace_svg/load_svg/'
2020-08-12 15:44:48 -07:00
Michael Kirk
f42b7c003c
layout uses logical pixels, not physical
...
Previously it was not clear (to me at least) when a value used
in layout was in units of logical pixels vs physical pixels.
This lead to some ambiguity about where to scale values, and lead to
some values being scaled more than once or sometimes not at all, leading
to inconsistent layouts across DPI's.
The intent of this change is to solve this ambiguity by having the ui
clients work *exlusively* with logical pixels.
To achieve this, we consolidate all scaling to the graphics backend.
We translate all PhysicalPositions from the windowing libraries to
LogicalPixles.
Our own types: ScreenPt, ScreenDim, etc. are all in logical units.
In some places, I replaced passing raw floats with a corresponding
Screen* type to clarify that the units are in logical pixels.
2020-08-12 15:44:48 -07:00
Dustin Carlino
9ce7ab1c88
defer drawing intersections, same as lanes. faster startup time and melts my GPU less trying to load london and tokyo
2020-08-12 11:17:06 -07:00
Dustin Carlino
7a0dbb28b1
handle some rendering failures, getting new orleans to load
2020-08-12 09:47:35 -07:00
Dustin Carlino
a27b029ff6
plumb errors for shifting polylines through more APIs. mostly no-op for
...
now, just switched everything to must_* variants, but this paves the way
for handling failures.
... except for rendering pedestrian crowds -- I _think_ I saw a crash
from that, and it's easy to have a fallback there
2020-08-12 08:18:10 -07:00
Dustin Carlino
8568690a7a
stop the dropdown from jumping around when opening it while sim is running
...
(the bug: open population layer while sim is running, click the color
scheme dropdown)
2020-08-12 07:19:00 -07:00
Dustin Carlino
bc4c1eaea6
make Filler responsive to window resizing
2020-08-11 17:28:27 -07:00
Dustin Carlino
a370b6aac6
move the traffic signal details into a tab. specialize make_signal_diagram for editing.
...
this is a step towards editing multiple traffic signals at once, and a design that yuwen has suggested many times before
2020-08-11 12:00:49 -07:00
Dustin Carlino
e38814563a
cleanup storymap code after menu refactor
2020-08-11 11:26:06 -07:00
Dustin Carlino
7443f4ba98
detangle the way Menus communicate results, removing the Clone
...
requirement and finishing off InputResult
2020-08-11 09:10:16 -07:00
Dustin Carlino
0749a2ac7b
start keeping goldenfiles for bus routes, similar to the screenshot diff test. this will make it much easier to finish up bus matching without accidentally regressing somewhere
2020-08-10 16:03:04 -07:00