Skip to content

Commit

Permalink
write parking_taz as destination if parking_location was run.
Browse files Browse the repository at this point in the history
  • Loading branch information
Clint Daniels committed Oct 1, 2020
1 parent dfdb3fa commit fe5a5d9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions activitysim/abm/models/trip_matrices.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,12 @@ def write_trip_matrices(trips, skim_dict, skim_stack):
if bool(model_settings.get('SAVE_TRIPS_TABLE')):
pipeline.replace_table('trips', trips_df)

if 'parking_location' in config.setting('models'):
parking_settings = config.read_model_settings('parking_location.yaml')
parking_taz_col_name = parking_settings['ALT_DEST_COL_NAME']
if parking_taz_col_name in trips_df:
trips_df.loc[trips_df[parking_taz_col_name] > 0, 'destination'] = trips_df[parking_taz_col_name]

logger.info('Aggregating trips...')
aggregate_trips = trips_df.groupby(['origin', 'destination'], sort=False).sum()

Expand Down

0 comments on commit fe5a5d9

Please sign in to comment.