Commit Graph

6271 Commits

Author SHA1 Message Date
Michael Kirk
4f81f186af
embed mode and reworked web build system (#592)
* root element id from Settings, respect element size

* Plumb assets root via settings

* adapt crates to new wasm api

* more FileLoader cleanup

* use tsc bin from node_modules

* avoid spurious unlink errors

GNU Make considers the src/*/wasm_pkg targets as intermediate build
files and attempted to `rm` them. We can stop that my marking them as
`.PRECIOUS`

https://www.gnu.org/software/make/manual/html_node/Special-Targets.html

* `open` doesn't work on Linux

We could do something with xdg-open, but meh, not worth having platform
dependent logic for this.

* fix typo, clarify instructions

* make server compatible with older python install on linux

* revert change - we dont want to include music on web

the leading "-" means exclude a subdir of an included dir.

* better wrap of comments

* fix misfire in copy/pasted comment

* update docs
2021-04-01 19:31:02 -07:00
Dustin Carlino
20de91bae7 Also refactor walking speeds. #82 2021-04-01 15:03:20 -07:00
Dustin Carlino
892afddcd5 Refactor uses of biking speed between the sim and pathfinding, in preparation for incorporating incline. #82
(This was a bigger mess than I expected, so worth doing separately.)
2021-04-01 11:52:25 -07:00
Dustin Carlino
3c601b50c1 Clean up the trip table rectangular selection UI: #574
- explicit clear/apply buttons
- show start/end filters on the trip table preview
2021-03-31 16:35:56 -07:00
Dustin Carlino
0e86b94408 Make the start/end rectangular filter actually apply to the trip tables. #574 2021-03-31 16:35:56 -07:00
Dustin Carlino
c89e918fec Create a dummy widget to stash generic state in a Panel, and use it to plumb around the rectangular regions to the trip table filters. #574
The filter still doesn't make use of the regions yet.
2021-03-31 16:35:56 -07:00
Dustin Carlino
dff923b3e6 Make a tool to select a rectangular region. No way to pass back the
results yet. #574
2021-03-31 16:35:56 -07:00
Dustin Carlino
7f4f83d4e0 Refactor all of the places drawing start/goal markers on the map, and actually line up the tip of the icon with the position. 2021-03-31 14:23:16 -07:00
Dustin Carlino
afb962f73b Use the start/end markers in the interactive trip spawner. 2021-03-31 13:44:19 -07:00
Dustin Carlino
dc31e42c18 Add elevation data to all maps, now that the SRTM issues in elevation_lookups are fixed! #82
The results likely have some issues, but easier to iterate with them
baked in.
2021-03-28 21:52:54 -07:00
Dustin Carlino
371d459c8b new release 2021-03-27 16:09:36 -07:00
Dustin Carlino
7db3c6f951 Just triggering a [rebuild] [release] a bit early 2021-03-27 13:37:59 -07:00
Dustin Carlino
e3adb4702f Handle some changes to the elevation_lookups importing. #82 2021-03-27 11:45:55 -07:00
Dustin Carlino
3f1abda5e2 Use chevrons, not arrows, to point uphill, per discussion with Yuwen. #82 2021-03-27 09:25:06 -07:00
Dustin Carlino
ef7cbdcf48 Generalize LinePlot to handle any kind of X-axis, not just time. #82
Also split out some common code to a plots module. Fan charts and
scatter plots are still hardcoded to use Time as the X-axis and
duplicate lots of code, but this is a step towards refactoring
everything.
2021-03-26 12:07:21 -07:00
Dustin Carlino
73a31d1633 Add a line plot showing the elevation of the route taken by pedestrians
and cyclists. Add support for Distance as the Y axis of a LinePlot. #82
2021-03-26 12:07:21 -07:00
Dustin Carlino
00323925f3
Add a layer showing elevation using contours. #82 (#589) 2021-03-26 11:53:41 -07:00
Dustin Carlino
7a565f114f Adjust the steep streets panel: #82
- Move the steepest grade under the legend
- Use an arrow icon in the text
2021-03-26 11:40:01 -07:00
Dustin Carlino
05c9134e92 Stop using contraction hierarchies for trains / light rail. The graph is
always tiny; Dijkstra's is fine. It costs a bit of file size to store
it. The huge leeds map goes from 160MB to 157MB -- not crazy savings,
but something.

Also fix a slight bug with 92d3a890ea that
caused some pedestrians to uselessly visit a bus stop node while
routing. (southbank crashes a few hours in otherwise)
2021-03-25 20:45:57 -07:00
Dustin Carlino
fac9f8159d
Change the color scheme of the steep streets layer. #82 (#588) 2021-03-25 16:44:32 -07:00
Dustin Carlino
f0dba4b65c In the path cost debugger, show all roads with a cost less than the chosen route 2021-03-25 15:30:54 -07:00
Dustin Carlino
2c1c18d34a Upgrade glow 2021-03-25 15:23:13 -07:00
Dustin Carlino
c1ac3cf39d Make Polygon::from_geojson preserve rings. This fixes the WIP elevation contours. #82 2021-03-25 15:15:53 -07:00
Dustin Carlino
92d3a890ea
Express all pathfinding costs in units of seconds. #82, #494 (#587)
This is simpler to reason about, allows the penalty for entering a zone
or taking an unprotected turn to be expressed in terms of a time
penalty, and is a step towards adjusting bike/foot routing for elevation
data.

When we later add things like "safety/quietness" for cycling, maybe we
can switch to using a (time, quietness) tuple, and transform into a
single number with a linear combination parameterized by that agent's
preference for time/safety. This change is compatible with that future
idea.

There are behavior changes here, particularly for zones and unprotected
turns. No new maps start gridlocking, and in fact, Rainier starts
working again.
2021-03-25 12:59:36 -07:00
Dustin Carlino
4c2bc89438 Use Rust 1.51 to build. None of the new changes affect the codebase, though. 2021-03-25 09:02:04 -07:00
Dustin Carlino
ce473928fa Use u64 to describe number of bytes in the Manifest, now that we have a massive GeoTIFF in there that breaks wasm's 2^32 usize limit. #586 2021-03-24 21:23:38 -07:00
Michael Kirk
61c46461e4
PERF: lower memory requirements for clip_osm (#585)
* PERF: lower memory requirements for clip_osm

- don't accumulate things unless they are at least partially within the boundary
- accumulate id's, not entire objects.

This entails doing a second pass of the file, but keeps memory usage
much lower.

e.g. a largeish area of Los Angeles, covering east hollywood to downtown, clipped thus:
- north: San Fernando Blvd
- east: LA River east of Downtown
- south: the 10
- west: Western ave,

Before: importing the above stalled out for me during clipping, which
had ballooned into swap at more than 16GB.

After: in the above scenario, clipping peaks around 55MB, and the import
process as a whole peaks during pathfinding - at around 4.0GB.

* fixup! PERF: lower memory requirements for clip_osm

Remove unnecessary casting
2021-03-24 18:03:33 -07:00
Dustin Carlino
4ef04f5bd1 Change road incline calculations to be stored in RawMap. Previously, the
"rise / run" calculation used the trimmed road center-lines, which don't
match up with the elevation at each original intersection point.

Also handle infinity in the output and reduce the resolution of the
query from every 1m to every 5m.

Regenerate all maps due to the map format change. Try bringing in
elevation data for all of Seattle using the LIDAR source, since
the data quality assessed in eldang/elevation_lookups#12 seems to be
similar, and LIDAR is way faster than contours.
2021-03-23 22:47:52 -07:00
Michael Kirk
e672256828
Import screen UI fixups (#584)
* Import screen UI fixups

- even out the spacing a bit
- use underline style for "Alternate Instructions" web link
- left/right switch is more intuitive than right/left
- disambiguate label from toggle id
2021-03-23 15:11:14 -07:00
Dustin Carlino
162f09a887 Import Tripoli for WeCode Libya, also adding an Arabic font 2021-03-23 06:51:47 -07:00
Dustin Carlino
4a704e3172 Filter out highway=pedestrian, bicycle=dismount unless separate footpaths are enabled. Removes Portugal Place from Cambridge. cyipt/actdev#151
Now regenerate everything
2021-03-22 21:30:10 -07:00
Dustin Carlino
1187c1ccf0 Bikes can use bus lanes in GB. Only disallowed in Poland now.
Not regenerating yet.
2021-03-22 18:50:26 -07:00
Dustin Carlino
e57cacaab4 Rename pathfind/driving -> pathfind/vehicles to reflect bikes using it too, and likewise for driving_cost 2021-03-22 16:34:46 -07:00
Dustin Carlino
7d2e8409e8 Implement no-through-traffic zones instead by adding a huge cost to crossing into the zones. #555, #574
Regenerate all maps. Gridlock-wise, Rainier and Poundbury broke, but
Wallingford started working again. Acceptable cost for a change this
useful; I'll work on fixing those maps later.
2021-03-22 16:34:46 -07:00
Dustin Carlino
e6cf2d54bc Rip out all of the special code for pathfinding into/out of access-restricted zones.
There's a much simpler implementation, it transpires. #555, #574
2021-03-22 16:34:46 -07:00
Michael Kirk
b6c5ee38c2 clarify "time difference" chart
- bar height represents accumulated time, not trip count
- buckets are from duration *before* edits
2021-03-22 15:59:20 -07:00
Dustin Carlino
75b39c7b35 Add a debug tool to show the pathfinding costs to each node. Trying to figure out why a new impl of pathing through zones isn't working as expected. 2021-03-22 12:03:50 -07:00
Michael Kirk
b07ac626d4 fixup proposal "tabs" 2021-03-22 12:00:43 -07:00
Dustin Carlino
9d2da632be Add some disabled validation that paths don't enter an access-restricted zone when they shouldn't.
I'm working on an overhaul to pathfinding and zones in another branch,
and need some more debugging tools. This one's ready to be checked in
now.
2021-03-22 09:38:53 -07:00
Dustin Carlino
c68d0fdc6b new release 2021-03-21 11:47:54 -07:00
Dustin Carlino
0572a5118b Add a map covering the north end of Cambridge. Also grab fresh OSM for the Great Kneighton map, at least fixing the crazy geometry at Portugal Place. cyipt/actdev#151 [rebuild] [release] 2021-03-21 11:24:33 -07:00
Dustin Carlino
01431827dd Fix a bug in the UI importer that happens the first time you run it. #523 2021-03-20 16:31:31 -07:00
Dustin Carlino
ca70d7c617 Fix the broadmoor proposal after the new OSM data import. #574
And fix the github build. [rebuild]
2021-03-20 15:30:34 -07:00
Michael Kirk
761e2e6412 new tab styles for info panels 2021-03-20 14:33:54 -07:00
Dustin Carlino
90e2e4f249 Grab fresh Seattle OSM to fix the entrance to Broadmoor for #537. Also
stop importing golf cart paths, even though they would be kind of
interesting to use for this proposal...

Interventions needed to keep lakeslice running, of course
2021-03-20 14:26:48 -07:00
Dustin Carlino
a68af804e3 Pick the entrance/exit to an access-restricted zone more intelligently. #574
Instead of just picking the intersectin closest to the origin or
destination, calculate the full path length, and take the one with the
shortest distance. This fixes some of the weird problems routing around
Broadmoor. Regenerate all prebaked data.

Also fix the original request for paths involving zones, so tracing it
later works.
2021-03-19 19:24:22 -07:00
Dustin Carlino
cb4cd1b13a Don't recalculate failed paths in the freeform trip spawner. Makes
debugging #574 easier.
2021-03-19 17:48:37 -07:00
Michael Kirk
af079c24e6 rename txt.add -> txt.add_line 2021-03-19 17:48:30 -07:00
Dustin Carlino
58ee3175ac Add a new Seattle map focused on the Arboretum, for #574, along with
prebaked data for the baseline (because it doesn't gridlock, without any
interventions needed!) and a proposal for opening up Broadmoor.
2021-03-19 17:24:11 -07:00
Dustin Carlino
dcf2bf0422 Apply the Text::from(str) pattern in a few more places.
Found using: vi `./rgrep.sh 'Text::from(Line'|grep -v fg|grep -v
big_h|grep -v displa|grep -v big_m|grep -v small|grep -v second | grep
-v underl|grep2files `  (Some of those are local bash aliases)
2021-03-19 16:56:18 -07:00