Skip to content

Commit 2f5c0f8

Browse files
authored
Merge pull request #274 from SANDAG/escort_participants_string
Force AV allocation to read escort_participants as string
2 parents ac77fbc + 7bcb894 commit 2f5c0f8

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

src/asim/configs/resident/write_trip_matrices_annotate_trips_preprocessor.csv

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -483,3 +483,5 @@ Description,Target,Expression
483483
,origin_purpose,"np.where(trips.trip_count == 1 & (trips.primary_purpose == 'atwork'), 'work', origin_purpose)"
484484
,origin_purpose,"np.where((trips.trip_count > 1) & (trips.trip_num==1) & (trips.outbound), 'home', origin_purpose)"
485485
,origin_purpose,"np.where(((trips.trip_count > 1) & (trips.trip_num>1)) | ((trips.trip_count > 1) & (trips.trip_num==1) & ~(trips.outbound)), trips['purpose'].shift(1), origin_purpose)"
486+
#AV allocation model needs column to be entirely in string format,,
487+
,escort_participants,"np.where(trips.escort_participants.isna() | trips.escort_participants == '',trips.escort_participants,'_'+trips.escort_participants)"

src/asim/visualizer/visualizer/config/user_added_functions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
def get_escort_participant_list(escort_participants):
22
if type(escort_participants) == str:
3-
return [int(participant) for participant in escort_participants.split('_')]
3+
return [int(participant) for participant in escort_participants.split('_')[1:]]
44
else:
55
return []
66

0 commit comments

Comments
 (0)