Commit Graph

111 Commits

Author SHA1 Message Date
Michael Kirk
d7e0225097 roll back lyon to fix crash in widgetry demo 2020-09-24 19:12:39 -07:00
Dustin Carlino
c9fbf67989 Rearrange headless API to explicitly apply edits at the same time as
specifying the scenario to run. #325
2020-09-24 13:14:49 -07:00
Dustin Carlino
597ef473f2 Upgrade most dependencies 2020-09-24 09:36:26 -07:00
Dustin Carlino
a17ef9cc43 Get text rendering to work on WASM! #21
Just a few changes to make usvg not depend on Rustybuzz (which is still
in the middle of becoming a pure Rust library). It probably only works
with English fonts, but for the moment, it moves us forward.
2020-09-20 22:50:22 -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
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
3dcdb9ec02 Update OSM data (and fix the stage icon) 2020-09-16 10:29:51 -07:00
Dustin Carlino
6439c026ea Set up the boilerplate for two parking impls 2020-09-15 13:27:56 -07:00
Michael Kirk
c11cecf1ac
log cleanups (#321) 2020-09-10 14:20:35 -07:00
Michael Kirk
f685af47a5
proletariat robot considers resident/worker capacity (#320)
proles: account for work capacity

previously all residents went to work on the map, but if the
neighborhood is mostly residential that meant they were "competing"
heavily for the scarce jobs available on the map.

with this commit, we do a better job of spreading worker/residential
demand to account for what is available, and fill in the gap with
off-map trip origins/desitinations.

e.g. if a neighborhood is mostly residential, we have folks commute off
of map. If a neighborhood is mostly commercial, we have folks commute
into the map.
2020-09-10 14:04:20 -07:00
Michael Kirk
95b01c5f9e
macos fix: flip h-scroll to conventional direction (#310) 2020-09-06 13:10:37 -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
b13f5b0f4a Move iotool things into the importer package, but keep separate binaries 2020-09-03 11:49:53 -07:00
Dustin Carlino
db23cf2d57 Update fast_paths, which implemented stall-on-demand and just about HALVED query time! 2020-09-03 11:28:38 -07:00
Michael Kirk
6482f8b0a4
util to convert geojson to osmosis polygon (#309) 2020-09-02 15:29:25 -07:00
Dustin Carlino
f662d9e34f Get rid of PartialEq on all of the Sim structs. It was originally there for a unit test that simulations are deterministic, but that test is long gone. (Determinism is now tested a bit more indirectly, but usefully, by looking for diffs to prebaked results. It could also be done by diffing serialized Sims.) 2020-08-28 14:26:22 -07:00
Dustin Carlino
d8d2877c14 Fix bike lane importing on Bell St. To prevent this from gridlocking
lakeslice (which is still quite sensitive to tiny changes in demand
data), manually retime a signal.
2020-08-27 20:51:49 -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
Kyle Huston
90cf38a522
Fail importer immediately if dependencies are missing and make gunzip etc. configurable (#296)
* Read ImporterConfiguration from .toml file if present. Also check for presence of dependency programs.

* Actually use config.osmconvert instead of hard-coded 'osmconvert'

* Add curl to checked dependencies

* Don't require all fields to be present in importer.toml configuration. Fill in defaults.

* Remove unneeded slice

* Use json for importer config and use serde(default) attribute to simplify application of defaults

* Extract re_dependencies_callable from main.rs and remove dependency on Job

* Revert change to abstutil, use struct-level default attribute

* Add importer.json to .gitignore

* Make gunzip_args string instead of Option<string>
2020-08-27 09:06:14 -07:00
Dustin Carlino
3afdb3f7e2 The JSON format for the map edits changes occasionally. Be backwards
compatible with old edits, automatically transforming them to match the
new format. Part of #216 and necessary to work on #234.
2020-08-22 09:14:01 -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
7cbc0fd95c Make a tool to dump the map in JSON. 2020-08-19 12:49:30 -07:00
Dustin Carlino
02569b1642 Get an end-to-end sample experiment working through the API and Python client 2020-08-18 12:52:38 -07:00
Dustin Carlino
a6a454d326 Add a tool to import external traffic demand data. The format and way of
calling the tool (not in the importer?) are just experiments right now.
2020-08-17 12:32:09 -07:00
Dustin Carlino
781f2b61bb update Cargo.lock; the winit patch changed commit hash I think [rebuild] 2020-08-16 17:47:02 -07:00
Dustin Carlino
bef3434ac8 adjust the most egregious traffic signals downtown 2020-08-15 18:35:14 -07:00
Michael Kirk
3ed8b9cf81 Fix glium build, which was broken with: 85ad194d
85ad194d introduced a patched winit.

In the glium build, we were pulling in a second version of winit (the
unpatched version, via glutin). This caused conflicts between the data
types, breaking the build.

Apparently the proper way to specify a patch like this, usable by
transitive dependencies, is via cargo's "patch" specifiers
2020-08-14 15:11:49 -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
Michael Kirk
e5b08c71c0 Fix HiDPI screens for wasm
Fixes upstream winit bug
2020-08-14 14:13:18 -07:00
Dustin Carlino
25ee39af89 Prepare to flag-guard an experiment to handle uber-turns differently
when allowing a car to start a turn. It causes
https://github.com/dabreegster/abstreet/pull/276#discussion_r470269394
and also the lakeslice scenario to gridlock (a regression that began a
few weeks ago). But keep the flag on for now, to keep the montlake
scenaro running at least.

https://dabreegster.github.io/abstreet/trafficsim/gridlock.html has
notes about the many different causes and in-progress fixes for
gridlock. This experiment hasn't been explained very well yet, but
roughly it treats a cluster of traffic signals as one, so that once a
vehicle gains access through the first light, they guarantee immediate
access through the entire sequence. This interacts with the "don't block
the box" behavior (don't start a turn if you might get stuck in the
intersection) strangely.

While attempting to get this rollback to work, I also had to manually
redraw the traffic lights for a few manually specified intersections.
They became out-of-date a few weeks ago when I cleaned up the OSM
geometry upstream and the referenced IDs changed, and I hadn't bothered
to re-time the signals. Luckily, with the new multi-signal editor,
redrawing the timing was much easier than originally!

Regenerated all data and lots of bus routes vanished. Plan to get back
to that project soon.
2020-08-14 11:33:25 -07:00
Dustin Carlino
1d46845dc9 Upgrade glow. No noticeable change on Linux, might help on Mac. 2020-08-13 08:26:49 -07:00
Dustin Carlino
8ce2568280
turn the headless runner into a demo of a JSON API, for #245 (#268)
turn the headless runner into a demo of a JSON API, for #245
2020-08-11 16:44:19 -07:00
Dustin Carlino
eee179ce8a store offset in the permanent signal format 2020-08-08 09:45:59 -07:00
Dustin Carlino
8f6a6d40e6 change the few places that copied an OSM ID to the clipboard to instead
open the browser. this is more useful, and it also lets us get rid of a
dependency on clipboard stuff, fixing #264
2020-08-05 11:24:51 -07:00
Dustin Carlino
bfc5236152 fix crash with duplicate full route names on one bus stop [rebuild] 2020-08-02 08:36:40 -07:00
Dustin Carlino
1b993544ab print logs from fast_paths 2020-08-01 08:27:09 -07:00
Dustin Carlino
7a00839553 ditch osm-xml, make a new osm parser from scratch based on roxmltree.
skip unreferenced objects, make the output extremely easy to consume.
also fix timers in importer. this helps with #212, although the actual
problem there is weird.

regen everything. some parking lots change a bit, but not horribly, and
that code needs some attention anyway.
2020-07-25 13:52:41 -07:00
Dustin Carlino
eb4acdc2f6 split parking lot code from building code, for #231 2020-07-25 07:09:43 -07:00
Dustin Carlino
dd3f3d14ab add a signal policy for half signals, inadvertently brought in by fe94357332. update a signal in south seattle.
will regenerate in the next change
2020-07-23 13:52:49 -07:00
Dustin Carlino
bbe06c6075 randomly distribute residents to buildings in the planning area for #119 2020-07-21 14:00:59 -07:00
Dustin Carlino
1ae29881ba i forgot that there was an isochrone experiment. plug it up to contours. 2020-07-21 07:23:33 -07:00
Dustin Carlino
a65107145f turn heatmaps into nice polygon contours 2020-07-20 17:03:32 -07:00
Dustin Carlino
ec9ba28891 stop using simsearch for matching road names. it has odd behavior when the query is just a few charactes, and it often has the wrong results after typing most of a name. just use simple string containment for now. 2020-07-20 08:36:32 -07:00
Dustin Carlino
d9d4e5448e consolidate some gridlock problems/solutions in markdown, for #114 2020-07-17 13:38:09 -07:00
Dustin Carlino
a86fb5c73d upgrade to rust 1.45 after fixing an issue in fastpaths [rebuild] 2020-07-17 12:54:14 -07:00
Dustin Carlino
1c39de50f7 use earcutr for polygon triangulation. this finally allows for
multipolygons with holes!
2020-07-16 15:33:01 -07:00
Dustin Carlino
eeb70030c2 clean up old experiments from the intersection geometry code.
imperceptible changes to some (already broken) intersections.

also grab fresh osm and a new traffic signal
2020-07-14 17:41:56 -07:00
Dustin Carlino
b4b8556f46 just get a few new traffic signals and add parking to south seattle, to
try to make progress
2020-07-13 16:07:35 -07:00
Dustin Carlino
0f82c21560 - manually fix a few crazy signals downtown.
- interpret tags to make 3rd Ave bus-only. cars technically allowed
  sometimes, but bus-only is more accurate for now.
- also remove austin from bundled maps. maintaining it has a cost, and
  the point was just to have at least one non-seattle city kept up to
  date.  krakow now satisfies that.
2020-07-13 13:40:46 -07:00
Mateusz Konieczny
885fdefb5d
playing with processing modifications (#183)
* WIP set up plumbing for calculating building info in the Raw layer and using it later for #154

* WIP playing with processing modifications

* experiment with some possibilities for tag processing

* fix an embarassing typo

* enable busses in work-home traffic

* refactor, add multiuse

* seed more parking in Kraków

* parse integers properly - thanks for a help!

* rebalance generated trips

* add hack providing some background traffic

more realistic traffic

even mess realistic people

* attempt to further reduce parking deficit

* add TODO

Co-authored-by: Dustin Carlino <dabreegster@gmail.com>
2020-07-13 09:56:05 -07:00