Skip to content

Commit

Permalink
moving d_microAccTime to preprocessor
Browse files Browse the repository at this point in the history
  • Loading branch information
dhensle committed May 4, 2024
1 parent 85c1ecb commit 3051c14
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
8 changes: 6 additions & 2 deletions configs/resident/trip_destination.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,7 @@ PRIMARY_DEST: tour_leg_dest # must be created in preprocessor
# (it is assigned in trip_destination_annotate_trips_preprocessor )
REDUNDANT_TOURS_MERGED_CHOOSER_COLUMNS:
- tour_mode



preprocessor:
SPEC: trip_destination_annotate_trips_preprocessor
DF: trips
Expand All @@ -37,6 +35,12 @@ preprocessor:
- households
- land_use

alts_preprocessor:
SPEC: trip_destination_annotate_alts_preprocessor
DF: trips
TABLES:
- land_use


# drop failed trips and cleanup failed trip leg_mates for consistency
# (i.e. adjust trip_count, trip_num, first for missing failed trips)
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
Description,Target,Expression
max micromobility access time at destination,d_microAccTime,"land_use.sort_values(by='MicroAccessTime',ascending=False).drop_duplicates('TAZ',keep='first').set_index('TAZ')['MicroAccessTime'].reindex(df.index)"
4 changes: 1 addition & 3 deletions configs/resident/trip_destination_sample.csv
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ Description,Expression,work,univ,school,escort,shopping,eatout,othmaint,social,o
,_op_DIST@op_skims['DIST'],1,1,1,1,1,1,1,1,1,1
,_od_bikeL@odt_skims['BIKE_LOGSUM'],1,1,1,1,1,1,1,1,1,1
,_dp_bikeL@dpt_skims['BIKE_LOGSUM'],1,1,1,1,1,1,1,1,1,1
# next line gets max MAZ micromobility access time in destination TAZ
,"_d_microAccTime@land_use.sort_values(by='MicroAccessTime',ascending=False).drop_duplicates('TAZ',keep='first').set_index('TAZ')['MicroAccessTime'].reindex(df.dest_taz)",1,1,1,1,1,1,1,1,1,1
#,,,,,,,,,,,
size term,"@np.log1p(size_terms.get(df.dest_taz, df.purpose)) # sharrow: np.log1p(size_terms['sizearray'])",1,1,1,1,1,1,1,1,1,1
no attractions,"@size_terms.get(df.dest_taz, df.purpose) == 0 # sharrow: size_terms['sizearray'] == 0",-999,-999,-999,-999,-999,-999,-999,-999,-999,-999
Expand All @@ -19,4 +17,4 @@ no attractions,"@size_terms.get(df.dest_taz, df.purpose) == 0 # sharrow: size_te
,@df.bikeTour * (_dp_bikeL < -300),-999,-999,-999,-999,-999,-999,-999,-999,-999,-999
#,,,,,,,,,,,
,@(df.nonmotorTour==0) * (_od_DIST + _dp_DIST - _op_DIST),-0.05,-0.05,-0.05,-0.05,-0.05,-0.05,-0.05,-0.05,-0.05,-0.05
,"@(df.microTour * (np.where(_d_microAccTime > microAccessThreshold,1,0) + np.where(df.o_MicroAccessTime > microAccessThreshold,1,0)))",-10,-10,-10,-10,-10,-10,-10,-10,-10,-10
,"@(df.microTour * (np.where(df.d_microAccTime > microAccessThreshold,1,0) + np.where(df.o_MicroAccessTime > microAccessThreshold,1,0)))",-10,-10,-10,-10,-10,-10,-10,-10,-10,-10

0 comments on commit 3051c14

Please sign in to comment.