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
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
df873a5cf9
Add an option to totally disable turn conflicts in the simulation. Can we make progress on large scenarios only with vehicle queueing rules? (Didn't evaluate this yet, don't want to burn through laptop battery currently)
...
Also fix zooming in on traffic signals crashing with freeform policy
2020-10-11 10:14:48 -07:00
Dustin Carlino
212ad761fd
Switch to Box<dyn Error> in abstutil. This makes it easier to have
...
higher-level APIs return some kind of string error. Pretty much nowhere
do we care about error types.
2020-10-11 08:36:02 -07:00
Dustin Carlino
a2d36274a2
Prep for release [rebuild]
2020-10-10 13:11:11 -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
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
f1ec2fa4c4
Convert more doc comments for abstutil, convert_osm, geom, sim
2020-10-08 21:13:08 -07:00
Dustin Carlino
2c3fd09378
Add an example Python tool that works with the JSON map export. Support
...
specifying trip endpoints by building or intersection when importing
traffic demand data.
2020-10-07 15:37:59 -07:00
Michael Kirk
2ed916e89f
show parking intent ( #362 )
2020-10-07 14:16:58 -07:00
Dustin Carlino
0f806b2055
Document the sim crate
2020-10-06 18:25:39 -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
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
178404bd0e
Remove unused RNG stuff from abstutil, and start to think about how to tease it apart a bit
2020-10-05 11:48:29 -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
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
ffdedcb0a7
When multiple source lanes can turn left* to multiple destination lanes,
...
only allow the leftmost source lane to turn to any destination lane. As
a future improvment, need to handle multiple explicitly tagged left turn
lanes, but this gets closer to reality, particularly helping some crazy
maneuvers along Mercer in downtown.
*or right
Also had to update lanes along Madison and fiddle a bit to keep
lakeslice running. Spotted some major traffic signal bottlenecks due to
stage generation falling back, will iterate on that separately.
2020-10-03 09:40:15 -07:00
Dustin Carlino
cfa203a4d3
Add an API call to dump all traffic signals' current state
2020-10-02 21:03:29 -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
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
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
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
e1b079900a
Don't touch SimFlags in headless at all
2020-09-24 17:10:07 -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
d77271f9d8
Export trip times to CSV [rebuild]
2020-09-23 13:06:22 -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
3cc6a8ce12
And finally, a UI to tune offset between two signals! [rebuild]
2020-09-19 11:10:45 -07:00
Michael Kirk
08f330cfad
track worker capacity of commercial buildings
2020-09-16 16:43:11 -07:00
Dustin Carlino
e28052c5be
Reorganize sim module slightly, pull queries into one place
2020-09-16 10:15:30 -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
0fc4c04171
Turn some spammy println's into silenceable alerts
2020-09-15 14:44:36 -07:00
Dustin Carlino
716f1f023f
Don't seed parked cars in blackholed buildings
2020-09-15 13:27:56 -07:00
Dustin Carlino
c0e530645b
Handle blackholes and reserving
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
a70fa0530a
Start a new parking impl for infinite offstreet parking. Unused
2020-09-15 13:27:56 -07:00
Dustin Carlino
6439c026ea
Set up the boilerplate for two parking impls
2020-09-15 13:27:56 -07:00
Dustin Carlino
82ea851a4e
Make the Go API example track the same people through different cancellation runs, evaluating how much time the 'survivors' are gaining or losing
2020-09-14 18:56:52 -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
ce4e429648
Rename edits -> proposals, at least in the UI layer.
2020-09-14 12:52:06 -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
037e22e69e
Cleanup last few things for left-hand maps. Fixes #311 !
2020-09-11 14:17:31 -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
65569c7f56
When a car trip violates a congestion cap, reroute around the problem
...
instead of aborting the trip.
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
f1b1263ee2
Fix congestion capping impl when RESERVE_WHEN_STARTING_TRIP is enabled. It wasn't reseting the counter every hour.
2020-09-10 14:29:06 -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
Dustin Carlino
8cc61aafc8
Add a method to the API to modify a scenario. No callers/tests yet.
2020-09-09 19:52:15 -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
53f35f5de1
Nuke pedestrians walking to deleted cars. #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
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
193a3b1515
Restructure the trip mode choice in one of the activity models to more clearly branch based on trip distance, for #227
2020-09-04 11:15:17 -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
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
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
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
Michael Kirk
e5620aeb10
configurable "jump to delay"
2020-08-28 13:20:05 -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
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
70dd9fcad1
Switch to 'reserving' the congestion cap when starting a trip, not when entering the road. In the initial tests, all the drivers rush for a road at once. They all pass the check initially, then violate it when they reach it. It's a little more reasonable to enforce the cap earlier, even though we can't really predict when the car will reach the zone, so the time is a little off.
2020-08-23 09:54:39 -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
8a05a88f0c
Refactor the plumbing of different parts of Sim. More context at
...
https://old.reddit.com/r/rust/comments/idjcua/passing_all_other_fields_of_a_struct_to_one/ .
2020-08-22 21:46:57 -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
21ab1d7d6f
Before starting the driving portion of a trip, check if it'll cross a
...
zone with a cap that's been exceeded. If so, abort the trip.
This is 90% plumbing... need to rethink how pieces of the simulation are
passed around.
2020-08-20 16:38:45 -07:00
Dustin Carlino
2bfb5d5ac4
Track how many cars are entering zones with caps.
...
Tested by print debugging and comparing to throughput stats
2020-08-20 16:38:45 -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
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
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
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
e5f7136f27
parallelize the proletariat robot activity model for #154 [rebuild]
2020-08-16 17:33:12 -07:00
Dustin Carlino
bef3434ac8
adjust the most egregious traffic signals downtown
2020-08-15 18:35:14 -07:00
Dustin Carlino
92d121ecd4
restore lakeslice to former glory, by allowing blocking-the-box at two intersections that're smushed together. had something like this a while ago, but I thought it became unnecessary when working on uber-turns a few weeks ago
2020-08-15 17:52:23 -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
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
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
31e8c654d2
prototype directional traffic signal demand viz over time
2020-08-10 13:19:47 -07:00
Dustin Carlino
d1e9e38e82
refactor for #231 : use typed OSM IDs everywhere, dedupe URL code
...
have to regen, the binary format has changed
2020-08-08 16:09:36 -07:00
Dustin Carlino
e35c69f6f3
ezgui Wizard (and its pet Cloneable)
...
Here lies a weird coroutine experiment
09/20/2018 - 08/07/2020
2020-08-07 14:04:41 -07:00
Dustin Carlino
00e8b8a8c2
work around ballard map crashing from tiny border. i tried valiantly to
...
extend short borders, but it can't be done in convert_osm clip. has to
happen later when trimming and making intersection geometry. too much of
a headache right now.
west seattle and krakow still broken because of short borders.
also grab fresh osm
2020-08-04 15:25:49 -07:00
Dustin Carlino
bcbf229eb7
rip out all users of the old find_closest_lane for #176 .
...
- this gives offside support to bus/sidewalk matching, getting 11 more
routes working in krakow
2020-08-03 17:56:58 -07:00
Dustin Carlino
f73516d183
start representing bus spawn rates explicitly
2020-08-03 13:12:02 -07:00
Dustin Carlino
fa0a73053b
spawn cars a little farther along borders, to avoid a rendering crash
2020-08-03 11:24:53 -07:00
Dustin Carlino
940d2265c0
spawning buses at 0.01m on a non-border lane can break, because other cars approach, and the buffer distance gets broken. instead, spawn the buses a few lanes away, if needed. fixes #260
...
now only ~400 agents left in lakeslice by end!
2020-08-03 11:08:21 -07:00
Dustin Carlino
bea6e2edf2
snap bus stop driving positions at least 0.1m away from the start of the
...
lane, to handle buses spawning at the start
not regenerating everything yet
2020-08-03 09:04:16 -07:00
Dustin Carlino
3cd28cb44f
fix buses not starting at a border. they were skipping the first stop, that's why there were so many stranded agents in lakeslice. still some buses failing to spawn, causing some more stranded
2020-08-01 18:53:40 -07:00
Dustin Carlino
c31d876f61
oh no, the new biking_connection is crashing in a few maps, where some of the separated bike trails are still missing. gracefully degrade. this is getting convoluted again, filed #258 to cleanup.
2020-08-01 10:26:44 -07:00
Dustin Carlino
2f76c7ac12
powered by a clear head and fresh blackberries, fix #64
2020-07-31 19:58:44 -07:00
Dustin Carlino
f7df49f512
fix a rendering bug with shifting cars for parking. ALMOST handle parking lane on opposite side of a driving lane, but there's a crash i cant understand, so disabled. #64
2020-07-31 17:39:04 -07:00
Dustin Carlino
ae31739dea
almost support off-side parking lanes. only remaining bug is cars
...
ignoring parking spots if the parking lane is in the opposite direction.
workaround is to reverse the lane. dealing with that bug next though.
part of #64 and #176 . fixes #109
2020-07-31 16:23:58 -07:00
Dustin Carlino
d7968713fc
don't need to explicitly store parking blackhole redirect, just a bit.
...
and have a separate bit for bikes. use that to handle bikes going to
borders. finally closes #221 , progress on #176 .
2020-07-31 15:43:15 -07:00
Dustin Carlino
5c506f726c
total overhaul to building<->bike connections for #221 and #176 . bikes
...
will start/stop directly in front of a building driveway, when possible.
still need to handle the case when the bikeable position isn't connected
to most to the graph (for buildings accessible only by footway and for
things around the border)
2020-07-31 14:28:40 -07:00
Dustin Carlino
d22aa87139
rearrange Building internals for #176 . edits can affect building
...
connections to driving/biking. just store the immutable stuff -- whether
there's parking in the building, the connection to the sidewalk, and the
physical driveway line. compute all the rest dynamically, so it responds
to edits without effort.
shouldn't be major behavior changes yet (besides maybe fixing some bugs
involving edits)
2020-07-31 12:49:33 -07:00
Dustin Carlino
03796fcd66
introduce the tiny walkable shoulder lane type. pathfinding penalty,
...
rendering adjustments. #176
the SharedSidewalkCorner geometry looks bad, but acceptable for now.
2020-07-30 13:42:36 -07:00
Dustin Carlino
edb1cb87cd
Make all vehicles, including buses, start with ~0 length when spawning
...
from borders and gradually appear. This looks more realistic and lets
more trips succeed, especially buses spawning at short borders.
This fixes #220 in a hopefully simpler way. Extending the geometry of
incoming roads is possible, but it may look visually overwhelming,
because two border intersections could sometimes overlap.
2020-07-28 11:39:57 -07:00
Dustin Carlino
6a11a13d36
fix the remainder?! of pathfinding bugs for #190 . have to make sure the
...
candidate route has the stops in the correct order. now people correctly
ride a bus off-map!
regen everything now!
2020-07-27 12:36:46 -07:00
Dustin Carlino
74bf6e0974
get riding off-map to work for #190 .
...
- handle living streets that allow buses in berlin
- don't connect LeaveMap nodes to anything else; people were getting
creative and using them as shortcuts to effectively warp to a border,
then come back into the map
- make should_use_transit understand transfers (and still just return
the first leg)
- warp to bus routes by ID
still at least one weird bug left, seen in krakow. working on it next,
trying to keep these commits "small." not regenerating maps quite yet.
2020-07-27 10:37:21 -07:00
Dustin Carlino
2239059961
UI fixes discovered during riding buses off-map
...
- speed limit dropdown crash
- link to bus route from bus stop panel, not some currently running bus
- show number of waiting people per stop in route panel and route dash
2020-07-27 08:19:14 -07:00
Dustin Carlino
e79e186784
ALMOST make people ride the bus off-map, for #190 . the pathfinding
...
gymnastics isn't quite right. still want to commit this though, with it
disabled.
found a few bugs along the way...
2020-07-27 07:54:33 -07:00
Dustin Carlino
f056080106
fix area under curve on jump-to-time when active agents isnt 0 at end of day. also... fail loudly when we make it to the end of the day and too many active agents are left. at some point lakeslice broke and I didnt notice. :( ... but actually it's just a crowd of people waiting on a bus that isnt managing to spawn.
2020-07-26 22:50:45 -07:00
Dustin Carlino
a4e09ca91f
add border stop/start to route info panel. move the route drawing there, stop being a weird layer.
2020-07-26 13:13:48 -07:00
Dustin Carlino
adbbc8764a
much smarter opportunistic lane-changing. almost got #217 . but we don't
...
do opportunistic LCing when approaching an uber-turn, so we need to use
these costs when building the CH also...
2020-07-23 12:39:00 -07:00
Dustin Carlino
9757750bfa
gather penalties based on sim state too. #217
2020-07-23 10:58:25 -07:00
Dustin Carlino
328cbcd1f1
stop melting my laptop when generating scenarios
2020-07-23 09:15:25 -07:00
Dustin Carlino
56a892f789
improve error for parking seeding. closes #224
2020-07-22 12:19:18 -07:00
Dustin Carlino
d2e8dc95d1
split the new traffic generation code out into its own file. it'll make
...
iterating on #227 easier
2020-07-22 11:20:48 -07:00
Dustin Carlino
38b8557c82
bring in living streets from OSM, interpreting them as normal roads with
...
access restrictions. makes old town in krakow look much better and
brings in stay healthy streets in seattle. also commit some code related
to footways that isn't exercised yet.
2020-07-21 17:18:56 -07:00
Dustin Carlino
435b4ce8fb
track passengers boarding/alighting. further rearrange stop/bus/route
...
info panels
2020-07-21 08:55:07 -07:00
Dustin Carlino
28d0469d10
filter out random border no-op trips. they crash poor berlin
2020-07-20 16:16:01 -07:00
Dustin Carlino
9be94f9a70
don't spawn bikes on tiny lanes, it causes queue spillover
2020-07-20 10:38:56 -07:00
Dustin Carlino
042145ef1b
start cleaning up bus info panels. the delay between stop measurement has never been clear, and i'm not sure if it's what we even want to measure. and use route shortname in titles.
2020-07-20 09:14:41 -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
Mateusz Konieczny
66287ccda6
further work on #154 - better trip generator ( #211 )
...
* further work on #154 - better trip generator
use single trip mode selection function
(still extremely primitive, based on a distance)
border-to-border traffic is now more varied
rewrite TODOs
* stylistic improvements
2020-07-20 08:26:16 -07:00
Dustin Carlino
a837c79500
better errors when failing to spawn. it's either the starting lane is
...
too small for the vehicle, or there's no appropriate lane type at the
border. closes #206
2020-07-19 13:33:36 -07:00
Dustin Carlino
68d3c5b340
intersection delay is broken down by agent type, not trip mode
2020-07-19 13:22:08 -07:00
Dustin Carlino
233b662bfa
actually count transit passengers in throughput analytics
2020-07-19 13:10:24 -07:00
Mateusz Konieczny
3c9bb0f706
add transit traffic for #154 ( #207 )
...
for now solely cars, next step would be having function deciding on trip mode based on distance and using it also here
note #206 , this code may be buggy though at least sometimes transit traffic works
next potential step - some distribution of transit traffic over day
2020-07-19 12:36:39 -07:00
Dustin Carlino
523eb690f5
refactor tripinfo struct
2020-07-18 07:46:58 -07:00
Dustin Carlino
6d27547b6a
prep for hackathon. make the block map a sandbox dashboard, work off of a live sim. [rebuild]
2020-07-18 07:22:18 -07:00
Dustin Carlino
db00c18536
use AgentType, not TripMode, in throughput
2020-07-17 16:39:16 -07:00
Dustin Carlino
c08fd4ae7e
UsingBike trips always start at a building
2020-07-17 15:56:58 -07:00
Dustin Carlino
e06faa3c33
make an AgentType enum, stop abusing TripMode. a small first step,
...
showing agent meters properly
2020-07-17 15:13:36 -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
82dd1fd01a
spawn a new bus for every route every hour
2020-07-16 11:58:09 -07:00
Dustin Carlino
8a70e105e8
make buses actually start/end at borders [rebuild]
2020-07-16 10:11:43 -07:00
Dustin Carlino
d15a842e43
Revert "new rust version. finally strip_prefix is available!"
...
This reverts commit d16ac9713a
.
I'm seeing mysterious brokenness with fast_paths:
https://github.com/easbar/fast_paths/issues/20
Reverting so I can get work done
2020-07-16 08:59:16 -07:00
Dustin Carlino
d16ac9713a
new rust version. finally strip_prefix is available!
...
include berlin and krakow by default in the release, since they're small
and it'll make some collaboration easier [rebuild]
2020-07-16 08:41:28 -07:00
Dustin Carlino
acc82b4f06
dont crash on info panels after buses are done
2020-07-15 16:39:27 -07:00
Dustin Carlino
ff8a62c9e2
retry spawning buses
2020-07-15 15:41:20 -07:00
Dustin Carlino
891a1746d6
try to figure out border endpts for routes for #190 . just visualize
...
them, dont enforce connectivity yet. so many problems...
regenerate stuff, to unbreak map binary format
2020-07-15 15:35:57 -07:00
Dustin Carlino
91a9a9a1bc
start revamping bus route data model for #190 . routes are one-way. make
...
buses appear at the first stop and vanish at the last.
not regenerating anything yet
2020-07-15 13:15:32 -07:00
Dustin Carlino
ccf0b2f647
improve car/bike zordering when crossing z levels
2020-07-15 10:04:47 -07:00
Dustin Carlino
5806e60eec
represent cancelled trips differently than aborted trips
2020-07-15 09:11: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
614354271a
see modified trips in the table and info panels
2020-07-14 16:10:50 -07:00
Dustin Carlino
7341c0189a
plumb through which trips (and people) are affected by an experiment. no
...
UI exposure yet.
2020-07-14 14:49:04 -07:00
Dustin Carlino
7cd0c77068
plot scheduled arrival rate at borders. downtown is crazy.
2020-07-14 12:57:58 -07:00
Dustin Carlino
d31ead5788
clearly show cars just cruising around trying to park, so it's
...
abundantly clear when parking availability is squeezed. need to change
the minimap legend now.
2020-07-14 09:33:10 -07:00
Mateusz Konieczny
6b337c10ec
drop unneded todo ( #194 )
2020-07-14 07:42:36 -07:00
Dustin Carlino
f76b40b8f7
remove old hacks that disabled different checks on certain intersections. new progress fixes the gridlock in a more general way
2020-07-13 15:33:32 -07:00
Dustin Carlino
46789847a7
offstreet parking blocks the road for less time. seeing unrealistic
...
gridlock near the huge parking lots downtown from this
and fix a bug with spawning bike trips. never OK to silently not
schedule a trip, because it breaks the schedule continuity
2020-07-13 15:17:14 -07:00
Dustin Carlino
b68e233125
trying to handle gridlock near tiny roads for #114 . treat the entire
...
sequence as one thing to lock -- don't start it until it's clear, and
prevent new conflicting turns once started. disable block-the-box
protection inside.
I'm not sure this is helping at all yet. maybe it's just more complex.
2020-07-13 12:30:24 -07:00
Dustin Carlino
b058d5d926
cargo fmt and regenerate map data
2020-07-13 10:11:48 -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
Dustin Carlino
35a63af590
don't lane-change unnecessarily
2020-07-12 10:42:28 -07:00
Dustin Carlino
faedffae99
finally flushed out one of the common crashes: shifting some car bodies
...
to make wheels breaks sometimes. just skip the wheels.
2020-07-11 17:10:36 -07:00
Dustin Carlino
07ed1fec95
more polyline work... get rid of Warn<>. extremely spammy and hasn't
...
been helpful in ages.
2020-07-11 15:17:16 -07:00
Dustin Carlino
f8b8c501ae
tighten up more PL scariness
2020-07-11 14:51:25 -07:00
Dustin Carlino
cce624edd8
start the big one: Polyline::new
2020-07-11 13:42:19 -07:00
Dustin Carlino
0593aa52d9
more caution in Line API
2020-07-11 13:05:34 -07:00
Dustin Carlino
98c6f46c78
the first real big change: Line::new always returns Option
2020-07-11 12:37:38 -07:00
Dustin Carlino
4919fbf90f
autodetect ICs across the whole map, not just when there are complex
...
turn restrictions
and... enable the new "run the red light" after starting an uber-turn. I
can get to 6am on downtown with a few simple edits now.
2020-07-10 17:39:25 -07:00
Dustin Carlino
7ab78d543a
ignore red lights in the middle of an uber-turn. currently disabled
...
until a few more things are in place, but this is headed in the right
direction. [rebuild]
2020-07-10 16:03:22 -07:00
Dustin Carlino
4c8ad5a8da
determine if a vehicle is currently performing an uber-turn, without
...
modifying the low-level PathSteps. also make sure to not try LCing when
going into one.
on the cusp of being able to treat complicated intersections as one...
2020-07-10 12:40:51 -07:00
Dustin Carlino
98ca2341c8
adjust params on the people generator for #154
2020-07-09 13:48:49 -07:00
Dustin Carlino
ead4a99682
prototype a better random traffic generator
2020-07-09 13:04:41 -07:00
Dustin Carlino
4340ad585b
convert the rest of usize IDs to u32. savings:
...
maps: 645mb -> 625mb
scenarios: 431mb -> 390mb (before all the u32 optimizations, this as
500mb!!!)
prebaked: 80mb -> 73mb
and while I'm at it, grab fresh OSM, with lots of manual lane fixes,
especially near divided highways
2020-07-09 11:43:34 -07:00
Dustin Carlino
a2623bfd6a
wait wait, the light rail cars are way longer. wiki says one car is about 30m, so using double cars for now
2020-07-08 14:38:03 -07:00
Dustin Carlino
7c0aaed370
the first link light rail has left the staton. #numtot
2020-07-08 14:29:02 -07:00
Dustin Carlino
14010e3be2
transform trip mode, filtering on existing mode and departure time range
2020-07-08 10:46:23 -07:00
Dustin Carlino
9f72b3dd51
cleanup after the relative dir fix, and add support for hardcoding the
...
data dir, for #137
2020-07-07 12:14:02 -07:00
Dustin Carlino
6919c24bf8
detect the data/ dir more intelligently. fixes #73 . still need to
...
- consider collapsing the directory structure in the releases
- fix wasm
[rebuild]
2020-07-07 11:09:35 -07:00
Dustin Carlino
d52a0e8a35
new scenario mod: force everyone to make a mode change
2020-07-06 16:29:51 -07:00
Dustin Carlino
d987879389
gracefully handle editing the currently active traffic signal phase live in the challenge mode
2020-07-05 14:18:00 -07:00
Dustin Carlino
5427d8ea40
also express lane type changes using the new approach
2020-07-05 14:04:49 -07:00
Dustin Carlino
6e8eef8d09
start refactoring how edits are validated. need to deal with lane types
...
next
2020-07-05 13:20:19 -07:00
Dustin Carlino
505311a93f
improve the signal synchronization a bit for #8 . hardcode a few small
...
intersections to make the downtown map make more progress. make it
easier to copy OSM node IDs.
2020-07-04 08:53:13 -07:00
Dustin Carlino
2c7440b03f
start representing access restrictions by mode
2020-06-30 13:15:57 -07:00
Dustin Carlino
2b50e7969c
refactor position
2020-06-29 20:55:36 -07:00
Dustin Carlino
c97bd0fe4b
some cleanup after #106 . unbreak importer
2020-06-28 11:13:35 -07:00
phimuemue
a675e72d25
Avoid collect et al ( #106 )
...
* Avoid unconditional collect in get_lane_types
* Introduce Road::children(fwds)
Simplifies direction-aware lane retrieval.
* Simplify all_lanes
* Avoid unneeded collect
* Avoid some Vec copying
* Avoid unconditional collect
* Avoid some collect
* Avoid clone
* Avoid collect
* Avoid collect
* Avoid collect
* Avoid collect
* Avoid collect
* Avoid collect
Co-authored-by: Dustin Carlino <dabreegster@gmail.com>
2020-06-28 11:00:09 -07:00
Dustin Carlino
bb3da1f8eb
Make a very primitive form of adaptive traffic signal phases. It should
...
be easier to write better policies now; this mostly does the work of
changing the map model and UI to handle variable timing. A small step
towards #91
2020-06-28 10:20:47 -07:00
Dustin Carlino
a6b90d00d8
very simple modifier to cancel all trips for some percentage of people
2020-06-27 14:20:25 -07:00
Dustin Carlino
90b556ac1f
carve out a way to modify the weekday scenario in the UI. express the 5 day repeat using this
2020-06-27 11:56:45 -07:00
Dustin Carlino
b3a480b4c1
clean up old trip positions from Sim. implement the all-route debugger
...
in a more straightforward way
2020-06-25 09:20:54 -07:00
Dustin Carlino
bc6482c522
include camera state and edits in the crash report. would make it easier to repro #98 and #72
2020-06-25 09:02:50 -07:00
Dustin Carlino
2630fabf83
link to fixed windows build, and make a few small adjustments
2020-06-23 12:57:06 -07:00
Dustin Carlino
f5385b83df
restore raw throughput counts deleted in
...
ca33695431
, flagged off, for further
exploration of compressed representations. also, apparently lakeslice
prebaked results have been missing for a while due to dropbox snafu! fix
2020-06-19 11:04:07 -07:00
Dustin Carlino
bc8f352600
when people are riding a bus, map them to the bus instead of just crashing
2020-06-18 11:23:09 -07:00
Dustin Carlino
26cdde056c
fix throughput and delay max_x and disable comparison by default
2020-06-17 15:05:31 -07:00
Dustin Carlino
d437152be4
add an intro story cutscene to motivate the whole game [rebuild]
2020-06-13 20:44:46 -07:00
Dustin Carlino
42ea64a680
changing parking seeding to fill in private spots first. makes progress
...
in larger maps. i made sure the optimize challenge is still interesting
after this change.
2020-06-13 15:14:23 -07:00
Dustin Carlino
c20a8ea36b
tuning plot appearance: labels, grid, titles, bg and outline
2020-06-12 12:12:01 -07:00
Dustin Carlino
14c7518787
break down delay by agent
2020-06-12 11:37:12 -07:00
Dustin Carlino
be3b93625d
dont compute pathfinding upfront by default. [rebuild]
2020-06-11 12:20:51 -07:00