Dustin Carlino
7bdca2411f
Fix wasm build error that is somehow not showing up in abstreet web builds, only in bus_spotting
2022-05-31 10:18:11 +01:00
Dustin Carlino
d09bfb7a70
Add a timer around the slow auto-filter-everything tool, and actually
...
use the heuristic dropdown on the browse screen
2022-03-17 15:55:03 +00:00
Dustin Carlino
ed1602ab40
When switching between proposals, match up neighborhoods by the most blocks, instead of one arbitrary block. Even when boundaries change, the result is much more intuitive now.
2022-02-26 19:04:11 +00:00
Dustin Carlino
d6dc9de221
Add a mode to show quietness / rat runs for all neighborhoods at once
2022-02-02 09:51:01 +00:00
Dustin Carlino
6c2a581be5
Simplify traffic count code -- directly deal in Counters
2022-01-28 10:40:56 +00:00
Dustin Carlino
be57975a91
Start to shape the LTN impact tool into something more general to plug a
...
demand model into routing and compare throughput before/after some
change.
Add in a bunch of filters for trips. (Most even work!)
2022-01-26 14:17:24 +00:00
Dustin Carlino
d2ace68366
Don't recalculate counts before LTN changes
2022-01-23 09:37:45 +00:00
Dustin Carlino
bd340a1970
Switch from std::fs to fs_err. When files aren't found, the error message actually includes the path!
2022-01-17 17:30:51 +00:00
Dustin Carlino
2c328c0f11
Create JSON test cases for https://github.com/a-b-street/osm2lanes from existing maps
2021-11-16 14:17:57 -08:00
Dustin Carlino
08223efed5
Whoops, forgot to not leak all the RAMs
2021-11-11 14:10:42 -08:00
Dustin Carlino
e6f60168e1
Totally remove CmdArgs! No more uses. #745
2021-11-11 13:02:12 -08:00
Dustin Carlino
13f24e5cb2
Adding context with filenames/URLs to some methods in abstio. #801
...
It's extremely unergonomic to do this. Issues:
1) Hard to keep track of which Results include good context and which
don't. Make a new type?
2) Lack of try blocks forcing use of closures
3) async try blocks aren't stabilized
2021-11-11 10:16:40 -08:00
Dustin Carlino
2fbc950da5
Switch to a consolidated title screen that switches between all the
...
apps. #780
2021-11-06 10:33:11 -07:00
Dustin Carlino
4cf941a5f0
Convert map_editor from CmdArgs to structopt. #745
...
Keep the translation layer from URL GET params.
2021-10-27 11:48:34 -07:00
Dustin Carlino
0464ab4499
Convert the headless server from CmdArgs to structopt. #745
2021-10-26 11:10:08 -07:00
Dustin Carlino
151ec7b167
When a timer finishes, print the wannabe flamechart using the log crate.
...
On native, this makes it much easier to visually distinguish the
finalized timing breakdown from the temporary progress messages. On web,
this makes the timing breakdown actually show up in the developer
console.
2021-10-21 13:56:17 -07:00
Dustin Carlino
9f86365cf6
Upgrade to rust 1.56 and cutover to rust edition 2021
2021-10-21 09:38:06 -07:00
Dustin Carlino
915b902c9a
Warn the user before doing expensive mode shift calculations. #448 ( #774 )
2021-10-11 15:10:28 -07:00
Dustin Carlino
c4d38ca591
A humble start to showing an alternate, low-stress route. #743
2021-09-27 13:13:11 -07:00
Dustin Carlino
c28dba4b47
Make the importer itself a library, called from the CLI tool. #745
2021-09-17 18:29:23 -07:00
Dustin Carlino
e687dd0391
Automatically collapse more degenerate intersections. Manually tested
...
around the university bridge. Still far to go, but progress.
Not regenerating yet.
2021-08-02 12:06:47 -07:00
Dustin Carlino
f6a94e8a58
Allow DrawWithTooltip to return custom data instead of string labels.
...
CloneableAny revived from e35c69f6f3
2021-07-18 14:14:19 -07:00
Dustin Carlino
3d355f720c
Clean up CityPicker code using DrawWithTooltips
2021-07-18 14:14:19 -07:00
Dustin Carlino
057ac5d020
Serialize trimmed f64's in the geom crate as i32, since the f64's are
...
trimmed to 4 decimal places anyway. Do this for Pt2D, Distance,
Duration, Speed, Time.
Regenerating everything...
2021-06-30 06:35:42 -07:00
Dustin Carlino
8f199177f5
Upgrade to Rust 1.53
...
- arrays are now iterable directly
- switch to using BTree{Set,Map}::retain!
- a round of clippy
- regenerate scenarios and prebaked data; not sure why, but there's a
diff
2021-06-17 23:04:35 -07:00
Dustin Carlino
00c3614301
new release
2021-05-31 12:12:13 -07:00
Dustin Carlino
5aa00955f9
Clean up the timer.parallelize API, getting rid of the weird enum to
...
toggle how many CPUs to thrash. We always use all of them, except for
one case, where a separately named method is more clear. Also make that
variation use all but 1 CPU, instead of just half.
2021-05-27 17:47:22 -07:00
Vinzent Steinberg
9d17faa878
Prefer slices over reference to owned type
2021-05-15 14:24:08 -07:00
Dustin Carlino
1edbca6509
Refactor most of the places extracting polygons from geojson files ( #644 )
2021-05-15 09:05:28 -07:00
Vinzent Steinberg
446a21696d
Fix most clippy warnings ( #646 )
...
* More conventional spelling of acronym identifiers
* `new` -> `new_state`
* Remove redundant field name
* Remove needless `collect`
* `to_controls` -> `make_controls`
* Simplify long if statement
* Fix module inception
* Simplify chained if let
* Return directly instead of creating a binding
* Disable clippy warning about `borrow` method
Implementing the `Borrow` trait instead would result in excessive type
annotations.
* Fix most remaining clippy warnings
* Allow clippy::type_complexity
* Fix bad merge from web editor
* Run cargo fmt
* Suppress large_enum_variant warnings
* Rename FYI state to ShowMessage
* Fix upper_case_acronyms warnings
Co-authored-by: Dustin Carlino <dabreegster@gmail.com>
2021-05-14 17:31:32 -07:00
Vinzent Steinberg
fd3b0e2a14
Fix compilation failures and most clippy warnings ( #642 )
...
* abstutil: Fix compilation failure
* map_gui: Fix compilation
* traffic_signal_data: Fix compilation failure
* map_model: Fix compilation failure
* abstutil: Fix doctests
* abstio: Fix most clippy warnings
* abstutil: Fix most clippy warnings
* collisions: Fix clippy warning
* convert_osm: Fix clippy warnings
* sim: Fix most clippy warnings
* geom: Fix clippy warnings
* kml: Fix clippy warnings
* map_model: Fix most clippy warnings
* fifteen_min: Fix clippy warnings
* game: Fix many clippy warnings
* Disable some noisy clippy warnings
* headless: Fix clippy warnings
* importer: Fix clippy warnings
* map_editor: Fix clippy warnings
* map_gui: Fix clippy warnings
* osm_viewer: Fix clippy warnings
* parking_mapper: Fix most clippy warnings
* popdat: Fix clippy warnings
* santa: Fix clippy warnings
* sumo: Fix clippy warnings
* traffic_seitan: Fix clippy warning
* updater: Fix clippy warnings
* widgetry: Fix clippy warnings
* tests: Fix some clippy warnings
* Fix compilation on stable Rust
* Simplify unwrapping
* Make use of `Entry` more readable
* Fix formatting
* Fix code that was broken in the refactoring
* Apply cargo +stable fmt
* Fix code that was broken in the refactoring, second try
* Remove `Default` impls that are equivalent to `new`
* Remove obsolete clippy wrapper
* Avoid turbofish
* Prefer `unwrap_or_else` over allowing `clippy::or_fun_call`
* Remove redundant `into_iter`
* Fix typo
* Prefer `&& false` over commenting code out
* Fix some clippy warnings
Co-authored-by: Dustin Carlino <dabreegster@gmail.com>
2021-05-14 08:32:56 -07:00
Michael Kirk
0d758c74f1
Polish contingency matrix / risk screen
...
- better color contrast
- don't color neutral/no-change buckets
- show "-" rather than "0" for cells which have been filtered out
- bespoke, non-linear, bucket durations for x-axis
- less buckets for y-axis
- better copy for tooltips
- label axes
- show empty chart rather than no chart
- remove "delays" which aren't really risks
- clarify that risk visualizations are just for bikes for now
- remove filter UI and only include bikes
2021-05-13 13:35:04 -07:00
Dustin Carlino
9c2c8bbd8f
Change some uses of Into<String> to AsRef<str>, to avoid allocations. #253
...
I manually audited all uses. I kept Into<String> when we really do wind
up storing a String.
2021-03-11 11:29:18 -08:00
Dustin Carlino
6e7a91ada1
Upgrade to Rust 1.50. Use the new f64 clamp instead of our own. [rebuild]
2021-02-11 10:32:13 -08:00
Dustin Carlino
829c321190
Get rid of the wasm_s3 build flag. Instead use the URL of the wasm app and find the data/ directory off of that, and assume only localhost has uncompressed files. https://github.com/cyipt/actdev/issues/28
2021-02-08 12:41:28 -08:00
Dustin Carlino
73e405e382
Upgrade most dependencies
2021-02-03 18:13:06 -08:00
Dustin Carlino
341ce834e3
Based on startup params, display an extra 'study area' on the map. cyipt/actdev#44
2021-01-27 13:00:48 -08:00
Dustin Carlino
c9c6f240ae
Remove timer.{note, warn, error} in favor of the log crate. #262
...
Originally, the intention of the deleted calls was to not interrupt
Timer progress bars with warnings. But the output of things like the
importer is impossible to read anyway. Strongly considering explicitly
sending logs and timing info to separate places and using something like
multitail for live progress.
Unplumb timer from LOADS of places that just needed it for logging.
2021-01-21 19:22:02 -08:00
Dustin Carlino
b1dda3628f
Start all UI apps except for game by loading a map using the async interface. This lets someone on the web immediately start with any map based on URL params. And it's one step towards removing the montlake file from being hardcoded in the wasm. #344
...
Demo: http://0.0.0.0:8000/?salzburg/maps/south.bin when running the 15m
tool locally
2021-01-09 14:45:33 -08:00
Dustin Carlino
dff6d6004d
On the web, use URL query parameters as the command-line arguments. This
...
is a step towards initializing with any map. #344
As a demo, running locally, http://0.0.0.0:8000/?--dev&--color_scheme=night%20mode now works
2021-01-09 13:02:39 -08:00
Dustin Carlino
e99def9124
Switch all error handling to anyhow. Nothing consumes our code as a
...
library yet, so this is a step forward from string errors. Manually
tested how errors show up (including the nice with_context bit).
2021-01-05 11:35:03 -08:00
Dustin Carlino
965d999199
Upgrade misc other dependencies
2021-01-03 20:01:27 -08:00
Dustin Carlino
5c04923dff
Split abstio crate out from abstutil. #253
...
widgetry, geom, and abstutil may wind up on crates.io in some form to
let other projects use widgetry. abstio has A/B Street-specific tricks
for reading data on native/web. Note widgetry still depends on abstio,
will figure out how to clean that up next.
2021-01-02 10:28:00 -08:00
Dustin Carlino
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
f8ac0fc96b
Remember the upzoned buildings, and add a button to clear the choices. #431
2020-12-26 20:10:17 -08:00
Dustin Carlino
0fc0b8db65
Distinguish uncompressed/gzipped size in the updater tool. #377
2020-12-21 15:32:09 -08:00
Dustin Carlino
799adbbdd4
Fix map loader on web. Remote paths wound up with an extra /, breaking
...
the deduping between remote and statically bundled files, which broke
one of the map loader panels with duplicate buttons.
2020-12-19 09:51:52 -08:00
Michael Kirk
0e759aa934
replace custom logger with env_logger ( #414 )
2020-12-07 12:58:47 -08:00
Dustin Carlino
83dee1cf59
Write player JSON data to local storage in WASM. Now progress in the
...
experiment is saved across browser sessions too!
2020-12-07 11:44:56 -08:00
Dustin Carlino
8af6e1343d
Serialize game state on native. Figuring out how to do this on web next...
2020-12-07 11:01:43 -08:00