Skip to content

Commit

Permalink
Merge pull request #21 from ActivitySim/sharrow-test
Browse files Browse the repository at this point in the history
Fix sharrow test mode crashes
  • Loading branch information
jpn-- authored Jun 20, 2024
2 parents f0fbc8f + 57915ab commit 8b58e69
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 13 deletions.
24 changes: 12 additions & 12 deletions configs/resident/tour_mode_choice.csv
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ util_WALK_MIX - Origin Mix,WALK_MIX - Origin Mix,oMGRAMix,,,,,,,,coef_oMix_wTran
util_WALK_MIX - Origin Intersection Density,WALK_MIX - Origin Intersection Density,oMGRATotInt,,,,,,,,coef_oIntDen_wTran,,,,,,,,,,,,,,,
util_WALK_MIX - Destination Employment Density,WALK_MIX - Destination Employment Density,dMGRAEmpDen,,,,,,,,coef_dEmpDen_wTran,,,,,,,,,,,,,,,
#,PNR_LOC,,,,,,,,,,,,,,,,,,,,,,,,
util_PNR_LOC_Unavailable,PNR_LOC - Unavailable,"@(df.pnr_local_available == False)|(df.get('num_escortees', 0)>0)",,,,,,,,,-999,,,,,,,,,,,,,,
util_PNR_LOC_Unavailable,PNR_LOC - Unavailable,"@(df.pnr_local_available == False)|(df.num_escortees>0)",,,,,,,,,-999,,,,,,,,,,,,,,
util_PNRTransit_0Auto,PNRTransit_0Auto,@(df.auto_ownership==0),,,,,,,,,-999,,,,,,,,,,,,,,
util_PNR_LOC_Unavailable_for_persons_less_than_16,PNR_LOC - Unavailable for persons less than 16,age < 16,,,,,,,,,-999,,,,,,,,,,,,,,
util_PNR_LOC_In_vehicle_time,PNR_LOC - In-vehicle time,@(odt_skims['PNROUT_LOC_TOTALIVTT'] + dot_skims['PNRIN_LOC_TOTALIVTT'])*df.time_factor,,,,,,,,,coef_ivt,,,,,,,,,,,,,,
Expand All @@ -149,7 +149,7 @@ util_PNR_LOC - Age 65+,PNR_LOC - Age 65+,@(df.age > 65),,,,,,,,,coef_age65pl_tra
util_PNR_LOC - Female,PNR_LOC - Female,@(df.female),,,,,,,,,coef_female_tran,,,,,,,,,,,,,,
util_PNR_LOC - Destination Employment Density,PNR_LOC - Destination Employment Density,dMGRAEmpDen,,,,,,,,,coef_dEmpDen_dTran,,,,,,,,,,,,,,
#,PNR_PRM,,,,,,,,,,,,,,,,,,,,,,,,
util_PNR_PRM_Unavailable,PNR_PRM - Unavailable,"@(df.pnr_premium_available == False)|(df.get('num_escortees', 0)>0)",,,,,,,,,,-999,,,,,,,,,,,,,
util_PNR_PRM_Unavailable,PNR_PRM - Unavailable,"@(df.pnr_premium_available == False)|(df.num_escortees>0)",,,,,,,,,,-999,,,,,,,,,,,,,
util_PNR_PRM_Transit_0Auto,PNRTransit_0Auto,@(df.auto_ownership==0),,,,,,,,,,-999,,,,,,,,,,,,,
util_PNR_PRM_Unavailable_for_persons_less_than_16,PNR_PRM - Unavailable for persons less than 16,@df.age < 16,,,,,,,,,,-999,,,,,,,,,,,,,
util_PNR_PRM_In_vehicle_time,PNR_PRM - In-vehicle time,@(odt_skims['PNROUT_PRM_TOTALIVTT'] + dot_skims['PNRIN_PRM_TOTALIVTT']) *df.time_factor,,,,,,,,,,coef_ivt,,,,,,,,,,,,,
Expand All @@ -173,7 +173,7 @@ util_PNR_PRM - Age 65+,PNR_PRM - Age 65+,@(df.age > 64),,,,,,,,,,coef_age65pl_tr
util_PNR_PRM - Female,PNR_PRM - Female,@(df.female),,,,,,,,,,coef_female_tran,,,,,,,,,,,,,
util_PNR_PRM - Destination Employment Density,PNR_PRM - Destination Employment Density,dMGRAEmpDen,,,,,,,,,,coef_dEmpDen_dTran,,,,,,,,,,,,,
#,PNR_MIX,,,,,,,,,,,,,,,,,,,,,,,,
util_PNR_MIX_Unavailable,PNR_mix - Unavailable,"@(df.pnr_mix_available == False)|(df.get('num_escortees', 0)>0)",,,,,,,,,,,-999,,,,,,,,,,,,
util_PNR_MIX_Unavailable,PNR_mix - Unavailable,"@(df.pnr_mix_available == False)|(df.num_escortees>0)",,,,,,,,,,,-999,,,,,,,,,,,,
util_PNR_MIX_Transit_0Auto,PNRTransit_0Auto,@(df.auto_ownership==0),,,,,,,,,,,-999,,,,,,,,,,,,
util_PNR_PRM_Unavailable_for_persons_less_than_16,PNR_mix - Unavailable for persons less than 16,@df.age < 16,,,,,,,,,,,-999,,,,,,,,,,,,
util_PNR_MIX_In_vehicle_time,PNR_MIX - In-vehicle time,@(odt_skims['PNROUT_MIX_TOTALIVTT'] + dot_skims['PNRIN_MIX_TOTALIVTT']) *df.time_factor,,,,,,,,,,,coef_ivt,,,,,,,,,,,,
Expand All @@ -197,7 +197,7 @@ util_PNR_MIX - Age 65+,PNR_MIX - Age 65+,@(df.age > 64),,,,,,,,,,,coef_age65pl_t
util_PNR_MIX - Female,PNR_MIX - Female,@(df.female),,,,,,,,,,,coef_female_tran,,,,,,,,,,,,
util_PNR_MIX - Destination Employment Density,PNR_MIX - Destination Employment Density,dMGRAEmpDen,,,,,,,,,,,coef_dEmpDen_dTran,,,,,,,,,,,,
#,,,,,,,,,,,,,,,,,,,,,,,,,
util_KNR_LOC_Unavailable,KNR_LOC - Unavailable,"@(df.knr_local_available == False)|(df.get('num_escortees', 0)>0)",,,,,,,,,,,,-999,,,,,,,,,,,
util_KNR_LOC_Unavailable,KNR_LOC - Unavailable,"@(df.knr_local_available == False)|(df.num_escortees>0)",,,,,,,,,,,,-999,,,,,,,,,,,
util_KNR_LOC_In_vehicle_time,KNR_LOC - In-vehicle time,@(odt_skims['KNROUT_LOC_TOTALIVTT'] + dot_skims['KNRIN_LOC_TOTALIVTT']) *df.time_factor,,,,,,,,,,,,coef_ivt,,,,,,,,,,,
util_KNR_LOC_iwait_time,KNR_LOC - First iwait time,@(odt_skims['KNROUT_LOC_FIRSTWAIT']) + (dot_skims['KNRIN_LOC_FIRSTWAIT'])*df.time_factor,,,,,,,,,,,,coef_wait,,,,,,,,,,,
util_KNR_LOC_transfer_wait_time,KNR_LOC - transfer wait time,@(odt_skims['KNROUT_LOC_XFERWAIT'] + dot_skims['KNRIN_LOC_XFERWAIT'])*df.time_factor,,,,,,,,,,,,coef_xwait,,,,,,,,,,,
Expand All @@ -214,7 +214,7 @@ util_KNR_LOC - Age 65+,KNR_LOC - Age 65+,@(df.age > 64),,,,,,,,,,,,coef_age65pl_
util_KNR_LOC - Female,KNR_LOC - Female,@(df.female),,,,,,,,,,,,coef_female_tran,,,,,,,,,,,
util_KNR_LOC - Destination Employment Density,KNR_LOC - Destination Employment Density,dMGRAEmpDen,,,,,,,,,,,,coef_dEmpDen_dTran,,,,,,,,,,,
#,KNR_PRM,,,,,,,,,,,,,,,,,,,,,,,,
util_KNR_PRM_Unavailable,KNR_PRM - Unavailable,"@(df.knr_premium_available == False)|(df.get('num_escortees', 0)>0)",,,,,,,,,,,,,-999,,,,,,,,,,
util_KNR_PRM_Unavailable,KNR_PRM - Unavailable,"@(df.knr_premium_available == False)|(df.num_escortees>0)",,,,,,,,,,,,,-999,,,,,,,,,,
util_KNR_PRM_In_vehicle_time,KNR_PRM - In-vehicle time,@(odt_skims['KNROUT_PRM_TOTALIVTT'] + dot_skims['KNRIN_PRM_TOTALIVTT']) *df.time_factor,,,,,,,,,,,,,coef_ivt,,,,,,,,,,
util_KNR_PRM_In_vehicle_time_on_LRT,KNR_PRM - In-vehicle time on LRT,@(ivt_lrt_multiplier - 1) * (odt_skims['KNROUT_PRM_LRTIVTT'] + dot_skims['KNRIN_PRM_LRTIVTT'])*df.time_factor,,,,,,,,,,,,,coef_ivt,,,,,,,,,,
util_KNR_PRM_In_vehicle_time_on_CMR,KNR_PRM - In-vehicle time on CMR,@(ivt_cmr_multiplier - 1) * (odt_skims['KNROUT_PRM_CMRIVTT'] + dot_skims['KNRIN_PRM_CMRIVTT'])*df.time_factor,,,,,,,,,,,,,coef_ivt,,,,,,,,,,
Expand All @@ -236,7 +236,7 @@ util_KNR_PRM - Age 65+,KNR_PRM - Age 65+,@(df.age > 64),,,,,,,,,,,,,coef_age65pl
util_KNR_PRM - Female,KNR_PRM - Female,@(df.female),,,,,,,,,,,,,coef_female_tran,,,,,,,,,,
util_KNR_PRM - Destination Employment Density,KNR_PRM - Destination Employment Density,dMGRAEmpDen,,,,,,,,,,,,,coef_dEmpDen_dTran,,,,,,,,,,
#,KNR_MIX,,,,,,,,,,,,,,,,,,,,,,,,
util_KNR_MIX_Unavailable,KNR_mix - Unavailable,"@(df.knr_mix_available == False)|(df.get('num_escortees', 0)>0)",,,,,,,,,,,,,,-999,,,,,,,,,
util_KNR_MIX_Unavailable,KNR_mix - Unavailable,"@(df.knr_mix_available == False)|(df.num_escortees>0)",,,,,,,,,,,,,,-999,,,,,,,,,
util_KNR_MIX_In_vehicle_time,KNR_MIX - In-vehicle time,@(odt_skims['KNROUT_MIX_TOTALIVTT'] + dot_skims['KNRIN_MIX_TOTALIVTT']) *df.time_factor,,,,,,,,,,,,,,coef_ivt,,,,,,,,,
util_KNR_MIX_In_vehicle_time_on_Bus,KNR_MIX - In-vehicle time on Bus,@(odt_skims['KNROUT_MIX_BUSIVTT'] + dot_skims['KNRIN_MIX_BUSIVTT']) *df.time_factor,,,,,,,,,,,,,,coef_ivt,,,,,,,,,
util_KNR_MIX_In_vehicle_time_on_LRT,KNR_MIX - In-vehicle time on LRT,@(ivt_lrt_multiplier - 1) * (odt_skims['KNROUT_MIX_LRTIVTT'] + dot_skims['KNRIN_MIX_LRTIVTT']) *df.time_factor,,,,,,,,,,,,,,coef_ivt,,,,,,,,,
Expand All @@ -259,7 +259,7 @@ util_KNR_MIX - Age 65+,KNR_MIX - Age 65+,@(df.age > 64),,,,,,,,,,,,,,coef_age65p
util_KNR_MIX - Female,KNR_MIX - Female,@(df.female),,,,,,,,,,,,,,coef_female_tran,,,,,,,,,
util_KNR_MIX - Destination Employment Density,KNR_MIX - Destination Employment Density,dMGRAEmpDen,,,,,,,,,,,,,,coef_dEmpDen_dTran,,,,,,,,,
#,,,,,,,,,,,,,,,,,,,,,,,,,
util_TNC_LOC_Unavailable,TNC_LOC - Unavailable,"@(df.tnc_local_available == False)|(df.get('num_escortees', 0)>0)",,,,,,,,,,,,,,,-999,,,,,,,,
util_TNC_LOC_Unavailable,TNC_LOC - Unavailable,"@(df.tnc_local_available == False)|(df.num_escortees>0)",,,,,,,,,,,,,,,-999,,,,,,,,
util_TNC_LOC_Unavailable_for_persons_less_than_16,TNC_LOC - Unavailable for persons less than 16,age < 12,,,,,,,,,,,,,,,-999,,,,,,,,
util_TNC_LOC_In_vehicle_time,TNC_LOC - In-vehicle time,@(odt_skims['TNCOUT_LOC_TOTALIVTT'] + dot_skims['TNCIN_LOC_TOTALIVTT']) *df.time_factor,,,,,,,,,,,,,,,coef_ivt,,,,,,,,
util_TNC_LOC_iwait_time,TNC_LOC - First iwait time,@(odt_skims['TNCOUT_LOC_FIRSTWAIT']) + (dot_skims['TNCIN_LOC_FIRSTWAIT'])*df.time_factor,,,,,,,,,,,,,,,coef_wait,,,,,,,,
Expand All @@ -276,7 +276,7 @@ util_TNC_LOC - Age 65+,TNC_LOC - Age 65+,@(df.age > 64),,,,,,,,,,,,,,,coef_age65
util_TNC_LOC - Female,TNC_LOC - Female,@(df.female),,,,,,,,,,,,,,,coef_female_tran,,,,,,,,
util_TNC_LOC - Destination Employment Density,TNC_LOC - Destination Employment Density,dMGRAEmpDen,,,,,,,,,,,,,,,coef_dEmpDen_dTran,,,,,,,,
#,TNC_PRM,,,,,,,,,,,,,,,,,,,,,,,,
util_TNC_PRM_Unavailable,TNC_PRM - Unavailable,"@(df.tnc_premium_available == False)|(df.get('num_escortees', 0)>0)",,,,,,,,,,,,,,,,-999,,,,,,,
util_TNC_PRM_Unavailable,TNC_PRM - Unavailable,"@(df.tnc_premium_available == False)|(df.num_escortees>0)",,,,,,,,,,,,,,,,-999,,,,,,,
util_TNC_PRM_Unavailable_for_persons_less_than_16,TNC_PRM - Unavailable for persons less than 12,@df.age < 12,,,,,,,,,,,,,,,,-999,,,,,,,
util_TNC_PRM_In_vehicle_time,TNC_PRM - In-vehicle time,@(odt_skims['TNCOUT_PRM_TOTALIVTT'] + dot_skims['TNCIN_PRM_TOTALIVTT']) *df.time_factor,,,,,,,,,,,,,,,,coef_ivt,,,,,,,
util_TNC_PRM_In_vehicle_time_on_LRT,TNC_PRM - In-vehicle time on LRT,@(ivt_lrt_multiplier - 1) * (odt_skims['TNCOUT_PRM_LRTIVTT'] + dot_skims['TNCIN_PRM_LRTIVTT'])*df.time_factor,,,,,,,,,,,,,,,,coef_ivt,,,,,,,
Expand All @@ -298,7 +298,7 @@ util_TNC_PRM - Age 65+,TNC_PRM - Age 65+,@(df.age > 64),,,,,,,,,,,,,,,,coef_age6
util_TNC_PRM - Female,TNC_PRM - Female,@(df.female),,,,,,,,,,,,,,,,coef_female_tran,,,,,,,
util_TNC_PRM - Destination Employment Density,TNC_PRM - Destination Employment Density,dMGRAEmpDen,,,,,,,,,,,,,,,,coef_dEmpDen_dTran,,,,,,,
#,TNC_MIX,,,,,,,,,,,,,,,,,,,,,,,,
util_TNC_MIX_Unavailable,TNC_mix - Unavailable,"@(df.tnc_mix_available == False)|(df.get('num_escortees', 0)>0)",,,,,,,,,,,,,,,,,-999,,,,,,
util_TNC_MIX_Unavailable,TNC_mix - Unavailable,"@(df.tnc_mix_available == False)|(df.num_escortees>0)",,,,,,,,,,,,,,,,,-999,,,,,,
util_TNC_PRM_Unavailable_for_persons_less_than_16,TNC_mix - Unavailable for persons less than 16,@df.age < 12,,,,,,,,,,,,,,,,,-999,,,,,,
util_TNC_MIX_In_vehicle_time,TNC_MIX - In-vehicle time,@(odt_skims['TNCOUT_MIX_TOTALIVTT'] + dot_skims['TNCIN_MIX_TOTALIVTT']) *df.time_factor,,,,,,,,,,,,,,,,,coef_ivt,,,,,,
util_TNC_MIX_In_vehicle_time_on_LRT,TNC_MIX - In-vehicle time on LRT,@(ivt_lrt_multiplier - 1) * (odt_skims['TNCOUT_MIX_LRTIVTT'] + dot_skims['TNCIN_MIX_LRTIVTT']) *df.time_factor,,,,,,,,,,,,,,,,,coef_ivt,,,,,,
Expand Down Expand Up @@ -358,10 +358,10 @@ util_calib_autosufficienth,abm2+ calibration constant,@(df.is_joint & (df.auto_o
#util_calib_c_ivtebikeowner,abm2+ calibration constant,time_factor*(ebikeOwnership*(maxEbikeBenefit*(-1))),,,,,coef_calib_civtebikeownership_BIKE,,,,,,,,,,,,,,,,,,
util_calib_escorttour,abm2+ calibration constant,tour_type == 'escort',,,,coef_calib_escorttour_WALK,coef_calib_escorttour_BIKE,coef_calib_escorttour_WALK_TRANSIT,coef_calib_escorttour_WALK_TRANSIT,coef_calib_escorttour_WALK_TRANSIT,coef_calib_escorttour_PNR_TRANSIT,coef_calib_escorttour_PNR_TRANSIT,coef_calib_escorttour_PNR_TRANSIT,coef_calib_escorttour_KNR_TRANSIT,coef_calib_escorttour_KNR_TRANSIT,coef_calib_escorttour_KNR_TRANSIT,coef_calib_escorttour_TNC_TRANSIT,coef_calib_escorttour_TNC_TRANSIT,coef_calib_escorttour_TNC_TRANSIT,,,,,,
#, School Escorting eligibility-odd looking where/isnan is to allow this to work with numba fastmath,,,,,,,,,,,,,,,,,,,,,,,,
util_one_or_more_school_escort,No SOV if on school escort tour,"@(np.where(np.isnan(df.get('num_escortees', 0)), 0 , df.get('num_escortees', 0)) >= 1)",-999,,,,,,,,,,,,,,,,,,,,,,
util_two_or_more_school_escort,Can't take HOV2 if taking two children and yourself,"@(np.where(np.isnan(df.get('num_escortees', 0)), 0 , df.get('num_escortees', 0)) >= 2)",,-999,,,,,,,,,,,,,,,,,,,,,
util_one_or_more_school_escort,No SOV if on school escort tour,"@(np.where(np.isnan(df.num_escortees), 0 , df.num_escortees) >= 1)",-999,,,,,,,,,,,,,,,,,,,,,,
util_two_or_more_school_escort,Can't take HOV2 if taking two children and yourself,"@(np.where(np.isnan(df.num_escortees), 0 , df.num_escortees) >= 2)",,-999,,,,,,,,,,,,,,,,,,,,,
#,Micromobility (e-scooter/e-bike),,,,,,,,,,,,,,,,,,,,,,,,
util_micromobility_long_access,Shut off micromobility if access time > threshold,"@((df.micro_access_out > microAccessThreshold) | (df.micro_access_inb > microAccessThreshold)|(df.get('num_escortees', 0)>0))",,,,,,,,,,,,,,,,,,,,,,-999,-999
util_micromobility_long_access,Shut off micromobility if access time > threshold,"@((df.micro_access_out > microAccessThreshold) | (df.micro_access_inb > microAccessThreshold)|(df.num_escortees>0))",,,,,,,,,,,,,,,,,,,,,,-999,-999
util_micromobility_long_trip,Shut off ebike if distance > threshold,ebikeMaxDistance,,,,,,,,,,,,,,,,,,,,,,-999,
util_micromobility_long_trip,Shut off escooter if distance > threshold,escooterMaxDistance,,,,,,,,,,,,,,,,,,,,,,,-999
util_ebike_ivt,Ebike utility for in-vehicle time,@(df.ebike_time_inb + df.ebike_time_out)*df.time_factor,,,,,,,,,,,,,,,,,,,,,,coef_ivt,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -299,4 +299,6 @@ microtransit/nev egress transfer,mtnev_egr_xfer,microtransit_egress_available |
# transit subsidi pass discount
transit pas subsidy,transit_pass_subsidy,"df.get('transit_pass_subsidy', False)"
transit pass ownership,transit_pass_ownership,"df.get('transit_pass_ownership', False)"
transit subsidi pass discount, transitSubsidyPassDiscount,"np.where(transit_pass_subsidy | transit_pass_ownership,0,1)",
transit subsidi pass discount, transitSubsidyPassDiscount,"np.where(transit_pass_subsidy | transit_pass_ownership,0,1)",
num escortees,num_escortees,"df.get('num_escortees', 0)"
num_escortees,num_escortees,"np.where(num_escortees.isnull() | (num_escortees==''), 0, num_escortees)"

0 comments on commit 8b58e69

Please sign in to comment.