From e161d4c71efaa1775bcec35bec1b9eae82065eaf Mon Sep 17 00:00:00 2001 From: Ali Etezady <58451076+aletzdy@users.noreply.github.com> Date: Tue, 21 May 2024 10:14:26 -0700 Subject: [PATCH] modifying bike availability in resident trip mode choice #120 This fixes issue on having bike trips with 0 times. This issue happens due to school escorting model inserting stops on bike tours too far to be reached by bike. These trips are now accomplished by sr2 or sr3. sre2 and sr3 trips on bike tours are disadvantaged (utile -30) so they be picked as a last option --- .../configs/resident/trip_mode_choice.csv | 4 ++- .../trip_mode_choice_coefficients.csv | 28 +++++++++---------- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/src/asim/configs/resident/trip_mode_choice.csv b/src/asim/configs/resident/trip_mode_choice.csv index 2e6a902dc..77cb56123 100644 --- a/src/asim/configs/resident/trip_mode_choice.csv +++ b/src/asim/configs/resident/trip_mode_choice.csv @@ -8,6 +8,7 @@ util_Drive alone - Parking cost ,Drive alone - Parking cost ,"@(df.parkingCost * util_Drive alone - Terminal Time,Drive alone - Terminal Time,(oTermTime + dTermTime) * autoTermTimeFactor * time_factor,coef_acctime,,,,,,,,,,,,,,,,,,,,,, #,Shared ride2,,,,,,,,,,,,,,,,,,,,,,,, util_sr2_available,sr2 available,sr2_available == False,,-999,,,,,,,,,,,,,,,,,,,,, +util_sr2_tourbike_disadvantage,sr2 tourbike disadvantage,tourBike,,-30,,,,,,,,,,,,,,,,,,,,, util_Shared ride 2 - In -vehicle time,Shared ride 2 - In -vehicle time,(s2_time_skims) * autoIVTFactor * time_factor,,coef_ivt,,,,,,,,,,,,,,,,,,,,, util_Shared ride 2 - reliability,Shared ride 2 - reliability,"@df.s2_rel_skims/np.maximum(df.s2_dist_skims,0.1) * df.time_factor",,coef_rel,,,,,,,,,,,,,,,,,,,,, util_Shared ride 2 - cost,Shared ride 2 - cost,"@((df.auto_op_cost * df.autoCPMFactor * df.s2_dist_skims) + df.s2_cost_skims)/(np.maximum(df.income,1000)**df.income_exponent)",,coef_income,,,,,,,,,,,,,,,,,,,,, @@ -19,6 +20,7 @@ util_Shared ride 2 _Four+_person_household,Shared ride 2 - Four plus person hous util_Shared ride 2 - Female,Shared ride 2 - female,@(df.female == 1),,coef_female_sr2,,,,,,,,,,,,,,,,,,,,, #,Shared ride 3,,,,,,,,,,,,,,,,,,,,,,,, util_sr3_available,sr3 available,sr3_available == False,,,-999,,,,,,,,,,,,,,,,,,,, +util_sr3_tourbike_disadvantage,sr3 tourbike disadvantage,tourBike,,,-30,,,,,,,,,,,,,,,,,,,, util_Shared ride 3 - In -vehicle time,Shared ride 3 - In -vehicle time,(s3_time_skims) * autoIVTFactor * time_factor,,,coef_ivt,,,,,,,,,,,,,,,,,,,, util_Shared ride 3 - reliability,Shared ride 3 - reliability,"@df.s3_rel_skims/np.maximum(df.s3_dist_skims, 0.1) * df.time_factor",,,coef_rel,,,,,,,,,,,,,,,,,,,, util_Shared ride 3 - cost ,Shared ride 3 - cost,"@(df.auto_op_cost * df.s3_dist_skims * df.autoCPMFactor + df.s3_cost_skims)/(np.maximum(df.income,1000)**df.income_exponent)",,,coef_income,,,,,,,,,,,,,,,,,,,, @@ -41,7 +43,7 @@ util_Walk - Age 1-5 (school only),Walk - Age 1-6,"@df.age.between(1,5)",,,,coef_ util_Walk - Age 6-12 (school only),Walk - Age 6-13,"@df.age.between(6,12)",,,,coef_age6to12_nmot,,,,,,,,,,,,,,,,,,, util_Walk - Age 13-15 (school only),Walk - Age 13-16,"@df.age.between(13,15)",,,,coef_age13to15_nmot,,,,,,,,,,,,,,,,,,, #,Bike,,,,,,,,,,,,,,,,,,,,,,,, -util_BIKE_Mode unavailable,Bike - Mode unavailable unless on bike tour,tourBike == 0,,,,,-999,,,,,,,,,,,,,,,,,, +util_BIKE_Mode unavailable,Bike - Mode unavailable unless on bike tour,@(df.tourBike == 0)|(od_skims['BIKE_TIME']<=0),,,,,-999,,,,,,,,,,,,,,,,,, util_BIKE_Female - bike,Bike - Female,@df.female,,,,,coef_female_nmot,,,,,,,,,,,,,,,,,, util_BIKE_Bike - logsum,Bike - logsum clipped to allow for long bike trips on school escort tours,@df.bikeLS.clip(lower=-100),,,,,coef_bikeLogsum,,,,,,,,,,,,,,,,,, #,WalktoTransit,,,,,,,,,,,,,,,,,,,,,,,, diff --git a/src/asim/configs/resident/trip_mode_choice_coefficients.csv b/src/asim/configs/resident/trip_mode_choice_coefficients.csv index 43cbad3d4..10e05ad44 100644 --- a/src/asim/configs/resident/trip_mode_choice_coefficients.csv +++ b/src/asim/configs/resident/trip_mode_choice_coefficients.csv @@ -199,8 +199,8 @@ coef_calib_civt5max10sovdistski_TNC_TRANSIT_work,1.0,F coef_calib_civtmax200133sovdist_WALK_TRANSIT_work,1.0,F coef_calib_civtmax4525sovdistsk_PNR_TRANSIT_work,1.0,F coef_calib_tourbike_DRIVEALONE_work,-999.0,F -coef_calib_tourbike_SHARED2_work,-999.0,F -coef_calib_tourbike_SHARED3_work,-999.0,F +coef_calib_tourbike_SHARED2_work,0.0,F +coef_calib_tourbike_SHARED3_work,0.0,F coef_calib_tourbike_WALK_work,-44.0,F coef_calib_tourbike_BIKE_work,-0.3227686816960651,F coef_calib_tourbike_WALK_TRANSIT_work,-999.0,F @@ -402,8 +402,8 @@ coef_calib_civt5max10sovdistski_TNC_TRANSIT_univ,1.0,F coef_calib_civtmax200133sovdist_WALK_TRANSIT_univ,1.0,F coef_calib_civtmax4525sovdistsk_PNR_TRANSIT_univ,1.0,F coef_calib_tourbike_DRIVEALONE_univ,-999.0,F -coef_calib_tourbike_SHARED2_univ,-999.0,F -coef_calib_tourbike_SHARED3_univ,-999.0,F +coef_calib_tourbike_SHARED2_univ,0.0,F +coef_calib_tourbike_SHARED3_univ,0.0,F coef_calib_tourbike_WALK_univ,-1.156683606924339,F coef_calib_tourbike_BIKE_univ,-1.3630686198359863,F coef_calib_tourbike_WALK_TRANSIT_univ,-999.0,F @@ -604,8 +604,8 @@ coef_calib_civt5max10sovdistski_TNC_TRANSIT_school,1.0,F coef_calib_civtmax200133sovdist_WALK_TRANSIT_school,1.0,F coef_calib_civtmax4525sovdistsk_PNR_TRANSIT_school,1.0,F coef_calib_tourbike_DRIVEALONE_school,-999.0,F -coef_calib_tourbike_SHARED2_school,-999.0,F -coef_calib_tourbike_SHARED3_school,-999.0,F +coef_calib_tourbike_SHARED2_school,0.0,F +coef_calib_tourbike_SHARED3_school,0.0,F coef_calib_tourbike_WALK_school,-17.252948252633765,F coef_calib_tourbike_BIKE_school,-16.603217615727758,F coef_calib_tourbike_WALK_TRANSIT_school,-999.0,F @@ -755,16 +755,16 @@ coef_calib_jointtour1_PNR_TRANSIT_maint,-1.629,F coef_calib_jointtour1_KNR_TRANSIT_maint,-1.629,F coef_calib_jointtour1_TNC_TRANSIT_maint,-1.629,F coef_calib_tourbike_DRIVEALONE_maint,-999.0,F -coef_calib_tourbike_SHARED2_maint,-999.0,F -coef_calib_tourbike_SHARED3_maint,-999.0,F +coef_calib_tourbike_SHARED2_maint,0.0,F +coef_calib_tourbike_SHARED3_maint,0.0,F coef_calib_tourbike_WALK_maint,-20.0,F coef_calib_tourbike_WALK_TRANSIT_maint,-999.0,F coef_calib_tourbike_PNR_TRANSIT_maint,-999.0,F coef_calib_tourbike_KNR_TRANSIT_maint,-999.0,F coef_calib_tourbike_TNC_TRANSIT_maint,-999.0,F coef_calib_tourbikejointtour0_DRIVEALONE_maint,-999.0,F -coef_calib_tourbikejointtour0_SHARED2_maint,-999.0,F -coef_calib_tourbikejointtour0_SHARED3_maint,-999.0,F +coef_calib_tourbikejointtour0_SHARED2_maint,0.0,F +coef_calib_tourbikejointtour0_SHARED3_maint,0.0,F coef_calib_tourbikejointtour0_WALK_maint,-999.0,F coef_calib_tourbikejointtour0_BIKE_maint,-10.500258951012205,F coef_calib_tourbikejointtour0_WALK_TRANSIT_maint,-999.0,F @@ -1039,8 +1039,8 @@ coef_calib_civt5max10sovdistski_TNC_TRANSIT_disc,1.0,F coef_calib_civtmax200133sovdist_WALK_TRANSIT_disc,1.0,F coef_calib_civtmax4525sovdistsk_PNR_TRANSIT_disc,1.0,F coef_calib_tourbike_DRIVEALONE_disc,-999.0,F -coef_calib_tourbike_SHARED2_disc,-999.0,F -coef_calib_tourbike_SHARED3_disc,-999.0,F +coef_calib_tourbike_SHARED2_disc,0.0,F +coef_calib_tourbike_SHARED3_disc,0.0,F coef_calib_tourbike_WALK_disc,-20.0,F coef_calib_tourbike_WALK_TRANSIT_disc,-999.0,F coef_calib_tourbike_PNR_TRANSIT_disc,-999.0,F @@ -1343,8 +1343,8 @@ coef_calib_tourwalkjointtour1_TNC_SINGLE_disc,-999.0,F coef_calib_tourwalkjointtour1_TNC_SHARED_disc,-999.0,F coef_calib_civtmax200133sovdist_WALK_TRANSIT_atwork,1.0,F coef_calib_tourbike_DRIVEALONE_atwork,-999.0,F -coef_calib_tourbike_SHARED2_atwork,-999.0,F -coef_calib_tourbike_SHARED3_atwork,-999.0,F +coef_calib_tourbike_SHARED2_atwork,0.0,F +coef_calib_tourbike_SHARED3_atwork,0.0,F coef_calib_tourbike_WALK_atwork,-5.5897134151007,F coef_calib_tourbike_BIKE_atwork,-5.36914703002003,F coef_calib_tourbike_WALK_TRANSIT_atwork,-999.0,F