Skip to content

Commit

Permalink
Merge pull request #241 from SANDAG/bike_fixes
Browse files Browse the repository at this point in the history
Fixes to bike logsums and micromobility mode choice
  • Loading branch information
bhargavasana authored Nov 8, 2024
2 parents 747bd5c + f4e4e93 commit 5ee64fe
Show file tree
Hide file tree
Showing 11 changed files with 44 additions and 40 deletions.
26 changes: 13 additions & 13 deletions input/model/parametersByYears.csv
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
year,aoc.fuel,aoc.maintenance,aoc.truck.fuel.light,aoc.truck.fuel.medium,aoc.truck.fuel.high,aoc.truck.maintenance.light,aoc.truck.maintenance.medium,aoc.truck.maintenance.high,aoc.truck.fuel.SUT,aoc.truck.fuel.MUT,aoc.truck.maintenance.SUT,aoc.truck.maintenance.MUT,airport.SAN.enplanements,airport.SAN.connecting,airport.SAN.airportMgra,airport.CBX.enplanements,airport.CBX.connecting,airport.CBX.airportMgra,crossBorder.tours,crossBorder.sentriShare,crossBorder.readyShare,taxi.baseFare,taxi.costPerMile,taxi.costPerMinute,TNC.single.baseFare,TNC.single.costPerMile,TNC.single.costPerMinute,TNC.single.costMinimum,TNC.shared.baseFare,TNC.shared.costPerMile,TNC.shared.costPerMinute,TNC.shared.costMinimum,Mobility.AV.RemoteParkingCostPerHour,active.micromobility.variableCost,active.micromobility.fixedCost,active.microtransit.fixedCost,Mobility.AV.Share,smartSignal.factor.LC,smartSignal.factor.MA,smartSignal.factor.PA,atdm.factor,active.ebike.ownership,active.maxdist.bike.taz,active.maxdist.bike.mgra,active.bike.minutes.per.mile,active.coef.distcla0,active.coef.distcla1,active.coef.distcla2,active.coef.distcla3,active.coef.dartne2,active.coef.dwrongwy,active.coef.dcyctrac,active.coef.dbikblvd,rapid.factor.ivt,rapid.factor.wait,rapid.dwell,poe.OME.start.year,tr.veh.year,ev.rebate.lowinc.bev,ev.rebate.lowinc.pev,ev.rebate.medinc.bev,ev.rebate.medinc.pev,ev.chargers
2022,22,10.6,28.5,47.3,71.9,29,55,62,62.2,100.7,11.1,16.3,14536000,856170,11249,2093250,0,9350,101343,0.219,0.322,3,3.3,0.46,3.31,0.96,0.33,9.19,1.66,0.48,0.16,4.6,0.81,0.39,1,2.03,0,1,1,1,1,0.008,21.1,2.11,5.6872,0.81081,0.32886,0.51408,0.81081,0.99225,3.25553,0.40068,0.32414,0.95,1,0.5,2027,2029,0,0,0,0,7716
2025,21,11.7,28.5,47.3,71.9,29,55,62,62.2,100.7,11.1,16.3,15542000,915424,11249,2195456,0,9350,119372,0.483,0.322,3,3.3,0.46,3.31,0.96,0.33,9.19,1.66,0.48,0.16,4.6,0.81,0.39,1,2.03,0,1,1,1,1,0.082,21.4,2.14,5.60748,0.79794,0.32364,0.50592,0.79794,0.9765,3.20385,0.39432,0.31899,0.95,1,0.5,2027,2029,0,0,0,0,10553
2026,20.1,11.9,28.5,47.3,71.9,29,55,62,62.2,100.7,11.1,16.3,16012000,943107,11249,2221801,0,9350,121272,0.505,0.322,3,3.3,0.46,3.31,0.96,0.33,9.19,1.66,0.48,0.16,4.6,0.81,0.39,1,2.03,0,1,1,1,1,0.095,21.6,2.16,5.55556,0.78936,0.32016,0.50048,0.78936,0.966,3.1694,0.39008,0.31556,0.87,1,0.5,2027,2029,0,0,0,0,11714
2029,18.5,12.3,28.5,47.3,71.9,29,55,62,62.2,100.7,11.1,16.3,17392000,1024389,11249,2301786,0,9350,126844,0.569,0.322,3,3.3,0.46,3.31,0.96,0.33,9.19,1.66,0.48,0.16,4.6,0.81,0.39,1,2.03,0,0.8,0.8,0.8,1,0.133,22.2,2.22,5.40541,0.76362,0.30972,0.48416,0.76362,0.9345,3.06605,0.37736,0.30527,0.87,0.87,0.425,2027,2029,0,0,0,0,16021
2030,18.1,12.4,28.5,47.3,71.9,29,55,62,62.2,100.7,11.1,16.3,17878000,1053014,11249,2329408,0,9350,128588,0.591,0.322,3,3.3,0.46,3.31,0.96,0.33,9.19,1.66,0.48,0.16,4.6,0.81,0.39,1,2.03,0,0.8,0.8,0.8,1,0.146,22.4,2.24,0.75504,0.30624,0.47872,0.75504,0.924,3.0316,0.37312,0.30184,5.35714,0.87,0.87,0.425,2027,2029,0,0,0,0,17783
2032,17.4,12.6,28.5,47.3,71.9,29,55,62,62.2,100.7,11.1,16.3,18571000,1093832,11249,2385314,0,9350,131663,0.569,0.322,3,3.3,0.46,4.56,0.96,0.33,9.19,2.31,0.48,0.16,4.6,0.81,0.39,1,2.03,0,0.8,0.8,0.8,0.93,0.172,22.9,2.29,5.24017,0.73359,0.29754,0.46512,0.73359,0.89775,2.94548,0.36252,0.29327,0.87,0.87,0.425,2027,2029,0,0,0,0,21912
2035,16.9,13,28.5,47.3,71.9,29,55,62,62.2,100.7,11.1,16.3,19660000,1157974,11249,2471185,0,9350,135025,0.698,0.322,3,3.3,0.46,4.56,0.96,0.33,9.19,2.31,0.48,0.16,4.6,0.81,0.39,1,1.01,0,0.8,0.8,0.8,0.93,0.211,23.6,2.36,5.08475,0.70356,0.28536,0.44608,0.70356,0.861,2.8249,0.34768,0.28126,0.87,0.87,0.425,2027,2029,6750,3375,2000,1000,40000
2035nb,16.9,13,28.5,47.3,71.9,29,55,62,62.2,100.7,11.1,16.3,19660000,1157974,11249,2471185,0,9350,135025,0.698,0.322,3,3.3,0.46,3.31,0.96,0.33,9.19,1.66,0.48,0.16,4.6,0.81,0.39,1,1.01,0,1,1,1,1,0.211,23.6,2.36,5.08475,0.70356,0.28536,0.44608,0.70356,0.861,2.8249,0.34768,0.28126,0.87,1,0.5,2060,2060,0,0,0,0,29968
2040,16.2,13.7,28.5,47.3,71.9,29,55,62,62.2,100.7,11.1,16.3,19877909,1170809,11249,2619456,0,9350,139207,0.698,0.322,3,3.3,0.46,4.56,0.96,0.33,9.19,2.31,0.48,0.16,4.6,0.81,0.39,1,1.01,0,0.8,0.8,0.8,0.93,0.265,24.7,2.47,4.8583,0.65637,0.26622,0.41616,0.65637,0.80325,2.63543,0.32436,0.2624,0.87,0.87,0.425,2027,2029,0,0,0,0,61221
2045,15.9,14.4,28.5,47.3,71.9,29,55,62,62.2,100.7,11.1,16.3,20098233,1183786,11249,2776623,0,9350,143214,0.698,0.322,3,3.3,0.46,4.56,0.96,0.33,9.19,2.31,0.48,0.16,4.6,0.81,0.39,1,1.01,0,0.8,0.8,0.8,0.93,0.32,25.5,2.55,4.70588,0.62205,0.2523,0.3944,0.62205,0.76125,2.49763,0.3074,0.24868,0.87,0.87,0.425,2027,2029,0,0,0,0,93700
2050,16.4,15.1,28.5,47.3,71.9,29,55,62,62.2,100.7,11.1,16.3,20321000,1196907,11249,2943221,0,9350,144682,0.698,0.322,3,3.3,0.46,4.56,0.96,0.33,9.19,2.31,0.48,0.16,4.6,0.81,0.39,1,1.01,0,0.8,0.8,0.8,0.93,0.375,26.4,2.64,4.54545,0.58344,0.23664,0.36992,0.58344,0.714,2.3426,0.28832,0.23324,0.87,0.87,0.425,2027,2029,0,0,0,0,143410
2050nb,16.4,15.1,28.5,47.3,71.9,29,55,62,62.2,100.7,11.1,16.3,20321000,1196907,11249,2943221,0,9350,144682,0.698,0.322,3,3.3,0.46,3.31,0.96,0.33,9.19,1.66,0.48,0.16,4.6,0.81,0.39,1,1.01,0,1,1,1,1,0.375,26.4,2.64,4.54545,0.58344,0.23664,0.36992,0.58344,0.714,2.3426,0.28832,0.23324,0.87,1,0.5,2060,2060,0,0,0,0,143410
year,aoc.fuel,aoc.maintenance,aoc.truck.fuel.light,aoc.truck.fuel.medium,aoc.truck.fuel.high,aoc.truck.maintenance.light,aoc.truck.maintenance.medium,aoc.truck.maintenance.high,aoc.truck.fuel.SUT,aoc.truck.fuel.MUT,aoc.truck.maintenance.SUT,aoc.truck.maintenance.MUT,airport.SAN.enplanements,airport.SAN.connecting,airport.SAN.airportMgra,airport.CBX.enplanements,airport.CBX.connecting,airport.CBX.airportMgra,crossBorder.tours,crossBorder.sentriShare,crossBorder.readyShare,taxi.baseFare,taxi.costPerMile,taxi.costPerMinute,TNC.single.baseFare,TNC.single.costPerMile,TNC.single.costPerMinute,TNC.single.costMinimum,TNC.shared.baseFare,TNC.shared.costPerMile,TNC.shared.costPerMinute,TNC.shared.costMinimum,Mobility.AV.RemoteParkingCostPerHour,active.micromobility.variableCost,active.micromobility.fixedCost,active.microtransit.fixedCost,Mobility.AV.Share,smartSignal.factor.LC,smartSignal.factor.MA,smartSignal.factor.PA,atdm.factor,active.ebike.ownership,rapid.factor.ivt,rapid.factor.wait,rapid.dwell,poe.OME.start.year,tr.veh.year,ev.rebate.lowinc.bev,ev.rebate.lowinc.pev,ev.rebate.medinc.bev,ev.rebate.medinc.pev,ev.chargers
2022,22,10.6,28.5,47.3,71.9,29,55,62,62.2,100.7,11.1,16.3,14536000,856170,11249,2093250,0,9350,101343,0.219,0.322,3,3.3,0.46,3.31,0.96,0.33,9.19,1.66,0.48,0.16,4.6,0.81,0.39,1,2.03,0,1,1,1,1,0.008,0.95,1,0.5,2027,2029,0,0,0,0,7716
2025,21,11.7,28.5,47.3,71.9,29,55,62,62.2,100.7,11.1,16.3,15542000,915424,11249,2195456,0,9350,119372,0.483,0.322,3,3.3,0.46,3.31,0.96,0.33,9.19,1.66,0.48,0.16,4.6,0.81,0.39,1,2.03,0,1,1,1,1,0.082,0.95,1,0.5,2027,2029,0,0,0,0,10553
2026,20.1,11.9,28.5,47.3,71.9,29,55,62,62.2,100.7,11.1,16.3,16012000,943107,11249,2221801,0,9350,121272,0.505,0.322,3,3.3,0.46,3.31,0.96,0.33,9.19,1.66,0.48,0.16,4.6,0.81,0.39,1,2.03,0,1,1,1,1,0.095,0.87,1,0.5,2027,2029,0,0,0,0,11714
2029,18.5,12.3,28.5,47.3,71.9,29,55,62,62.2,100.7,11.1,16.3,17392000,1024389,11249,2301786,0,9350,126844,0.569,0.322,3,3.3,0.46,3.31,0.96,0.33,9.19,1.66,0.48,0.16,4.6,0.81,0.39,1,2.03,0,0.8,0.8,0.8,1,0.133,0.87,0.87,0.425,2027,2029,0,0,0,0,16021
2030,18.1,12.4,28.5,47.3,71.9,29,55,62,62.2,100.7,11.1,16.3,17878000,1053014,11249,2329408,0,9350,128588,0.591,0.322,3,3.3,0.46,3.31,0.96,0.33,9.19,1.66,0.48,0.16,4.6,0.81,0.39,1,2.03,0,0.8,0.8,0.8,1,0.146,0.87,0.87,0.425,2027,2029,0,0,0,0,17783
2032,17.4,12.6,28.5,47.3,71.9,29,55,62,62.2,100.7,11.1,16.3,18571000,1093832,11249,2385314,0,9350,131663,0.569,0.322,3,3.3,0.46,4.56,0.96,0.33,9.19,2.31,0.48,0.16,4.6,0.81,0.39,1,2.03,0,0.8,0.8,0.8,0.93,0.172,0.87,0.87,0.425,2027,2029,0,0,0,0,21912
2035,16.9,13,28.5,47.3,71.9,29,55,62,62.2,100.7,11.1,16.3,19660000,1157974,11249,2471185,0,9350,135025,0.698,0.322,3,3.3,0.46,4.56,0.96,0.33,9.19,2.31,0.48,0.16,4.6,0.81,0.39,1,1.01,0,0.8,0.8,0.8,0.93,0.211,0.87,0.87,0.425,2027,2029,6750,3375,2000,1000,40000
2035nb,16.9,13,28.5,47.3,71.9,29,55,62,62.2,100.7,11.1,16.3,19660000,1157974,11249,2471185,0,9350,135025,0.698,0.322,3,3.3,0.46,3.31,0.96,0.33,9.19,1.66,0.48,0.16,4.6,0.81,0.39,1,1.01,0,1,1,1,1,0.211,0.87,1,0.5,2060,2060,0,0,0,0,29968
2040,16.2,13.7,28.5,47.3,71.9,29,55,62,62.2,100.7,11.1,16.3,19877909,1170809,11249,2619456,0,9350,139207,0.698,0.322,3,3.3,0.46,4.56,0.96,0.33,9.19,2.31,0.48,0.16,4.6,0.81,0.39,1,1.01,0,0.8,0.8,0.8,0.93,0.265,0.87,0.87,0.425,2027,2029,0,0,0,0,61221
2045,15.9,14.4,28.5,47.3,71.9,29,55,62,62.2,100.7,11.1,16.3,20098233,1183786,11249,2776623,0,9350,143214,0.698,0.322,3,3.3,0.46,4.56,0.96,0.33,9.19,2.31,0.48,0.16,4.6,0.81,0.39,1,1.01,0,0.8,0.8,0.8,0.93,0.32,0.87,0.87,0.425,2027,2029,0,0,0,0,93700
2050,16.4,15.1,28.5,47.3,71.9,29,55,62,62.2,100.7,11.1,16.3,20321000,1196907,11249,2943221,0,9350,144682,0.698,0.322,3,3.3,0.46,4.56,0.96,0.33,9.19,2.31,0.48,0.16,4.6,0.81,0.39,1,1.01,0,0.8,0.8,0.8,0.93,0.375,0.87,0.87,0.425,2027,2029,0,0,0,0,143410
2050nb,16.4,15.1,28.5,47.3,71.9,29,55,62,62.2,100.7,11.1,16.3,20321000,1196907,11249,2943221,0,9350,144682,0.698,0.322,3,3.3,0.46,3.31,0.96,0.33,9.19,1.66,0.48,0.16,4.6,0.81,0.39,1,1.01,0,1,1,1,1,0.375,0.87,1,0.5,2060,2060,0,0,0,0,143410
2 changes: 0 additions & 2 deletions src/asim/configs/airport.CBX/trip_mode_choice.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -105,8 +105,6 @@ CONSTANTS:
shortWalk: 0.333
longWalk: 0.667
walkSpeed: 3.00
bikeThresh: 6.00
bikeSpeed: 12.00
parkLocation1AccessCost: 0.00
parkLocation1CostDay: 21.00
parkLocation1InVehicleTime: 0.00
Expand Down
2 changes: 0 additions & 2 deletions src/asim/configs/airport.SAN/trip_mode_choice.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,6 @@ CONSTANTS:
shortWalk: 0.333
longWalk: 0.667
walkSpeed: 3.00
bikeThresh: 6.00
bikeSpeed: 12.00
parkLocation1AccessCost: 0.00
parkLocation1CostDay: 39.04
parkLocation1InVehicleTime: 0.00
Expand Down
1 change: 0 additions & 1 deletion src/asim/configs/common/constants.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ walkThresh: 1.50
shortWalk: 0.333
longWalk: 0.667
walkSpeed: 3.00
bikeThresh: 6.00
bikeSpeed: 7.80
ebikeSpeed: 10.00
escooterSpeed: 6.70
Expand Down
3 changes: 2 additions & 1 deletion src/asim/configs/resident/tour_mode_choice.csv
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,8 @@ util_calib_escorttour,abm2+ calibration constant,tour_type == 'escort',,,,coef_c
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,,,,,,,,,,,,,,,,,,,,,
#,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_ebike_long_access,Shut off ebike if access time > threshold,"@(((df.micro_access_out > microAccessThreshold) | (df.micro_access_inb > microAccessThreshold)) & (~df.ebike_owner)) | (df.get('num_escortees', 0)>0) | (od_skims['BIKE_TIME']<=0)",,,,,,,,,,,,,,,,,,,,,,-999,
util_escooter_long_access,Shut off escooter if access time > threshold,"@((df.micro_access_out > microAccessThreshold) | (df.micro_access_inb > microAccessThreshold) | (df.get('num_escortees', 0)>0)) | (od_skims['BIKE_TIME']<=0)",,,,,,,,,,,,,,,,,,,,,,,-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 @@ -8,8 +8,10 @@ Description,Target,Expression
,_tod,"np.where(df.outbound,reindex_i(tours.start, df.tour_id),reindex_i(tours.end, df.tour_id))"
,trip_period,network_los.skim_time_period_label(_tod)
#,,
adding _trips to avoid conflict with the variables in the tours_merged,income_trips,"reindex(households.income, df.person_id)"
adding _trips to avoid conflict with the variables in the tours_merged,income_trips,"reindex(households.income, df.household_id)"
adding _trips to avoid conflict with the variables in the tours_merged,age_trips,"reindex(persons.age, df.person_id)"
,_ebike_owner_trips,"reindex(households.ebike_owner, df.household_id)"
,ebike_owner_trips,"np.where(_ebike_owner_trips,1,0)"
,female,"reindex(persons.female, df.person_id)"
#,age_55p,"reindex(persons.age_55_p, df.person_id)"
#,age_35_54,"reindex(persons.age_35_to_54, df.person_id)"
Expand All @@ -33,6 +35,7 @@ adding _trips to avoid conflict with the variables in the tours_merged,age_trips
,walkTour,"np.where(tour_mode == 'WALK', 1, 0)"
,bikeTour,"np.where(tour_mode == 'BIKE', 1, 0)"
,microTour,"np.where((tour_mode == 'ESCOOTER') | (tour_mode == 'EBIKE'), 1, 0)"
,ebikeTour,"np.where((tour_mode == 'EBIKE'), 1, 0)"
Micromobility access Time,o_MicroAccessTime,"reindex(land_use.MicroAccessTime,df.origin)"
,max_walk_distance,max_walk_distance
,max_bike_distance,max_bike_distance
Expand Down
2 changes: 1 addition & 1 deletion src/asim/configs/resident/trip_destination_sample.csv
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ no attractions,"@size_terms.get(df.dest_taz, df.purpose) == 0",-999,-999,-999,-9
,@df.bikeTour * (_dp_bikeL < -300),-999,-999,-999,-999,-999,-999,-999,-999,-999,-999
#,,,,,,,,,,,
,@(df.nonmotorTour==0) * (_od_DIST + _dp_DIST - _op_DIST),-0.05,-0.05,-0.05,-0.05,-0.05,-0.05,-0.05,-0.05,-0.05,-0.05
,"@(df.microTour * (np.where(_d_microAccTime > df.microAccessThreshold,1,0) + np.where(df.o_MicroAccessTime > df.microAccessThreshold,1,0)))",-10,-10,-10,-10,-10,-10,-10,-10,-10,-10
,"@(df.microTour * (np.where(_d_microAccTime > df.microAccessThreshold,1,0) + np.where(df.o_MicroAccessTime > df.microAccessThreshold,1,0)) * np.where(df.ebike_owner_trips * df.ebikeTour,0,1))",-10,-10,-10,-10,-10,-10,-10,-10,-10,-10
7 changes: 4 additions & 3 deletions src/asim/configs/resident/trip_mode_choice.csv
Original file line number Diff line number Diff line change
Expand Up @@ -488,12 +488,13 @@ util_calib_tourwalkjointtour0,abm 2+ calibration,tourWalk*(jointTour==0),coef_ca
util_calib_tourwalkjointtour1,abm 2+ calibration,tourWalk*(jointTour==1),coef_calib_tourwalkjointtour1_DRIVEALONE,coef_calib_tourwalkjointtour1_SHARED2,coef_calib_tourwalkjointtour1_SHARED3,0,coef_calib_tourwalkjointtour1_BIKE,coef_calib_tourwalkjointtour1_WALK_TRANSIT,coef_calib_tourwalkjointtour1_WALK_TRANSIT,coef_calib_tourwalkjointtour1_WALK_TRANSIT,coef_calib_tourwalkjointtour1_PNR_TRANSIT,coef_calib_tourwalkjointtour1_PNR_TRANSIT,coef_calib_tourwalkjointtour1_PNR_TRANSIT,coef_calib_tourwalkjointtour1_KNR_TRANSIT,coef_calib_tourwalkjointtour1_KNR_TRANSIT,coef_calib_tourwalkjointtour1_KNR_TRANSIT,coef_calib_tourwalkjointtour1_TNC_TRANSIT,coef_calib_tourwalkjointtour1_TNC_TRANSIT,coef_calib_tourwalkjointtour1_TNC_TRANSIT,coef_calib_tourwalkjointtour1_TAXI,coef_calib_tourwalkjointtour1_TNC_SINGLE,coef_calib_tourwalkjointtour1_TNC_SHARED,0,,
#,Micromobility,,,,,,,,,,,,,,,,,,,,,,,,
util_micromobility_long_access,Shut off micromobility if access time > threshold and not micromobility tour,@((df.MicroAccessTime > microAccessThreshold)& ~(df.tourEbike | df.tourEscooter)),,,,,,,,,,,,,,,,,,,,,,-999,-999
util_micromobility_long_access_microTour,Decrease micromobility if access time > threshold but tour is micromobility,@((df.MicroAccessTime > microAccessThreshold) & (df.tourEbike | df.tourEscooter)),,,,,,,,,,,,,,,,,,,,,,-20,-20
util_ebike_long_access_microTour,Decrease ebike if access time > threshold but tour is micromobility,@((df.MicroAccessTime > microAccessThreshold) & (df.tourEbike | df.tourEscooter) & ((~df.ebike_owner) | (~df.tourEbike))),,,,,,,,,,,,,,,,,,,,,,-20,
util_escooter_long_access_microTour,Decrease escooter if access time > threshold but tour is micromobility,@((df.MicroAccessTime > microAccessThreshold) & (df.tourEbike | df.tourEscooter)),,,,,,,,,,,,,,,,,,,,,,,-20
#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 * df.time_factor),,,,,,,,,,,,,,,,,,,,,,coef_ivt,
util_ebike_access,Ebike utility for access time time,@(microConstant + ((~df.ebike_owner)&(microRentTime + df.MicroAccessTime)))*df.time_factor,,,,,,,,,,,,,,,,,,,,,,coef_acctime,
util_ebike_cost_inb,Ebike utility for inbound cost,@((~df.ebike_owner) & ((microFixedCost + microVarCost*df.ebike_time)/df.cost_sensitivity)),,,,,,,,,,,,,,,,,,,,,,coef_income,
util_ebike_access,Ebike utility for access time time,@(microConstant + (((~df.ebike_owner) | (~df.tourEbike))&(microRentTime + df.MicroAccessTime)))*df.time_factor,,,,,,,,,,,,,,,,,,,,,,coef_acctime,
util_ebike_cost_inb,Ebike utility for inbound cost,@(((~df.ebike_owner) | (~df.tourEbike)) & ((microFixedCost + microVarCost*df.ebike_time)/df.cost_sensitivity)),,,,,,,,,,,,,,,,,,,,,,coef_income,
util_escooter_ivt,Escooter utility for in-vehicle time,@(df.escooter_time)*df.time_factor,,,,,,,,,,,,,,,,,,,,,,,coef_ivt
util_escooter_access,Escooter utility for access time,@(microRentTime + microConstant + df.MicroAccessTime) *df.time_factor,,,,,,,,,,,,,,,,,,,,,,,coef_acctime
util_escooter_cost_inb,Escooter utility for inbound cost,@(microFixedCost + microVarCost*df.escooter_time)/df.cost_sensitivity,,,,,,,,,,,,,,,,,,,,,,,coef_income
8 changes: 5 additions & 3 deletions src/asim/configs/resident/trip_mode_choice_annotate_trips.csv
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ Description,Target,Expression
Origin Terminal Time,_oTermTime,"reindex(land_use.terminal_time,df.origin)"
Destination Terminal Time,_dTermTime,"reindex(land_use.terminal_time,df.destination)"
,_tour_participants,df.tour_id.map(tours.number_of_participants)
,_tour_mode,df.tour_id.map(tours.tour_mode)
,_tourEbike,(_tour_mode == 'EBIKE')
,_is_joint,(_tour_participants > 1)
#,,
,_time_drive_terminal,0
Expand Down Expand Up @@ -136,7 +138,7 @@ Destination Terminal Time,_dTermTime,"reindex(land_use.terminal_time,df.destinat
#,,
,_time_walk,0
,_time_walk,"_time_walk + (df.trip_mode=='WALK') * od_skims['walkTime']"
,_time_walk,"_time_walk + (df.trip_mode=='EBIKE') * (~df.ebike_owner) * (microRentTime + _MicroAccessTime)"
,_time_walk,"_time_walk + (df.trip_mode=='EBIKE') * np.where(((~df.ebike_owner) | (~_tourEbike)),1,0) * (microRentTime + _MicroAccessTime)"
,_time_walk,"_time_walk + (df.trip_mode=='ESCOOTER') * (microRentTime + _MicroAccessTime)"
,_time_walk,"_time_walk + (df.trip_mode=='SCH_BUS') * 10"
,_time_walk,"_time_walk + (df.trip_mode=='WALK_LOC') * ~df.nev_local_access_available_in * ~df.microtransit_local_access_available_in * _origin_local_time"
Expand Down Expand Up @@ -175,7 +177,7 @@ Destination Terminal Time,_dTermTime,"reindex(land_use.terminal_time,df.destinat
#,,
,_distance_walk,0
,_distance_walk,"_distance_walk + (df.trip_mode=='WALK') * od_skims['walkTime']/60 * walkSpeed"
,_distance_walk,"_distance_walk + (df.trip_mode=='EBIKE') * (~df.ebike_owner) * _MicroAccessTime/60 * walkSpeed"
,_distance_walk,"_distance_walk + (df.trip_mode=='EBIKE') * np.where(((~df.ebike_owner) | (~_tourEbike)),1,0) * _MicroAccessTime/60 * walkSpeed"
,_distance_walk,"_distance_walk + (df.trip_mode=='ESCOOTER') * _MicroAccessTime/60 * walkSpeed"
,_distance_walk,"_distance_walk + (df.trip_mode=='SCH_BUS') * 10/60 * walkSpeed"
,_distance_walk,"_distance_walk + (df.trip_mode=='WALK_LOC') * ~df.nev_local_access_available_in * ~df.microtransit_local_access_available_in * _origin_local_dist"
Expand Down Expand Up @@ -219,7 +221,7 @@ Destination Terminal Time,_dTermTime,"reindex(land_use.terminal_time,df.destinat
,_distance_mm,"_distance_mm + df.trip_mode.isin(['EBIKE'])*od_skims['BIKE_TIME'] * (bikeSpeed/ebikeSpeed)/60 * ebikeSpeed"
,distance_mm,"_distance_mm + df.trip_mode.isin(['ESCOOTER'])*od_skims['BIKE_TIME'] * (bikeSpeed/escooterSpeed)/60 * escooterSpeed"
,_cost_fare_mm,0
,_cost_fare_mm,"_cost_fare_mm + df.trip_mode.isin(['EBIKE'])*(~df.ebike_owner)*(microFixedCost + microVarCost*time_mm)"
,_cost_fare_mm,"_cost_fare_mm + df.trip_mode.isin(['EBIKE'])*np.where(((~df.ebike_owner) | (~_tourEbike)),1,0)*(microFixedCost + microVarCost*time_mm)"
,cost_fare_mm,"_cost_fare_mm + df.trip_mode.isin(['ESCOOTER'])*(microFixedCost + microVarCost*time_mm)"
,_distance_bike,0
,distance_bike,"_distance_bike + df.trip_mode.isin(['BIKE'])*od_skims['BIKE_TIME']/60 * bikeSpeed"
Expand Down
Loading

0 comments on commit 5ee64fe

Please sign in to comment.