Skip to content

Commit

Permalink
Updated microtransit skims to be shared ride 3+ for visitor model
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeJimFlood committed Apr 19, 2024
1 parent 8f0b10d commit d4035a5
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 14 deletions.
4 changes: 2 additions & 2 deletions src/asim/configs/visitor/tour_mode_choice.csv
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,9 @@ util_TNC Single - Wait time,TNC Single - Wait time,1.5*totalWaitSingleTNC,,,,,,,
util_TNC Single - Cost,TNC Single - Cost,"@((np.maximum(TNC_single_baseFare*2 + (df.s2_dist_skims_out + df.s2_dist_skims_inb) * TNC_single_costPerMile + (df.s2_time_skims_out + df.s2_time_skims_inb) * TNC_single_costPerMinute, TNC_shared_costMinimum*2)*100 + df.s2_cost_skims_out + df.s2_cost_skims_inb) * df.coef_cost)",,,,,,,,,,coef_one,
#,TNC Shared,,,,,,,,,,,,
util_TNC Shared_switch,TNC Shared - switch turn-off (depends on data availability),@((~df.nev_available) & (~df.microtransit_available) & (scenarioYear==2022)),,,,,,,,,,,-999
util_TNC Shared - In-vehicle time,TNC Shared - In-vehicle time,"@(np.where(df.nev_available, df.nev_time, np.where(df.microtransit_available, df.microtransit_time, (df.s2_time_skims_out + df.s2_time_skims_inb)))) * TNC_shared_IVTFactor",,,,,,,,,,,coef_ivt
util_TNC Shared - In-vehicle time,TNC Shared - In-vehicle time,"@(np.where(df.nev_available, df.nev_time, np.where(df.microtransit_available, df.microtransit_time, (df.s3_time_skims_out + df.s3_time_skims_inb)))) * TNC_shared_IVTFactor",,,,,,,,,,,coef_ivt
util_TNC Shared - Wait time,TNC Shared - Wait time,"@np.where(df.nev_available, 2*nevWaitTime, np.where(df.microtransit_available, 2*microtransitWaitTime, 1.5*df.totalWaitSharedTNC))",,,,,,,,,,,coef_ivt
util_TNC Shared - Cost,TNC Shared - Cost,"@np.where(df.nev_available, 2*nevCost, np.where(df.microtransit_available, 2*microtransitCost, ((np.maximum(TNC_shared_baseFare*2 + (df.s2_dist_skims_out + df.s2_dist_skims_inb) * TNC_shared_costPerMile + (df.s2_time_skims_out + df.s2_time_skims_inb)* TNC_shared_costPerMinute, TNC_shared_costMinimum*2)))*100 + df.s2_cost_skims_out + df.s2_cost_skims_inb) * df.coef_cost)",,,,,,,,,,,coef_one
util_TNC Shared - Cost,TNC Shared - Cost,"@np.where(df.nev_available, 2*nevCost, np.where(df.microtransit_available, 2*microtransitCost, ((np.maximum(TNC_shared_baseFare*2 + (df.s3_dist_skims_out + df.s3_dist_skims_inb) * TNC_shared_costPerMile + (df.s3_time_skims_out + df.s3_time_skims_inb)* TNC_shared_costPerMinute, TNC_shared_costMinimum*2)))*100 + df.s3_cost_skims_out + df.s3_cost_skims_inb) * df.coef_cost)",,,,,,,,,,,coef_one
Calibration work tour with auto,Work Tour with auto,is_work*autoAvailable,-0.4839,,0.8409,-0.0425,,-3,,,-0.191,-0.191,-999
Calibration recreation tour with auto,Recreation Tour with auto,is_recreation*autoAvailable,1.8714,,0.0491,0.8952,,-1.5518,,,1.3906,1.3906,-999
Calibration dining tour with auto,Dining Tour with auto,is_dining*autoAvailable,-0.0646,,6.496,9.7582,,0.7504,,,-5.8495,-5.8495,-999
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,13 +195,13 @@ placeholder,walkTransitAvailable,1,
# Microtransit and NEV,,,
microtransit available at origin,microtransit_orig,"reindex(land_use.microtransit, df[orig_col_name])",
microtransit available at destination,microtransit_dest,"reindex(land_use.microtransit, df[dest_col_name])",
microtransit available,microtransit_available,(microtransit_orig > 0) & (microtransit_orig == microtransit_dest) & (od_skims['DIST'] < microtransitMaxDist),
microtransit direct time,microtransit_direct_time,"np.maximum(od_skims['DIST']/microtransitSpeed*60, s2_time_skims_out) + np.maximum(od_skims['DIST']/microtransitSpeed*60, s2_time_skims_inb)",
microtransit available,microtransit_available,(microtransit_orig > 0) & (microtransit_orig == microtransit_dest) & (s3_dist_skims_out < microtransitMaxDist) & (s3_dist_skims_inb < microtransitMaxDist),
microtransit direct time,microtransit_direct_time,"np.maximum(s3_dist_skims_out/microtransitSpeed*60, s3_time_skims_out) + np.maximum(s3_dist_skims_inb/microtransitSpeed*60, s3_time_skims_inb)",
microtransit total time,microtransit_time,"np.maximum(microtransit_direct_time + microtransitDiversionConstant, microtransitDiversionFactor*microtransit_direct_time)",
nev available at origin,nev_orig,"reindex(land_use.nev, df[orig_col_name])",
nev available at destination,nev_dest,"reindex(land_use.nev, df[dest_col_name])",
nev available,nev_available,(nev_orig > 0) & (nev_orig == nev_dest) & (od_skims['DIST'] < nevMaxDist),
nev direct time,nev_direct_time,"np.maximum(od_skims['DIST']/nevSpeed*60, s2_time_skims_out) + np.maximum(od_skims['DIST']/nevSpeed*60, s2_time_skims_inb)",
nev available,nev_available,(nev_orig > 0) & (nev_orig == nev_dest) & (s3_dist_skims_out < nevMaxDist) & (s3_dist_skims_inb < nevMaxDist),
nev direct time,nev_direct_time,"np.maximum(s3_dist_skims_out/nevSpeed*60, s3_time_skims_out) + np.maximum(s3_dist_skims_inb/nevSpeed*60, s3_time_skims_inb)",
nev total time,nev_time,"np.maximum(nev_direct_time + nevDiversionConstant, nevDiversionFactor*nev_direct_time)",
# Microtransit and NEV egress from transit,,,
microtransit egress from local available,microtransit_local_egress_available,(microtransit_dest>0) & (dest_micro_local_dist>maxWalkIfMTAccessAvailable) & (dest_micro_local_dist<microtransitMaxDist),
Expand Down
4 changes: 2 additions & 2 deletions src/asim/configs/visitor/trip_mode_choice.csv
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ util_TNC_SINGLE_wait,TNC Single - Wait time,1.5 * tnc_single_wait_time,,,,,,,coe
util_TNC_SINGLE_cost,TNC Single - Cost,"@df.coef_cost * (np.maximum(TNC_single_baseFare + (df.s2_dist_skims * TNC_single_costPerMile) + (df.s2_time_skims * TNC_single_costPerMinute), TNC_single_costMinimum) * 100 + df.s2_cost_skims)",,,,,,,coef_one,,,,
#,,,,,,,,,,,,,
util_TNC Shared_switch,TNC Shared - switch turn-off (depends on data availability),@((~df.nev_available) & (~df.microtransit_available) & (scenarioYear==2022)),,,,,,,,-999,,,
util_TNC_SHARED_IVT,TNC Shared - In-vehicle time,"@np.where(df.nev_available, df.nev_time, np.where(df.microtransit_available, df.microtransit_time, df.s2_time_skims)) * TNC_shared_IVTFactor",,,,,,,,coef_ivt,,,
util_TNC_SHARED_IVT,TNC Shared - In-vehicle time,"@np.where(df.nev_available, df.nev_time, np.where(df.microtransit_available, df.microtransit_time, df.s3_time_skims)) * TNC_shared_IVTFactor",,,,,,,,coef_ivt,,,
util_TNC_SHARED_wait,TNC Shared - Wait time,"@np.where(df.nev_available, nevWaitTime, np.where(df.microtransit_available, microtransitWaitTime, 1.5 * df.tnc_shared_wait_time))",,,,,,,,coef_ivt,,,
util_TNC_SHARED_cost,TNC Shared - Cost,"@df.coef_cost * np.where(df.nev_available, nevCost, np.where(df.microtransit_available, microtransitCost, (np.maximum(TNC_shared_baseFare + (df.s2_dist_skims * TNC_shared_costPerMile) + (df.s2_time_skims * TNC_shared_costPerMinute), TNC_shared_costMinimum))) * 100 + df.s2_cost_skims)",,,,,,,,coef_one,,,
util_TNC_SHARED_cost,TNC Shared - Cost,"@df.coef_cost * np.where(df.nev_available, nevCost, np.where(df.microtransit_available, microtransitCost, (np.maximum(TNC_shared_baseFare + (df.s3_dist_skims * TNC_shared_costPerMile) + (df.s3_time_skims * TNC_shared_costPerMinute), TNC_shared_costMinimum))) * 100 + df.s3_cost_skims)",,,,,,,,coef_one,,,
#,,,,,,,,,,,,,
ASC - Tour Mode DA,ASC - Tour Mode DA,tourDA,,-999,-999,,-999,,,-999,-999,-999,-999
ASC - Tour Mode S2,ASC - Tour Mode S2,tourS2,-999,,-999,,-999,,,-999,-999,-999,-999
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,13 @@ placeholder for missing autoTerminalTimeFactorAV,autoTermTimeFactor,1
# Microtransit and NEV,,
microtransit available at origin,microtransit_orig,"reindex(land_use.microtransit, df[orig_col_name])"
microtransit available at destination,microtransit_dest,"reindex(land_use.microtransit, df[dest_col_name])"
microtransit available,microtransit_available,(microtransit_orig > 0) & (microtransit_orig == microtransit_dest) & (od_skims['DIST'] < microtransitMaxDist)
microtransit direct time,microtransit_direct_time,"np.maximum(od_skims['DIST']/microtransitSpeed*60, s2_time_skims)"
microtransit available,microtransit_available,(microtransit_orig > 0) & (microtransit_orig == microtransit_dest) & (s3_dist_skims < microtransitMaxDist)
microtransit direct time,microtransit_direct_time,"np.maximum(s3_dist_skims/microtransitSpeed*60, s3_time_skims)"
microtransit total time,microtransit_time,"np.maximum(microtransit_direct_time + microtransitDiversionConstant, microtransitDiversionFactor*microtransit_direct_time)"
nev available at origin,nev_orig,"reindex(land_use.nev, df[orig_col_name])"
nev available at destination,nev_dest,"reindex(land_use.nev, df[dest_col_name])"
nev available,nev_available,(nev_orig > 0) & (nev_orig == nev_dest) & (od_skims['DIST'] < nevMaxDist)
nev direct time,nev_direct_time,"np.maximum(od_skims['DIST']/nevSpeed*60, s2_time_skims)"
nev available,nev_available,(nev_orig > 0) & (nev_orig == nev_dest) & (s3_dist_skims < nevMaxDist)
nev direct time,nev_direct_time,"np.maximum(s3_dist_skims/nevSpeed*60, s3_time_skims)"
nev total time,nev_time,"np.maximum(nev_direct_time + nevDiversionConstant, nevDiversionFactor*nev_direct_time)"
# Microtransit and NEV access to transit,,
outbound microtransit access available,microtransit_access_available_out,df.outbound & (microtransit_orig>0) & (origin_micro_prm_dist<microtransitMaxDist)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -418,12 +418,13 @@ Description,Target,Expression
,dest_micro_local_dist,"reindex(land_use.micro_dist_local_bus, destination)"
,dest_micro_prm_dist,"reindex(land_use.micro_dist_premium_transit, destination)"
,dest_micro_mix_dist,"np.minimum(dest_micro_local_dist, dest_micro_prm_dist)"
,s3_dist_skims,((odt_skims['HOV3_L_DIST'] * (_vot_bin_s3 == 1)) + (odt_skims['HOV3_M_DIST'] * (_vot_bin_s3 == 2)) + (odt_skims['HOV3_H_DIST'] * (_vot_bin_s3 == 3)))
microtransit available at origin,microtransit_orig,"reindex(land_use.microtransit, trips.origin)"
microtransit available at destination,microtransit_dest,"reindex(land_use.microtransit, trips.destination)"
microtransit available,microtransit_available,(microtransit_orig > 0) & (microtransit_orig == microtransit_dest) & (od_skims['DIST'] < microtransitMaxDist)
microtransit available,microtransit_available,(microtransit_orig > 0) & (microtransit_orig == microtransit_dest) & (s3_dist_skims < microtransitMaxDist)
nev available at origin,nev_orig,"reindex(land_use.nev, trips.origin)"
nev available at destination,nev_dest,"reindex(land_use.nev, trips.destination)"
nev available,nev_available,(nev_orig > 0) & (nev_orig == nev_dest) & (od_skims['DIST'] < nevMaxDist)
nev available,nev_available,(nev_orig > 0) & (nev_orig == nev_dest) & (s3_dist_skims < nevMaxDist)
outbound microtransit access available,microtransit_access_available_out,trips.outbound & (microtransit_orig>0) & (origin_micro_mix_dist<microtransitMaxDist)
outbound nev access available,nev_access_available_out,trips.outbound & (nev_orig>0) & (origin_micro_mix_dist<nevMaxDist)
outbound microtransit egress available,microtransit_egress_available_out,trips.outbound & (microtransit_dest>0) & (dest_micro_mix_dist>maxWalkIfMTAccessAvailable) & (dest_micro_mix_dist<microtransitMaxDist)
Expand Down

0 comments on commit d4035a5

Please sign in to comment.