Skip to content

Commit

Permalink
Updated microtransit skims to be shared ride 3+ for resident model
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeJimFlood committed Apr 19, 2024
1 parent 0789404 commit 8f0b10d
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 14 deletions.
4 changes: 2 additions & 2 deletions src/asim/configs/resident/tour_mode_choice.csv
Original file line number Diff line number Diff line change
Expand Up @@ -331,9 +331,9 @@ util_TNC Single - Wait time,TNC Single - Wait time,@df.totalWaitSingleTNC * df.t
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_single_costMinimum*2)*100 + df.s2_cost_skims_out + df.s2_cost_skims_inb)/df.cost_sensitivity",,,,,,,,,,,,,,,,,,,coef_income,,,,
#,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 * df.time_factor",,,,,,,,,,,,,,,,,,,,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 * df.time_factor",,,,,,,,,,,,,,,,,,,,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, df.totalWaitSharedTNC)) * df.time_factor",,,,,,,,,,,,,,,,,,,,coef_wait,,,
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.cost_sensitivity",,,,,,,,,,,,,,,,,,,,coef_income,,,
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.cost_sensitivity",,,,,,,,,,,,,,,,,,,,coef_income,,,
#,School bus,,,,,,,,,,,,,,,,,,,,,,,,
util_School Bus - Unavailable,School Bus - Unavailable,SCHBUS_available==0,,,,,,,,,,,,,,,,,,,,,-999,,
util_School Bus - In-vehicle Time at 20 miles per hour,School Bus - In-vehicle Time at 20 miles per hour,(da_dist_skims_out + da_dist_skims_inb)*3 * time_factor,,,,,,,,,,,,,,,,,,,,,coef_ivt,,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -275,13 +275,13 @@ escooter max distance availability,escooterMaxDistance,(od_skims['DIST'] > escoo
# 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 access to transit,,,
microtransit access to local available,microtransit_local_access_available,(microtransit_orig>0) & (origin_micro_local_dist<microtransitMaxDist),
Expand Down
4 changes: 2 additions & 2 deletions src/asim/configs/resident/trip_mode_choice.csv
Original file line number Diff line number Diff line change
Expand Up @@ -364,9 +364,9 @@ util_TNC Single - Wait time,TNC Single - Wait time,origSingleTNCWaitTime * time
util_TNC Single - Cost,TNC Single - Cost,"@(np.maximum(TNC_single_baseFare + df.s2_dist_skims * TNC_single_costPerMile + df.s2_time_skims * TNC_single_costPerMinute, TNC_single_baseFare) * 100 + df.s2_cost_skims) / (np.maximum(df.income,1000)**df.income_exponent)",,,,,,,,,,,,,,,,,,,coef_income,,,,
#,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))) * TNC_shared_IVTFactor * df.time_factor",,,,,,,,,,,,,,,,,,,,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))) * TNC_shared_IVTFactor * df.time_factor",,,,,,,,,,,,,,,,,,,,coef_ivt,,,
util_TNC Shared - Wait time,TNC Shared - Wait time,"@np.where(df.nev_available, nevWaitTime, np.where(df.microtransit_available, microtransitWaitTime, df.origSharedTNCWaitTime)) * df.time_factor",,,,,,,,,,,,,,,,,,,,coef_wait,,,
util_TNC Shared - Cost,TNC Shared - 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_baseFare) * 100 + df.s2_cost_skims))) / (np.maximum(df.income,1000)**df.income_exponent)",,,,,,,,,,,,,,,,,,,,coef_income,,,
util_TNC Shared - Cost,TNC Shared - 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_baseFare) * 100 + df.s3_cost_skims))) / (np.maximum(df.income,1000)**df.income_exponent)",,,,,,,,,,,,,,,,,,,,coef_income,,,
#,School bus,,,,,,,,,,,,,,,,,,,,,,,,
util_School Bus - Unavailable,School Bus - Unavailable,SCHBUS_available==0,,,,,,,,,,,,,,,,,,,,,-999,,
util_School Bus - In-vehicle Time at 20 miles per hour,School Bus - In-vehicle Time at 20 miles per hour,(da_dist_skims)* 3 * time_factor,,,,,,,,,,,,,,,,,,,,,coef_ivt,,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -292,13 +292,13 @@ escooter max distance availability,escooterMaxDistance,(od_skims['DIST'] > escoo
# 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 to local available,microtransit_local_access_available_out,df.outbound & (microtransit_orig>0) & (origin_micro_local_dist<microtransitMaxDist)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -474,12 +474,14 @@ Description,Target,Expression
,dest_local_dist,"reindex(land_use.walk_dist_local_bus, destination)"
,dest_prm_dist,"reindex(land_use.walk_dist_premium_transit, destination)"
,dest_mix_dist,"np.minimum(dest_local_dist, dest_prm_dist)"
,s3_dist_skims,(((odt_skims['HOV3_L_DIST']) * (_vot_bin_s2 == 1)) + ((odt_skims['HOV3_M_DIST']) * (_vot_bin_s2 == 2)) + ((odt_skims['HOV3_H_DIST']) * (_vot_bin_s2 == 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 8f0b10d

Please sign in to comment.