Commit Graph

6329 Commits

Author SHA1 Message Date
Dustin Carlino
b8318917a8 Write to the proper data/input/shared directory for elevation. #82
It was always using the current directory, which breaks when running the
UI map importer from game/. [rebuild] [release]
2021-04-04 09:58:40 -07:00
Dustin Carlino
437d3eb064 Throttle rendering when running the one_step_importer from the UI. We spend more time drawing the progress than downloading, otherwise. #523 2021-04-04 09:39:03 -07:00
Dustin Carlino
df7d1080d9 Update trip start/end icons 2021-04-03 11:26:01 -07:00
Dustin Carlino
cc4bcae1cb Color the 'more finished trips' tooltip green, to be consistent with other good/bad colors 2021-04-03 10:37:24 -07:00
Dustin Carlino
da60de0a09 Adjust walking speed for inclines, using Tobler's hiking function. #82
Now regenerating everything...
2021-04-02 19:54:33 -07:00
Dustin Carlino
acdbe0e753 Start adjusting cyclist speed for inclines, both in simulation and pathfinding, using calcultions from Valhalla. #82
Not regenerating data yet.
2021-04-02 19:54:33 -07:00
Dustin Carlino
ee3f139765 Allow the docker command for elevation to fail. This unbreaks the tests, which import synthetic maps with strange coordinates. #82 2021-04-02 08:25:04 -07:00
Dustin Carlino
98506dc47b Update the link to the web version after #592 2021-04-01 19:32:36 -07:00
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