Commit Graph

923 Commits

Author SHA1 Message Date
Dustin Carlino
df90fc4f50 polylabel for building numbers 2019-08-19 12:01:10 -07:00
Dustin Carlino
a9267c76c7 debug tooltip showing how far an agent has traveled and how much
remains. seems to have small perf impact on initially calculating paths.
:(
2019-08-16 15:43:20 -07:00
Dustin Carlino
4e83f492d8 upgrade rand, get rid of now unneeded serde1 feature, in hopes of fixing feature mismatch between deps 2019-08-15 12:14:35 -07:00
Dustin Carlino
758c5494d8 remove old unused deps 2019-08-09 13:34:40 -07:00
Dustin Carlino
38ea097b26 use WizardState for some more things, making proper use of bundling state with closures! 2019-08-08 11:17:53 -07:00
Dustin Carlino
574e30b3d8 adding a new hint for extra turn restrictions 2019-08-06 14:02:34 -07:00
Dustin Carlino
b5c48fca38 fix traffic signal diagram in sandbox mode after lots of time has passed :) 2019-08-06 11:59:58 -07:00
Dustin Carlino
edfd112459 work around a bug in should_use_transit with disconncted sidewalks 2019-08-05 13:47:38 -07:00
Dustin Carlino
77c01580f1 refactoring path references... 2019-08-04 17:11:33 -07:00
Dustin Carlino
4a9a40c09f cycle indices got out of sync easily. no need to store them at all. 2019-08-02 16:25:22 +02:00
Dustin Carlino
453204129c some instructions to import a new .osm. don't require a clipping
polygon. small tweaks to map construction to make Austin work.
2019-07-15 16:43:57 +02:00
Dustin Carlino
6d559a2a54 remove individual turn fiddling from stop sign editor, for simplified gameplay for now 2019-07-14 11:37:23 +01:00
Dustin Carlino
ff0a6b7240 pick bus route to explore from possible ones at a stop, and without
using a stop at all
2019-07-07 20:30:01 -07:00
Dustin Carlino
9600fefd2b woops, should_use_transit was returning too-greedy answers, never more than 1 stop 2019-07-07 20:09:32 -07:00
Dustin Carlino
463ad7292b remove bus stops with no routes 2019-07-07 19:35:44 -07:00
Dustin Carlino
2e41b2284e use the turn restriction data to filter more turns 2019-07-04 19:57:07 -05:00
Dustin Carlino
90236c3afb filter OSM restrictions only to roads where they really apply 2019-07-04 18:47:59 -05:00
Dustin Carlino
9f9db35c38 capture raw turn restriction data from OSM, hacky way to debug them 2019-07-03 17:16:00 -05:00
Dustin Carlino
57425c170c actually use OSM turn restrictions 2019-07-03 09:44:50 -05:00
Dustin Carlino
5fa824f504 preps for interpreting turn:lanes from OSM 2019-07-02 15:03:18 -05:00
Dustin Carlino
142c34af4e interpret lanes:forward and lanes:backward from OSM 2019-07-02 14:00:54 -05:00
Dustin Carlino
6bb5ed4407 parking lane overrides in hints. removing parking from much of 23rd.
more involved than I anticipated, because the override changes road
width and forces us to recalc intersection polygons
2019-07-01 14:14:18 -05:00
Dustin Carlino
218082140f don't use a bimap for NodeMap. less dependencies, marginal speed boost 2019-06-27 10:30:56 -07:00
Dustin Carlino
5e1a7238e8 preserve OSM tags when merging degenerate intersections. this lets 24th and lake washington be fixed without messing up the z-layering 2019-06-26 17:33:31 -07:00
Dustin Carlino
0711056d89 save and restore savestates for entire a/b tests. launching from scratch
takes 33s in debug, this takes 19s
2019-06-21 12:47:00 -07:00
Dustin Carlino
91cc74a30c dramatically slash the one-time preparation time for the 3 VehiclePathfinders by using the node ordering from one for the other two. this actually also exposed a bug that would eventually muck with recalculating after edits (node IDs depending on the original state of the map) 2019-06-18 16:21:35 -07:00
Dustin Carlino
7a49c585cf remove building_type and stop reading the residential permit shapefile 2019-06-18 14:58:57 -07:00
Dustin Carlino
04021f9fd1 print more complete and robust building names. adjust intersection and
building colors -- stop coloring buildings based on type (adds visual
noise, data is very bad)
2019-06-18 14:47:24 -07:00
Dustin Carlino
1835155a47 dont recalculate pathfinder after every map edit; just once at the end 2019-06-18 14:28:14 -07:00
Dustin Carlino
c2576b9ad7 disable path validation. 2.8s down to an even 2s. 2019-06-18 10:53:45 -07:00
Dustin Carlino
cdda463ee4 speed up pathfinding queries even more by reusing the PathCalculator
each thread
2019-06-18 10:25:35 -07:00
Dustin Carlino
a6aa46dd61 cutover driving pathfinding to fastpaths, using a full lane graph for driving instead of falling back when path stitching fails. handle edits by preparing the CH again, using the existing node ordering. one-time prep time is reasonable, recalculating works for live edit mode, and queries are FAST! :O 2019-06-17 19:16:04 -07:00
Dustin Carlino
cdacaef1a6 refactor menu text for all ItemSliders 2019-06-17 17:22:20 -07:00
Dustin Carlino
22db36c0f4 use a sparser, more obvious representation for walking_with_transit.
cuts prep time down to reasonable levels for everything.
2019-06-17 16:08:31 -07:00
Dustin Carlino
b4de820f56 make interactively spawned peds use transit if possible, to figure out
why the walking-with-transit graph is not working... argh which is
because map initialization order has so many funky dependencies
2019-06-17 15:32:49 -07:00
Dustin Carlino
4951eea644 cutover walking (with and without transit) pathfinding to fast_paths! 2019-06-17 14:14:30 -07:00
Dustin Carlino
ace3f0d285 remove Debug trait from Map and pathfinder -- not used in a long time 2019-06-17 12:14:16 -07:00
Dustin Carlino
58d056cdbc remove paranoia panic for an anticipated case with hints 2019-06-17 10:45:54 -07:00
Dustin Carlino
ecaa8bea53 use slider to browse hints 2019-06-16 14:31:19 -07:00
Dustin Carlino
ec50a277ea switch to one set of hints for all maps, put it under version control. seed with a few easy ones. :) 2019-06-12 15:16:38 -07:00
Dustin Carlino
da85927d03 change Hints to store based on gps points, so hints are universal, not per map 2019-06-12 14:55:48 -07:00
Dustin Carlino
0adeac1d53 remove the single point associated with intersections, now that we're
actually going to be mucking with geometry. it wasnt doing anything
useful anyway. also a round of clippy.
2019-06-12 10:10:04 -07:00
Dustin Carlino
e0c1d0b85d operation to merge degenerate intersection 2019-06-12 08:58:59 -07:00
Dustin Carlino
35b7c18df9 remove elevation from map model. never been used, no anticipated need for it 2019-06-12 07:25:31 -07:00
Dustin Carlino
55f9589d15 preserve intersection type more intelligently when merging InitialMap stuff 2019-06-12 07:08:52 -07:00
Dustin Carlino
64b1cebb95 operation to delete a road completely 2019-06-11 19:04:00 -07:00
Dustin Carlino
98e073d8be save hints from debug_initialmap, use them when constructing the real
map
2019-06-11 17:41:47 -07:00
Dustin Carlino
290c274661 debug_initialmap loads from raw_data. remove the complicated serialization stuff from InitialMap. 2019-06-11 17:21:28 -07:00
Dustin Carlino
d9474494e7 debug_initialmap: highlight short roads, expose a way to manually merge
a short road
2019-06-11 17:00:49 -07:00
Dustin Carlino
b1463cf020 construct Pathfinder before finalizing bus routes. dont manually call pathfind_slow for buses. this is a step towards removing the slow fallback entirely. 2019-06-11 14:52:01 -07:00
Dustin Carlino
4e2d16af29 consistently using file extensions of .json and .bin, merging duplicate abstutil io functions accordingly 2019-06-11 14:30:11 -07:00
Dustin Carlino
e1a6532a84 handle border intersections touching edited lanes 2019-06-09 18:10:37 -07:00
Dustin Carlino
c76738a678 upgraded to rustc 1.35, fixing a few cases of https://github.com/rust-lang/rust/issues/59159 2019-06-09 14:09:27 -07:00
Dustin Carlino
8eb03b81c3 remove edits_name from SimFlags and refactor loading MapEdits by name. fixes bug where quitting an a/b test breaks loading other maps by retaining edits_name 2019-06-08 16:32:10 -07:00
Dustin Carlino
2d0a53c2d6 improving turn type classification for driving/bus/bike lane interactions; this in turn improves the default intersection policies 2019-06-07 16:32:42 -07:00
Dustin Carlino
2d638eb94b tool to bulk edit lane types 2019-06-07 15:41:39 -07:00
Dustin Carlino
57de773101 fix bus stop order... my MultiMap impl uses BTreeSet 2019-06-06 16:50:22 -07:00
Dustin Carlino
e3e032cb2e argh, bus route IDs were totally out of sync with reality 2019-06-06 15:36:36 -07:00
Dustin Carlino
c29769a6b4 print bus stops and routes nicely in OSD 2019-06-06 15:31:59 -07:00
Dustin Carlino
88f6516f79 recalculate bus stop driving_pos when editing 2019-06-06 14:52:53 -07:00
Dustin Carlino
d7e639b5f3 dont allow orphaning a bus stop 2019-06-06 14:43:53 -07:00
Dustin Carlino
322176dded detect when edits are equivalent to original 2019-06-06 13:56:42 -07:00
Dustin Carlino
b47069811e TRY to adjust departure time and such for trips starting/ending at the border 2019-05-31 15:41:38 -07:00
Dustin Carlino
a9319dbe6a capture PSRC trips that start/end out-of-bounds, matching them to a border. slow and buggy start! 2019-05-31 11:37:25 -07:00
Dustin Carlino
ea49fe63ba match PSRC trips to OSM building IDs up-front, trimming down filesize and speeding up clipping later 2019-05-28 13:04:31 -07:00
Dustin Carlino
83f62631e9 fix cases where path.trace doubles back on itself a bit due to slightly
weird walking geometry
2019-05-28 10:19:49 -07:00
Dustin Carlino
40efcc7b05 generalize a parallelize method for timers, use for all trip viz 2019-05-25 19:35:35 -07:00
Dustin Carlino
bc69a6b4d4 spawn as many trips from PSRC as possible 2019-05-25 18:34:50 -07:00
Dustin Carlino
01a4abb64a work around path traces that're breaking PolyLine 2019-05-25 13:33:41 -07:00
Dustin Carlino
1cdbe0ea81 refactor parallelized pathfinding and use it in trip viz too 2019-05-24 12:50:01 -07:00
Dustin Carlino
f674527ef2 interpolate along route for trip viz 2019-05-24 12:28:57 -07:00
Dustin Carlino
416d0b0d7d building PathRequest for trip visualization, and slightly refactoring bldg->Position for it. also forced to extend the equiv_pos fix for bus stops to all equiv_pos queries. 2019-05-24 11:47:01 -07:00
Dustin Carlino
92a0d38978 deal with bus stops on the wrong side of the road 2019-05-21 16:18:39 -07:00
Dustin Carlino
aac9c41d8a fix missing sidewalks on non-residential one-ways downtown. luckily, there's an explicit OSM tag to help. WIP this breaks bus stops on one-ways! fix coming soon 2019-05-21 14:33:32 -07:00
Dustin Carlino
9cc23c6ab1 remove unnecessary stop-signs at degenerates with crosswalks 2019-05-21 14:02:49 -07:00
Dustin Carlino
219a7b3236 refactoring list of signal policies 2019-05-21 13:26:39 -07:00
Dustin Carlino
6b5945aade put traffic signal box in the true middle of the intersection; it was in a bad spot for one-ways 2019-05-21 13:13:24 -07:00
Dustin Carlino
4c1e9b41c1 experimentally try finding intersection polygon by naively intersecting thick road polygons. 2019-05-17 15:48:21 -07:00
Dustin Carlino
c29039c499 policies for four-ways all one-ways 2019-05-17 12:00:29 -07:00
Dustin Carlino
dec8d65776 better traffic light policy for degenerate intersections 2019-05-17 10:31:51 -07:00
Dustin Carlino
ec015624c0 workaround for awful intersection geometry causing get_outline's that
explode out to some corner and get constantly rendered
2019-05-16 18:49:47 -07:00
Dustin Carlino
a816a3d0be defining a better set of pre-converted maps. disabling fix_ramps in most
cases.
2019-05-16 16:22:52 -07:00
Dustin Carlino
b6cdd0f99c fix crosswalk coupling in intersection editors, not sure when this broke 2019-05-16 14:46:00 -07:00
Dustin Carlino
d516985437 use different colors for unzoomed roads to show road type 2019-05-15 14:23:39 -07:00
Dustin Carlino
faea2e94e3 improve LCing turns with degenerate intersections, turn markings 2019-05-14 10:28:22 -07:00
Dustin Carlino
73aab37fc7 explicitly represent StraightWithLaneChanging turns. fix up preset
stop sign and traffic signal policies
2019-05-13 16:58:02 -07:00
Dustin Carlino
6ab8372b01 SharedSidewalkCorners always have Priority; they never conflict with anything 2019-05-12 09:14:46 -07:00
Dustin Carlino
aa7bd11797 tweak edit mode's menu info 2019-05-11 16:53:30 -07:00
Dustin Carlino
9b848c894a better selection polygons for polyline-based things 2019-05-11 16:03:39 -07:00
Dustin Carlino
5c9086a829 controls to naively flip stop signs on/off 2019-05-11 14:53:17 -07:00
Dustin Carlino
ca23950097 base RoadWithStopSign enabledness on turn priorities 2019-05-11 14:46:45 -07:00
Dustin Carlino
6b218fb5ab base stop sign lines on lanes on RoadWithStopSign 2019-05-11 14:38:55 -07:00
Dustin Carlino
c70c83f22b move the StopSignGroup abstraction to map_model. write down some rules for how stop signs _should_ work... 2019-05-11 14:31:46 -07:00
Dustin Carlino
8bd4ab72d4 draw full stop sign octagon when editing a single intersection 2019-05-10 15:23:31 -07:00
Dustin Carlino
b060a3ecc2 giving pedestrians more shape 2019-05-06 12:45:52 -07:00
Dustin Carlino
73f32854be fix up other ezgui apps, run clippy 2019-05-04 17:25:05 -07:00
Dustin Carlino
cca6f4b5ec displaying names for more roads 2019-05-04 13:56:40 -07:00
Dustin Carlino
4b4e6f17a0 start a really basic OSD 2019-05-02 12:38:12 -05:00
Dustin Carlino
3b2c1a1d73 new warp function that autocompletes street names 2019-04-30 12:48:00 -07:00
Dustin Carlino
4b1107bf57 clean up ezgui runner API 2019-04-20 15:10:03 -07:00
Dustin Carlino
3364cd1d0c smoothing out some of the weird SharedSidewalkCorners, starting article
for r/rust
2019-04-20 10:40:35 -07:00
Dustin Carlino
dc2649ad59 fix some crashes when spawning agents 2019-04-18 18:42:52 -07:00
Dustin Carlino
7885477e59 a round of clippy 2019-04-15 18:54:19 -07:00
Dustin Carlino
2ecd8a0edb avoid crash in make_shared_sidewalk_corner 2019-04-12 13:32:41 -07:00
Dustin Carlino
94b5307828 use the new SharedSidewalkCorner code for turn geometry, at least 2019-04-11 16:38:06 -07:00
Dustin Carlino
d207c3c33a rip out parcels entirely; unused for long time and no anticipated uses 2019-04-11 11:40:37 -07:00
Dustin Carlino
834384fb10 remove the Trace type rename; serves no purpose. also the unused
stopping_buffer; no more lookahead
2019-04-11 10:27:28 -07:00
Dustin Carlino
d0a3b5c383 lane edit validity 2019-04-03 12:41:10 +09:00
Dustin Carlino
4ecf6a815f make sure to recalculate DrawLanes based on turn priorities changing 2019-04-01 13:49:34 +09:00
Dustin Carlino
0a89f10a12 make sure banned turns reflect in pathfinding 2019-04-01 13:43:55 +09:00
Dustin Carlino
904d56e563 recalculate DrawTurns upon edits 2019-04-01 13:40:52 +09:00
Dustin Carlino
235125b77f reviving intersection editors, basic functionality there 2019-04-01 10:25:34 +09:00
Dustin Carlino
b0035cde08 include option for no_edits in menus and make sure we revert things when
loading no_edits
2019-03-20 18:05:14 -07:00
Dustin Carlino
5f297163db changing two lanes that share an intersection breaks... fix 2019-03-20 17:56:47 -07:00
Dustin Carlino
b4c1138baf revive map edits plugin 2019-03-20 17:51:43 -07:00
Dustin Carlino
c9059bd044 update Pathfinder graphs granularly 2019-03-18 19:19:49 -07:00
Dustin Carlino
da3152a0e7 revamp road editor plugin. recalculate DrawMap changes. fixing some
apply_edits bugs
2019-03-18 18:53:32 -07:00
Dustin Carlino
7b118c3de5 actually apply edits to map layer 2019-03-18 17:30:11 -07:00
Dustin Carlino
3f47c00e03 slowly reintroduce MapEdits, just with lane type overrides. load and
"apply" them
2019-03-18 16:40:27 -07:00
Dustin Carlino
3ea3ea199a completely remove most traces of MapEdits. quietly disconnect some
editor plugins
2019-03-18 15:37:02 -07:00
Dustin Carlino
c7dc028601 Display for Traversable 2019-03-18 13:21:57 -07:00
Dustin Carlino
db536a04d5 refactor an exact_slice for polylines 2019-03-15 14:02:43 -07:00
Dustin Carlino
961b70d1f4 kind of improved draw_unzoomed, except there are just tons of weird
situations to represent
2019-03-15 13:39:25 -07:00
Dustin Carlino
5ca359998c upgrade some dependencies and list data source licenses in README 2019-03-11 16:04:47 -07:00
Dustin Carlino
5013cae4f9 fixing tests 2019-03-08 12:19:05 -08:00
Dustin Carlino
1c9196461b delete dead path code 2019-03-08 11:49:29 -08:00
Dustin Carlino
11ab6fceb3 implement new should_use_transit 2019-03-08 10:55:35 -08:00
Dustin Carlino
1eebea8001 cutting over to new graph search in some cases. adding support for
one-step walking paths.
2019-03-08 10:47:39 -08:00
Dustin Carlino
523a6900de precomputing and saving the graphs 2019-03-08 10:18:26 -08:00
Dustin Carlino
6a8c964203 moving new pathfinding code to map_model/. not using it yet. 2019-03-08 09:59:45 -08:00
Dustin Carlino
98d4a639dc fixing last step of walking paths... and actually driving paths too :) 2019-03-07 21:19:54 -08:00
Dustin Carlino
4fed47f54e implement simplified pedestrian pathfinding. probably needs more work 2019-03-07 13:41:17 -08:00
Dustin Carlino
194d3b3b57 keep simple state when roaming for parking 2019-03-05 10:00:05 -08:00
Dustin Carlino
5a8e42642f my own custom hierarchical pathfinding. working great for driving. 2019-03-02 16:49:20 -08:00
Dustin Carlino
313841b9de make peds board buses 2019-03-01 22:09:33 -08:00
Dustin Carlino
3bbcb00d43 also stop using multimap crate in map_model 2019-03-01 12:25:00 -08:00
Dustin Carlino
874b3be519 prevent illegal trip from happening, fix bike_to_sidewalk 2019-02-27 09:04:06 -08:00
Dustin Carlino
ba9a545dcf use Path natively in Router 2019-02-27 08:50:26 -08:00
Dustin Carlino
8ab4b403fa bike -> ped 2019-02-26 11:43:10 -08:00
Dustin Carlino
e404780c25 bikes pt1 -- start biking 2019-02-26 11:14:28 -08:00
Dustin Carlino
16a6a62ce3 making it easier to get driving pos from parked car 2019-02-25 13:21:42 -08:00
Dustin Carlino
aea11b72e3 putting together a spawn layer. not using it yet. 2019-02-24 11:15:49 -08:00
Dustin Carlino
5bd840d296 populate turns from multiple lanes to a single right/left turn 2019-02-23 11:17:21 -08:00
Dustin Carlino
a928b32ebc preps to start some parked cars 2019-02-22 12:02:12 -08:00
Dustin Carlino
b02807ceee use quadtree to speed up fix_ramp step 2019-02-22 10:15:13 -08:00
Dustin Carlino
a45b4510b6 speed up neighborhood<->building and road matching during scenario instantiation 2019-02-21 11:33:56 -08:00
Dustin Carlino
5e9d4ca7f7 populate more turns so that lane-changing effectively happens when
turning, but keep the lane->lane semantics
2019-02-20 17:03:26 -08:00
Dustin Carlino
86cb58b5f1 first make a DirectedRoad ID, finally 2019-02-20 16:23:24 -08:00
Dustin Carlino
a026c02890 removing log crate from map_model 2019-02-20 11:03:34 -08:00
Dustin Carlino
c2791a6ead using Warn in all of geom 2019-02-20 10:36:58 -08:00
Dustin Carlino
28984075cc spawn some conflicting traffic 2019-02-19 16:10:00 -08:00
Dustin Carlino
7a8088f772 actually, trying a new idea for a DES model 2019-02-19 14:34:39 -08:00
Dustin Carlino
e1259587cb updating OSM source. some tweaks to make things work. 2019-02-17 15:58:04 -08:00
Dustin Carlino
7fb9f721e1 store Area as a Polygon natively in Map 2019-02-14 17:35:34 -08:00
Dustin Carlino
b40770edae adjust clipping instead of leaving stuff in sometimes 2019-02-12 15:56:23 -08:00
Dustin Carlino
b8eec25116 store Polygon in Building natively 2019-02-12 12:28:12 -08:00
Dustin Carlino
e8b80526ae making a separate DrawRoad. thick bands at low zoom, yellow center line at high zoom. 2019-02-12 09:16:33 -08:00
Dustin Carlino
9ea7493483 handle border nodes being bidirectional. also only assign borders during
convert_osm. still disabled... am confused. some hacks to make things
work in the meantime.
2019-02-11 23:25:39 -08:00
Dustin Carlino
4dd7dabde5 display boundary polygon, actually 2019-02-11 22:24:19 -08:00
Dustin Carlino
e68d6225c8 clipping roads based on original boundary polygons. buggy, so disabled. 2019-02-11 22:13:49 -08:00
Dustin Carlino
6da48c28c1 making small_seattle fully convert, with some less messy hacks. added it
as a test!
2019-02-11 16:13:29 -08:00
Dustin Carlino
e2de3e208c use FindClosest quadtree helper for residential bldg permit matching 2019-02-11 15:35:06 -08:00
Dustin Carlino
72e823c2c6 only have one Prerender object constructed, simplifying the plumbing of the Cell counters 2019-02-11 12:14:43 -08:00
Dustin Carlino
8693bbc1e3 import residential building dataset 2019-02-10 19:24:34 -08:00
Dustin Carlino
e186b24dac very primitive building type classification, with coloring 2019-02-10 17:38:46 -08:00
Dustin Carlino
ec01207369 try upgrading rand and serde again 2019-02-10 15:57:28 -08:00
Dustin Carlino
51399e19ed organize convert_osm lib better. also make clippy build everything
again.
2019-02-10 15:52:21 -08:00
Dustin Carlino
f693316290 parse OSM multipolygons, like bodies of water, correctly, when they're
completely present in the .osm
2019-02-09 21:03:44 -08:00
Dustin Carlino
72b044c64f plugin to show roads connected to intersection. surprisingly useful for debugging merged intersections sometimes 2019-02-09 11:46:31 -08:00
Dustin Carlino
2f77fbdf2f disabled but partly working fix for long cut corners after merging
intersections
2019-02-09 11:10:42 -08:00
Dustin Carlino
e95baab153 adjust dedupe threshold so there arent tiny little gaps in intersections 2019-02-08 23:22:09 -08:00
Dustin Carlino
7ea56ad6ca disabled thing to reduce degenerate intersection length 2019-02-08 20:18:49 -08:00
Dustin Carlino
949b184678 generalize the R253 fix 2019-02-08 14:49:31 -08:00
Dustin Carlino
18391811e4 use better symbols for stable roads/intersections 2019-02-08 12:45:12 -08:00
Dustin Carlino
d261d69fa5 manually handling O253 2019-02-08 12:42:31 -08:00
Dustin Carlino
cb752dceff fix over-eager intersection polygon that ate a curve due to two hits with the perpendicular 2019-02-08 12:16:14 -08:00
Dustin Carlino
bb6f5e0af0 plugin to show original road centers at the end 2019-02-08 12:06:17 -08:00
Dustin Carlino
3ee73668f2 just trying to detect the weirdness that is O253. pretty much works. 2019-02-06 15:48:33 -08:00
Dustin Carlino
d56f04167b tools to debug individual sidewalk corners. fixed some bugs where
sidewalk corners were incorrectly placed in the first place, causing bad
drawing. bug due to the same naive adjacent road approach
2019-02-06 13:58:44 -08:00
Dustin Carlino
b68b3117bc woops, somehow regressed and dropped second_half when finding original hits for adjacent roads 2019-02-06 13:21:14 -08:00
Dustin Carlino
260a2bdc3d forming the intersection polygon by the expected adjacency order, not by blindly sorting points by angle from a center. seems to fix some problems in merged mode! 2019-02-06 11:49:45 -08:00
Dustin Carlino
904991e8e0 sorting roads per intersection by adjacency more carefully for merged
intersections. no real noticeable effect yet.
2019-02-06 10:53:30 -08:00
Dustin Carlino
a9b9ae61bb tried tossing intersection endpoints into a convex polygon routine, but
it looks pretty bad. keeping around, but disabled.
2019-02-06 10:10:30 -08:00
Dustin Carlino
be1735d715 just skip bike trips that are silly loops 2019-02-04 15:32:46 -08:00
Dustin Carlino
83c6fbb758 woops, fix path trace's end_dist 2019-02-04 14:25:10 -08:00
Dustin Carlino
13698cdb20 small fixes... debug buildings, spawn from headless, timer for
instantiating a scenario
2019-02-04 11:56:54 -08:00
Dustin Carlino
bfd0465a3d track the intent of chosen acceleration, to see why overshooting is happening 2019-02-03 09:41:29 -08:00
Dustin Carlino
fb2bb08f66 be able to hide stuff in InitialMap debugger 2019-02-02 17:51:49 -08:00
Dustin Carlino
899d876968 only reset camera for some initial maps 2019-02-02 16:40:12 -08:00
Dustin Carlino
3451b65823 lazily compute SimStats 2019-02-01 14:31:35 -08:00
Dustin Carlino
92134f9125 get halloween working with small lines. refactor a Line::maybe_new. 2019-02-01 12:12:40 -08:00
Dustin Carlino
f5f8a57640 automatically focus on changed intersection in InitialMap viewer 2019-02-01 11:50:54 -08:00
Dustin Carlino
0a79b354b2 remove ability to create Map from InitialMap, now that we have a separate debugger 2019-02-01 11:09:22 -08:00
Dustin Carlino
0346166304 starting a generic viewer that works with InitialMap 2019-01-31 16:33:43 -08:00
Dustin Carlino
142bd57aa0 refactoring some approx_eq EPSILON_DIST checks 2019-01-31 15:10:33 -08:00
Dustin Carlino
48a5556f17 improving debuggability of merged maps by printing intersections to look at 2019-01-31 14:54:30 -08:00
Dustin Carlino
2282c5658d make geom types Ord now 2019-01-31 14:29:47 -08:00
Dustin Carlino
7432ec1b42 workaround bus getting stuck on tiny road by making more left turns 2019-01-31 13:11:52 -08:00
Dustin Carlino
b9e96618da stop abusing max distance for path tracing. disable some newly brokenish stuff 2019-01-31 13:09:15 -08:00
Dustin Carlino
7519fdf584 using strong Distance types in many more places 2019-01-30 15:54:54 -08:00
Dustin Carlino
133ec037c9 switching to new units in map_model 2019-01-30 13:07:53 -08:00
Dustin Carlino
7ce2242cb2 forgot to make 'cant trim' thing a panic, and tiny refactoring before trying to make pt2d be integers 2019-01-30 09:27:23 -08:00
Dustin Carlino
2a70efde5f simplify: slice can fail. all the callers dont have to check for EPSILON_DIST
(also, disable not-so-useful geom unit tests that use randomness)
2019-01-29 18:53:04 -08:00
Dustin Carlino
e274fd9652 making ped_uses_transit test bit more robust by picking bldgs from the bus stops 2019-01-29 17:13:07 -08:00
Dustin Carlino
ca058331e5 fixing path trace cases that wind up with points too squished together 2019-01-29 16:23:01 -08:00
Dustin Carlino
a98383db8f dealt with cases where a pair of intersections has two roads between them 2019-01-29 15:34:53 -08:00
Dustin Carlino
103a4ca053 ensuring no tiny Lines exist in most cases 2019-01-29 13:23:54 -08:00
Dustin Carlino
2e982ec827 making an infinite line type, to be less confusing 2019-01-28 18:28:05 -08:00
Dustin Carlino
4e89b0fcfe filter out cul-de-sacs earlier, so convert_osm works again 2019-01-28 13:19:42 -08:00
Dustin Carlino
6aaa55891e saving lots of InitialMaps... and manually loading one at a time 2019-01-28 09:42:28 -08:00
Dustin Carlino
79c316c9d9 restore center pts at the correct end... and then confirm that
intersection polygons look mostly better by restoring first
2019-01-27 14:59:46 -08:00
Dustin Carlino
9fc41078c2 fixed the funky polyline gluing... angle comparisons are hard, so change
the API for them.
2019-01-27 14:27:40 -08:00
Dustin Carlino
1de36283ae trying out a fixed-pt algorithm. seeing geometry problems and lots of over-eagerness, but this is a start. 2019-01-26 17:18:46 -08:00
Dustin Carlino
76be0c1ad4 trying to restore original road geometry without polyline bugs, but...
only fixed one bug. :)
2019-01-26 16:59:01 -08:00
Dustin Carlino
f2d8e77759 figured out the source of a weird polyline bug, adding checks to avoid
it in the future
2019-01-26 16:27:11 -08:00
Dustin Carlino
07397c642a rephrase trim_to_pt way more understandably 2019-01-26 15:05:34 -08:00
Dustin Carlino
c58113d631 port the simpler intersection merging to InitialMap-world. try the
geometry restoration... wait, need more stuff first
2019-01-26 14:59:18 -08:00
Dustin Carlino
aa09303b44 moving rest of map construction into halfmap 2019-01-26 14:18:38 -08:00
Dustin Carlino
ab6796d56c make intersection actually be a polygon now 2019-01-26 13:31:29 -08:00
Dustin Carlino
dcad4a3c87 create halfmap from initialmap 2019-01-26 13:18:00 -08:00
Dustin Carlino
ec38717a2c making an isolated layer for the map creation phase focused on roads and intersections, geometry and merging. not using it yet. 2019-01-26 12:49:09 -08:00
Dustin Carlino
08db3bf27f rendering traffic signal diagrams with lights per lane... needs work, so
disabling it
2019-01-22 11:58:56 -08:00
Dustin Carlino
88099c73b5 tiny preps for a variant of short road merging that can happen later and
look at road length after it's trimmed to the intersection. not going to
work on it just yet.
2019-01-22 09:56:03 -08:00
Dustin Carlino
63ad2c410d fix trace when last step is contraflow 2019-01-21 16:33:35 -08:00
Dustin Carlino
6dee096a0e zorder for cars/peds too... had to rework get_objects_onscreen 2019-01-21 14:51:57 -08:00
Dustin Carlino
c87c7b32ae make interactive driving trips still end at a building 2019-01-21 12:21:26 -08:00
Dustin Carlino
11045fd44f zorder for lanes and intersections 2019-01-20 14:15:50 -08:00
Dustin Carlino
f018158aa3 remove copyright comment from remaining files 2019-01-20 13:57:55 -08:00
Dustin Carlino
e83e87786f use new polygon code for two-ways as well, but trim back roads that don't change at all by some minimum amount 2019-01-20 09:17:18 -08:00
Dustin Carlino
4ca6571e2f warp by stable intersection ID 2019-01-19 21:10:54 -08:00
Dustin Carlino
fad89ddffa include more pts in the intersection polygon to only cover area from the original road bands. also fix a bug deduping points in the polygon. 2019-01-19 20:56:03 -08:00
Dustin Carlino
e403a6388d a much simpler, general approach for intersection polygons. needs a
little work, but it replaces lots of other code.

disabled, but adding a few more cases to the list of manually merged short roads
2019-01-19 19:07:07 -08:00
Dustin Carlino
b279e37bab trying to handle remaining 3-ways as degenerate 2-ways and just trimming
things back kinda arbitrarily
2019-01-18 15:40:09 -08:00
Dustin Carlino
e2579dfbdb dont prematurely edit road centers 2019-01-18 14:53:49 -08:00
Dustin Carlino
c0a81ebe59 using the new threeway code for some more cases 2019-01-18 14:04:51 -08:00
Dustin Carlino
a7cc077a77 got something working for i2, but WIP generalizing it 2019-01-18 13:26:34 -08:00
Dustin Carlino
48179d5d32 fix number of lanes for oneways and link roads 2019-01-18 11:41:05 -08:00
Dustin Carlino
f5850d1953 disabled option to automatically merge all originally-short roads 2019-01-18 10:42:11 -08:00
Dustin Carlino
0c32faa40c moving neighborhood to map_model crate, so convert_osm can stop depending on sim 2019-01-17 15:29:00 -08:00
Dustin Carlino
61128f098b make my own retain for btreemap. also refine the loop-road filtering in
the experimental road merger
2019-01-17 15:09:09 -08:00
Dustin Carlino
98ab06bd4e try manually merging some intersections again, without needing to modify geometry 2019-01-17 14:21:34 -08:00
Dustin Carlino
761008b3ac make raw roads directly refer to intersections 2019-01-17 11:30:58 -08:00
Dustin Carlino
3422877d3d adding a stable ID for raw roads and intersections. way easier to refer to things in the midst of deletions. 2019-01-17 11:10:05 -08:00
Dustin Carlino
52fccbf547 import actual lane spec in synthetic, by parsing OSM tags and stuff 2019-01-16 11:59:00 -08:00
Dustin Carlino
b48bddffc4 make crosswalks when adjacent road has no sidewalks 2019-01-16 09:41:30 -08:00
Dustin Carlino
8fa58a6aae tiny code refactoring in make/turns 2019-01-15 17:38:32 -08:00
Dustin Carlino
e8e119dbbf remove all the polyline shifting/polygon variants that might fail 2019-01-15 15:25:00 -08:00
Dustin Carlino
aae021f478 oops, gigantic change trying to handle bad lane geometry
- debug points and triangles of lanes
- disabled fixes for polylines with points that change angles by 180 and can be fixed by swapping them
- organize intersection polygon code in different methods for the degenerate cases
- try something new for degenerate-two's... fix road centers, then calculate intersection corners. it fixed a few spots!
2019-01-15 13:48:15 -08:00
Dustin Carlino
7579cd9f7e fix orientation of degenerate-2 intersections, which makes shared sidewalk corners actually work 2019-01-15 11:24:54 -08:00
Dustin Carlino
930107793b dedupe pts from intersection polygons without making all Pt2Ds have careful resolution yet. sidewalk corners now need work... 2019-01-12 23:17:05 -08:00
Dustin Carlino
d20e433e7d remove wrappers from Turn -- force callers to think about the geometry
more
2019-01-12 20:00:22 -08:00
Dustin Carlino
9590ee7e78 preps for Pt2D with 1cm resolution... immutable PolyLine, helper for
pt-pt distance
2019-01-12 19:13:16 -08:00
Dustin Carlino
daa55026ae making shift left/right for polyline too 2019-01-12 14:13:15 -08:00
Dustin Carlino
caf4006837 explicitly making shift right/left for Line 2019-01-12 13:48:14 -08:00
Dustin Carlino
c50013c583 dont mouseover parcels 2019-01-12 10:47:36 -08:00
Dustin Carlino
47b5d2e4aa upgrade all other deps, except for piston/winit stuff 2019-01-11 12:36:20 -08:00
Dustin Carlino
c09fa98f57 upgrade a few dependencies 2019-01-11 10:55:58 -08:00
Dustin Carlino
d95099efbe basic installation instructions, and tweaks to scripts so that things
work better out-of-box
2019-01-11 10:04:56 -08:00
Dustin Carlino
2bc97fa609 adjust stuck car color, avoid weird black. and small clippy fixes 2019-01-10 19:58:12 -08:00
Dustin Carlino
eefd9abdc6 render cars using slice 2019-01-10 17:11:34 -08:00
Dustin Carlino
42bb13eceb looking into broken 3-ways, but giving up for now 2019-01-10 14:16:41 -08:00
Dustin Carlino
ab58cca805 making degenerate-2 intersections nicer 2019-01-10 12:48:26 -08:00
Dustin Carlino
c2a1cac4d0 handling some 3-way intersections much more gracefully by acknowledging only one corner might exist for a road band 2019-01-10 12:18:37 -08:00
Dustin Carlino
c70057d46e finding an intersection pt, then going back to find the angle, sometimes
fails due to floating point nonsense, so combo the query to fix a few
more cases
2019-01-10 12:03:14 -08:00
Dustin Carlino
432415768e rm dead code 2019-01-10 11:25:48 -08:00
Dustin Carlino
04a6f3547c make lane center pts based on trimmed road center pts 2019-01-10 10:49:34 -08:00
Dustin Carlino
efe9d6b8cc dont make the polygon too big. 2019-01-10 10:39:26 -08:00
Dustin Carlino
374a44e0f2 slow is smooth, smooth is (more) correct 2019-01-10 10:36:21 -08:00
Dustin Carlino
884c47cc6b just focus on one intersection... 2019-01-10 10:06:37 -08:00
Dustin Carlino
cb47c4b13d debug intersection polygon 2019-01-10 09:57:47 -08:00
Dustin Carlino
7960601ff9 WIP trying to get perpendiculars on the road center... 2019-01-10 09:48:47 -08:00
Dustin Carlino
087e3ad492 WIP new simple idea for intersection geometry 2019-01-10 09:10:08 -08:00
Dustin Carlino
ae6f8d5e16 show entire signal diagram when hovering 2018-12-23 21:11:30 -08:00
Dustin Carlino
3a05df662c oops, intersection merging skipped over adjacently ID'd short roads.
this exposed more bugs with tiny loop roads that get created. those
are... sort of dealt with now, but they have pretty bad geometry.
disable intersection merging completely, since it's so broken.
2018-12-20 15:10:20 -08:00
Dustin Carlino
07ae4737ae avoid composite turns that loop around 2018-12-20 14:00:24 -08:00
Dustin Carlino
0c2a389f96 dont draw complicated stop sign depiction when hovering. simplify lots of the rendering hints, also fixing up traffic signal crosswalk depiction. 2018-12-20 11:28:42 -08:00
Dustin Carlino
cdc9c58ab4 start tutorial mode centered on the right thing. improve map label API by returning references. 2018-12-18 09:57:51 -08:00
Dustin Carlino
2a8842aa00 brief round of clippy 2018-12-14 11:13:05 -08:00
Dustin Carlino
0f1c475ab7 simplify tutorial map, actually count cars spawning now 2018-12-14 10:55:21 -08:00
Dustin Carlino
0cbc2e5d7e making intersection merging work everywhere: skip dead-ends, don't panic
when stop sign doesn't cover all turns
2018-12-11 17:41:44 -08:00
Dustin Carlino
31fc08e1b7 apply intersection merging EVERYWHERE... but actually, keep it disabled.
seeing some other bug.
2018-12-11 16:14:55 -08:00
Dustin Carlino
0470e676bc move the intersection merging logic to the right module. delete the old logic. 2018-12-11 16:01:46 -08:00
Dustin Carlino
9bca0788b6 extract out the HalfMap deleter logic 2018-12-11 15:54:03 -08:00
Dustin Carlino
65882cf0d9 improve intersection polygon by using two points per lane. apply it to all intersections as a second pass. 2018-12-11 15:48:55 -08:00
Dustin Carlino
44c9b66d13 merge two related intersections, still hardcoded, but making sure applying the fix both orders has the same results 2018-12-11 15:39:09 -08:00
Dustin Carlino
dc8e098fc2 way nicer merged intersection geometry 2018-12-11 15:30:36 -08:00
Dustin Carlino
e267cc7fd4 intersection merging... make the new composite turns 2018-12-11 15:13:13 -08:00
Dustin Carlino
a65b097e12 working on new intersection merging logic for one hardcoded road...
deleting stuff, changing references, compacting IDs
2018-12-11 14:10:35 -08:00
Dustin Carlino
42788363ab more prep for merging intersections... make an intermediate HalfMap structure 2018-12-11 12:49:57 -08:00
Dustin Carlino
de5c02a6c4 preps for merging intersections again... notes and not passing Map
during first few phases of construction
2018-12-11 12:26:21 -08:00
Dustin Carlino
e76dede109 label synthetic intersections 2018-12-10 15:59:48 -08:00
Dustin Carlino
dbfd410b0a force synthetic intersections into being border nodes too 2018-12-10 15:45:34 -08:00
Dustin Carlino
dacd423080 clippy pt4 2018-12-09 12:04:02 -08:00
Dustin Carlino
f48757c5e7 clippy pt2 2018-12-08 19:56:54 -08:00
Dustin Carlino
7363302d5d one key to toggle lane types 2018-12-08 14:15:44 -08:00
Dustin Carlino
91b2b07fbd remove more extern crate's; import macros directly 2018-12-06 11:22:12 -08:00
Dustin Carlino
375a923a9d try removing most extern crate's 2018-12-06 11:00:13 -08:00
Dustin Carlino
f64f411093 upgrade all crates to 2018 in Cargo.toml. this requires switching to
crate:: paths everywhere. not yet fiddling with 'extern crate's
2018-12-06 10:57:31 -08:00
Dustin Carlino
6a0cd7f71e rust 2018: run the new fmt, delete the unneeded script 2018-12-06 10:05:50 -08:00
Dustin Carlino
546213e82b couple together crosswalks in stop sign editor 2018-12-05 11:01:01 -08:00
Dustin Carlino
636eb1fb1c overriding crosswalk colors for stop signs 2018-12-05 10:57:12 -08:00
Dustin Carlino
6295d6b2e7 drawing turns at a stop sign 2018-12-05 10:34:08 -08:00
Dustin Carlino
3198ade5d1 add a 4th turn priority... can completely ban turns. make pathfinding
pay attention to this.
2018-12-05 09:48:22 -08:00
Dustin Carlino
e640c6d46d let user invoke presets 2018-12-04 15:29:42 -08:00
Dustin Carlino
06bd34b1f4 move cycles up/down, delete them, add them 2018-12-04 15:01:33 -08:00
Dustin Carlino
4a1281d110 add more assertions to traffic signals; be paranoid 2018-12-04 14:00:27 -08:00
Dustin Carlino
11f89c0ee5 one key to toggle through priorities 2018-12-04 13:52:53 -08:00
Dustin Carlino
5ea6e0ea18 adjust possible controls 2018-12-04 13:06:16 -08:00
Dustin Carlino
1bb146fe23 couple crosswalk turn pairs together in a cycle 2018-12-04 12:52:59 -08:00
Dustin Carlino
952bbf64dd remove redundant internal Turns enum 2018-12-04 12:07:23 -08:00
Dustin Carlino
ac4c7a5b83 edit cycle time 2018-12-04 11:44:34 -08:00
Dustin Carlino
2c7abcbc3a hiding crosswalks way more sanely 2018-12-04 11:08:18 -08:00
Dustin Carlino
3155bcbaf1 drawing a box to show time left in current cycle 2018-12-04 08:33:24 -08:00
Dustin Carlino
67ce42e2f6 give peds precedence over cars, and subsequently simplify the wacky crosswalk coloring 2018-12-03 17:34:56 -08:00
Dustin Carlino
dbc8f40fa8 traffic signal editor: draw full turns of current cycle and stop showing
turn icons completely
2018-12-03 16:04:57 -08:00
Dustin Carlino
08cc4124fb adjusting crosswalk geometry, so peds actually walk into the intersection a bit 2018-12-03 10:51:02 -08:00
Dustin Carlino
c198a49ad3 changing real turn geometry to be a polyline 2018-12-03 09:25:47 -08:00
Dustin Carlino
5b71f04c97 4-phase cycle with protected lefts. very easy to express. 2018-12-01 20:39:44 -08:00
Dustin Carlino
987b2a4884 merge TurnAngle and TurnType 2018-12-01 16:02:11 -08:00
Dustin Carlino
8ed962a320 implement 3-way traffic signal assignment 2018-12-01 15:43:33 -08:00
Dustin Carlino
1542e3118e refactoring turn angle stuff 2018-12-01 14:51:10 -08:00
Dustin Carlino
503c3c2ca9 warping to turns, with an easily typeable name 2018-12-01 14:29:20 -08:00
Dustin Carlino
e75ef3f9e6 making an easy way to record and dump notes at the end of verbose setup logging, without being tied to a Timer 2018-12-01 13:23:18 -08:00
Dustin Carlino
ac39985f8f smarter traffic signal cycles for four-ways... still breaks, but decent
progress
2018-12-01 13:12:11 -08:00
Dustin Carlino
1489f2fe7f validation for traffic signal assignments too 2018-12-01 11:24:13 -08:00
Dustin Carlino
4d7c1203a6 the great control layer merge 2018-11-30 13:52:50 -08:00
Dustin Carlino
73b2d0ac24 ah, was forgeting multiple ped turns in sequence 2018-11-30 08:47:46 -08:00
Dustin Carlino
87a357d67c adjusting pathfinding costs, trying to figure out why walking routes are awful 2018-11-29 16:47:04 -08:00
Dustin Carlino
ecc5a6efb1 make some percentage of walking trips use transit, if it's reasonable.
haven't observed it working yet.
2018-11-29 14:53:11 -08:00
Dustin Carlino
14097bebfc moving BusRouteID to map_model layer from sim 2018-11-29 12:38:06 -08:00
Dustin Carlino
80e3776855 refactoring cost/heuristic of InternalPathStep 2018-11-29 12:25:01 -08:00
Dustin Carlino
3f635e74c3 making a variant of pathfinding that can abort a walking trip early and
use transit
2018-11-29 12:09:54 -08:00
Dustin Carlino
d529b006cb philosophizing on discrete-event sim. disable intersection merging; it's
mostly incorrect and needs lots more thought.
2018-11-29 08:38:28 -08:00
Dustin Carlino
34f8e93bad dont need pt_and_angle, just pt of Positions 2018-11-28 13:14:49 -08:00
Dustin Carlino
e4e1eb139e automatically merge all short roads 2018-11-28 12:06:09 -08:00
Dustin Carlino
e150ce3aef new test to make sure raw->map conversion is also deterministic, not just convert_osm 2018-11-28 09:36:42 -08:00
Dustin Carlino
e755aeb4ef merging intersections for a hardcoded set of short roads 2018-11-28 09:19:36 -08:00
Dustin Carlino
c2783ab56e making a new Position tuple and equiv_dist_along 2018-11-27 09:55:37 -08:00
Dustin Carlino
cd8d9adec4 radical speedup and simplification to driving state: only store SimQueues for active lanes/turns 2018-11-26 15:40:22 -08:00
Dustin Carlino
56c885e7ab revive the first parking test. make helpers to look up labeled stuff from synthetic maps. make helpers to seed specific parked cars and start certain trips again. 2018-11-26 11:22:17 -08:00
Dustin Carlino
2e8cd7ff7a dont spawn bikes on highway border nodes 2018-11-23 11:03:45 -08:00
Dustin Carlino
5bc9992fc0 using blockface kml in convert_osm to prescribe parking lanes 2018-11-21 22:43:14 -08:00
Dustin Carlino
9e91332b58 matching extra shapes with a particular side of the road 2018-11-21 16:02:08 -08:00
Dustin Carlino
af6ead7d56 refactor sidewalk finder to use FindClosest 2018-11-21 15:48:16 -08:00
Dustin Carlino
bd67d88bab adjust the blockface<->road matching 2018-11-21 15:39:49 -08:00
Dustin Carlino
20b79038f4 dont clone bounds by default 2018-11-21 14:55:26 -08:00
Dustin Carlino
48709b60a0 making a general helper for finding closest stuff... using it to match extra shapes to road center lines 2018-11-21 14:32:15 -08:00
Dustin Carlino
ca95c58b3b fix a path trace bug for paths with one step, but no geometry 2018-11-21 10:00:40 -08:00
Dustin Carlino
a3dc7e0bee remove pathfinding requirement that lane types of start/end match up, now that bike/bus lanes are used 2018-11-20 13:39:20 -08:00
Dustin Carlino
7278719a04 consolidating all of the road query methods 2018-11-20 13:36:10 -08:00