From 0f0cf30c2df0a5c8832edc8581ab33a755e7b565 Mon Sep 17 00:00:00 2001 From: aber-sandag Date: Fri, 25 Oct 2024 11:53:38 -0700 Subject: [PATCH 01/12] Revert bike coefficients, move to properties file --- input/model/parametersByYears.csv | 26 ++++++++++++------------ src/main/resources/sandag_abm.properties | 23 +++++++++++---------- 2 files changed, 25 insertions(+), 24 deletions(-) diff --git a/input/model/parametersByYears.csv b/input/model/parametersByYears.csv index 567d09dcb..d60af7a71 100644 --- a/input/model/parametersByYears.csv +++ b/input/model/parametersByYears.csv @@ -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 diff --git a/src/main/resources/sandag_abm.properties b/src/main/resources/sandag_abm.properties index 87ca1df45..d038e04c7 100644 --- a/src/main/resources/sandag_abm.properties +++ b/src/main/resources/sandag_abm.properties @@ -336,8 +336,6 @@ RunModel.skipTransitConnector = false RunModel.skipExternal = false,false,false SavedFrom = Emme Modeller properties writer Process ID 51972 SavedLast = Sep-07-2023 07:59:49 -active.coef.dwrongwy = ${active.coef.dwrongwy} -active.coef.dartne2 = ${active.coef.dartne2} TNC.single.baseFare = ${TNC.single.baseFare} TNC.shared.costMinimum = ${TNC.shared.costMinimum} TNC.shared.costPerMinute = ${TNC.shared.costPerMinute} @@ -349,31 +347,22 @@ active.ebike.ownership = ${active.ebike.ownership} taxi.costPerMinute = ${taxi.costPerMinute} airport.SAN.connecting = ${airport.SAN.connecting} atdm.factor = ${atdm.factor} -active.maxdist.bike.taz = ${active.maxdist.bike.taz} TNC.single.costMinimum = ${TNC.single.costMinimum} airport.CBX.connecting = ${airport.CBX.connecting} -active.coef.distcla0 = ${active.coef.distcla0} -active.coef.distcla3 = ${active.coef.distcla3} smartSignal.factor.MA = ${smartSignal.factor.MA} airport.CBX.enplanements = ${airport.CBX.enplanements} -active.maxdist.bike.mgra = ${active.maxdist.bike.mgra} TNC.single.costPerMinute = ${TNC.single.costPerMinute} Mobility.AV.Share = ${Mobility.AV.Share} -active.bike.minutes.per.mile = ${active.bike.minutes.per.mile} TNC.shared.costPerMile = ${TNC.shared.costPerMile} smartSignal.factor.PA = ${smartSignal.factor.PA} airport.SAN.airportMgra = ${airport.SAN.airportMgra} -active.coef.dbikblvd = ${active.coef.dbikblvd} crossBorder.tours = ${crossBorder.tours} crossBorder.sentriShare = ${crossBorder.sentriShare} -active.coef.dcyctrac = ${active.coef.dcyctrac} TNC.shared.baseFare = ${TNC.shared.baseFare} airport.SAN.enplanements = ${airport.SAN.enplanements} taxi.baseFare = ${taxi.baseFare} -active.coef.distcla1 = ${active.coef.distcla1} active.microtransit.fixedCost = ${active.microtransit.fixedCost} taxi.costPerMile = ${taxi.costPerMile} -active.coef.distcla2 = ${active.coef.distcla2} # ##################################################################################### @@ -476,6 +465,18 @@ active.coef.gain.walk = 0.034 active.walk.minutes.per.mile = 20 +active.maxdist.bike.taz = 20 +active.maxdist.bike.mgra = 2 +active.coef.distcla0 = 0.858 +active.coef.distcla1 = 0.348 +active.coef.distcla2 = 0.544 +active.coef.distcla3 = 0.858 +active.coef.dartne2 = 1.05 +active.coef.dwrongwy = 3.445 +active.coef.dcyctrac = 0.424 +active.coef.dbikblvd = 0.343 +active.bike.minutes.per.mile = 6 + active.micromobility.speed = 15 active.micromobility.rentalTime = 1 active.micromobility.constant = 60 From bc43df30f6a17f3fd8e1e8d8cd5dc81aa2056247 Mon Sep 17 00:00:00 2001 From: aber-sandag Date: Fri, 25 Oct 2024 12:01:28 -0700 Subject: [PATCH 02/12] Update bike minutes per mile based on bike speed --- src/asim/configs/airport.CBX/trip_mode_choice.yaml | 2 -- src/asim/configs/airport.SAN/trip_mode_choice.yaml | 2 -- src/asim/configs/common/constants.yaml | 1 - src/main/resources/sandag_abm.properties | 3 ++- 4 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/asim/configs/airport.CBX/trip_mode_choice.yaml b/src/asim/configs/airport.CBX/trip_mode_choice.yaml index d164929cc..27a2c48b3 100644 --- a/src/asim/configs/airport.CBX/trip_mode_choice.yaml +++ b/src/asim/configs/airport.CBX/trip_mode_choice.yaml @@ -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 diff --git a/src/asim/configs/airport.SAN/trip_mode_choice.yaml b/src/asim/configs/airport.SAN/trip_mode_choice.yaml index 03450e7a5..6583e0735 100644 --- a/src/asim/configs/airport.SAN/trip_mode_choice.yaml +++ b/src/asim/configs/airport.SAN/trip_mode_choice.yaml @@ -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 diff --git a/src/asim/configs/common/constants.yaml b/src/asim/configs/common/constants.yaml index ec28622a0..7753bcbea 100644 --- a/src/asim/configs/common/constants.yaml +++ b/src/asim/configs/common/constants.yaml @@ -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 diff --git a/src/main/resources/sandag_abm.properties b/src/main/resources/sandag_abm.properties index d038e04c7..5105c9f4a 100644 --- a/src/main/resources/sandag_abm.properties +++ b/src/main/resources/sandag_abm.properties @@ -475,7 +475,8 @@ active.coef.dartne2 = 1.05 active.coef.dwrongwy = 3.445 active.coef.dcyctrac = 0.424 active.coef.dbikblvd = 0.343 -active.bike.minutes.per.mile = 6 +# bikeSpeed 7.80, 60/7.80 = 7.692 +active.bike.minutes.per.mile = 7.692 active.micromobility.speed = 15 active.micromobility.rentalTime = 1 From 8b53895591a927c75d2f30d0f83c301629ad2fbd Mon Sep 17 00:00:00 2001 From: aber-sandag Date: Fri, 25 Oct 2024 12:32:34 -0700 Subject: [PATCH 03/12] Don't check access time for owned ebike trips --- src/asim/configs/resident/tour_mode_choice.csv | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/asim/configs/resident/tour_mode_choice.csv b/src/asim/configs/resident/tour_mode_choice.csv index 8e464d679..a4dbe4bf2 100644 --- a/src/asim/configs/resident/tour_mode_choice.csv +++ b/src/asim/configs/resident/tour_mode_choice.csv @@ -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.get('num_escortees', 0)>0)) & (~df.ebike_owner))",,,,,,,,,,,,,,,,,,,,,,-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))",,,,,,,,,,,,,,,,,,,,,,,-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, From e8e24944f29638a230ff2894a649e0952ca33690 Mon Sep 17 00:00:00 2001 From: aber-sandag Date: Fri, 25 Oct 2024 15:02:50 -0700 Subject: [PATCH 04/12] Include access time and cost for ebike owner trips in non-ebike tours. Don't check access time for ebike owner trips in ebike tours. --- .../trip_destination_annotate_trips_preprocessor.csv | 1 + src/asim/configs/resident/trip_destination_sample.csv | 2 +- src/asim/configs/resident/trip_mode_choice.csv | 7 ++++--- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/asim/configs/resident/trip_destination_annotate_trips_preprocessor.csv b/src/asim/configs/resident/trip_destination_annotate_trips_preprocessor.csv index b71ee58b1..1d4183e47 100644 --- a/src/asim/configs/resident/trip_destination_annotate_trips_preprocessor.csv +++ b/src/asim/configs/resident/trip_destination_annotate_trips_preprocessor.csv @@ -33,6 +33,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 diff --git a/src/asim/configs/resident/trip_destination_sample.csv b/src/asim/configs/resident/trip_destination_sample.csv index 4572aadf0..c5418c7d8 100644 --- a/src/asim/configs/resident/trip_destination_sample.csv +++ b/src/asim/configs/resident/trip_destination_sample.csv @@ -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) | (~df.tourEbike),1,0))",-10,-10,-10,-10,-10,-10,-10,-10,-10,-10 diff --git a/src/asim/configs/resident/trip_mode_choice.csv b/src/asim/configs/resident/trip_mode_choice.csv index 614638834..777fcae75 100644 --- a/src/asim/configs/resident/trip_mode_choice.csv +++ b/src/asim/configs/resident/trip_mode_choice.csv @@ -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 \ No newline at end of file From 7f59dfeb0a3ff758ffa565766ee98846d82602cb Mon Sep 17 00:00:00 2001 From: aber-sandag Date: Fri, 25 Oct 2024 15:04:11 -0700 Subject: [PATCH 05/12] Fix incorrect ebike tour variable name --- src/asim/configs/resident/trip_destination_sample.csv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/asim/configs/resident/trip_destination_sample.csv b/src/asim/configs/resident/trip_destination_sample.csv index c5418c7d8..9fd195965 100644 --- a/src/asim/configs/resident/trip_destination_sample.csv +++ b/src/asim/configs/resident/trip_destination_sample.csv @@ -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)) * np.where((~df.ebike_owner) | (~df.tourEbike),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) | (~df.ebikeTour),1,0))",-10,-10,-10,-10,-10,-10,-10,-10,-10,-10 From 80273dc35de441e07272bdc1ca94aa6ab3a3bb68 Mon Sep 17 00:00:00 2001 From: aber-sandag Date: Fri, 25 Oct 2024 17:33:27 -0700 Subject: [PATCH 06/12] Use bike logsum for micromobility --- src/asim/configs/resident/tour_mode_choice.csv | 4 ++-- ...tour_mode_choice_annotate_choosers_preprocessor.csv | 10 ++++++---- src/asim/configs/resident/trip_mode_choice.csv | 4 ++-- .../trip_mode_choice_annotate_trips_preprocessor.csv | 6 ++++-- 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/src/asim/configs/resident/tour_mode_choice.csv b/src/asim/configs/resident/tour_mode_choice.csv index a4dbe4bf2..36fd7e8ee 100644 --- a/src/asim/configs/resident/tour_mode_choice.csv +++ b/src/asim/configs/resident/tour_mode_choice.csv @@ -386,11 +386,11 @@ util_ebike_long_access,Shut off ebike if access time > threshold,"@(((df.micro_a 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))",,,,,,,,,,,,,,,,,,,,,,,-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, +util_ebike_logsum,Ebike utility for bike logsum,(bikeLSI + bikeLSO)*ebike_time_multiplier,,,,,,,,,,,,,,,,,,,,,,coef_bikeLogsum, util_ebike_access,Ebike utility for access/egress time,"@(microConstant + np.where(df.ebike_owner, 0, microRentTime + df.micro_access_inb + df.micro_access_out))*df.time_factor",,,,,,,,,,,,,,,,,,,,,,coef_acctime, util_ebike_cost_inb,Ebike utility for inbound cost,@((~df.ebike_owner)&((microFixedCost + microVarCost*df.ebike_time_inb)/df.cost_sensitivity)),,,,,,,,,,,,,,,,,,,,,,coef_income, util_ebike_cost_out,Ebike utility for outbound cost,@((~df.ebike_owner)&((microFixedCost + microVarCost*df.ebike_time_out)/df.cost_sensitivity)),,,,,,,,,,,,,,,,,,,,,,coef_income, -util_escooter_ivt,escooter utility for in-vehicle time,@(df.escooter_time_inb + df.escooter_time_out)*df.time_factor,,,,,,,,,,,,,,,,,,,,,,,coef_ivt +util_escooter_logsum,escooter utility for bike logsum,(bikeLSI + bikeLSO)*escooter_time_multiplier,,,,,,,,,,,,,,,,,,,,,,,coef_bikeLogsum util_escooter_access,escooter utility for in-vehicle time,@(microConstant + microRentTime + df.micro_access_inb + df.micro_access_out)*df.time_factor,,,,,,,,,,,,,,,,,,,,,,,coef_acctime util_escooter_cost_inb,escooter utility for inbound cost,@((microFixedCost + microVarCost*df.escooter_time_inb)/df.cost_sensitivity),,,,,,,,,,,,,,,,,,,,,,,coef_income util_escooter_cost_out,escooter utility for outbound cost,@((microFixedCost + microVarCost*df.escooter_time_out)/df.cost_sensitivity),,,,,,,,,,,,,,,,,,,,,,,coef_income diff --git a/src/asim/configs/resident/tour_mode_choice_annotate_choosers_preprocessor.csv b/src/asim/configs/resident/tour_mode_choice_annotate_choosers_preprocessor.csv index 8a566f881..dfe5780e9 100644 --- a/src/asim/configs/resident/tour_mode_choice_annotate_choosers_preprocessor.csv +++ b/src/asim/configs/resident/tour_mode_choice_annotate_choosers_preprocessor.csv @@ -262,10 +262,12 @@ Determining Tour Destination,destination,df.destination if 'destination' in df.c ,tnc_prm_out_asc,"np.where((tnc_prm_out_asc > 0) & (odt_skims['KNROUT_PRM_XFERS'] > 0), 0.5 * tnc_prm_out_asc, tnc_prm_out_asc)", ,tnc_prm_inb_asc,"np.where((tnc_prm_inb_asc > 0) & (dot_skims['KNRIN_PRM_XFERS'] > 0), 0.5 * tnc_prm_inb_asc, tnc_prm_inb_asc)", # Micromobility times,,, -ebike time inbound,ebike_time_inb,bike_time_inb * bikeSpeed / ebikeSpeed, -ebike time outbound,ebike_time_out,bike_time_out * bikeSpeed / ebikeSpeed, -escooter time inbound,escooter_time_inb,bike_time_inb * bikeSpeed / escooterSpeed, -escooter time outbound,escooter_time_out,bike_time_out * bikeSpeed / escooterSpeed, +ebike time multiplier,ebike_time_multiplier,bikeSpeed / ebikeSpeed, +ebike time inbound,ebike_time_inb,bike_time_inb * ebike_time_multiplier, +ebike time outbound,ebike_time_out,bike_time_out * ebike_time_multiplier, +escooter time multiplier,escooter_time_multiplier,bikeSpeed / escooterSpeed, +escooter time inbound,escooter_time_inb,bike_time_inb * escooter_time_multiplier, +escooter time outbound,escooter_time_out,bike_time_out * escooter_time_multiplier, Micromobility access time outbound,micro_access_out,"reindex(land_use.MicroAccessTime,origin)", Micromobility access time inbound,micro_access_inb,"reindex(land_use.MicroAccessTime,destination)", ebike max distance availability,ebikeMaxDistance,(od_skims['DIST'] > ebikeMaxDist), diff --git a/src/asim/configs/resident/trip_mode_choice.csv b/src/asim/configs/resident/trip_mode_choice.csv index 777fcae75..531b7ee88 100644 --- a/src/asim/configs/resident/trip_mode_choice.csv +++ b/src/asim/configs/resident/trip_mode_choice.csv @@ -492,9 +492,9 @@ util_ebike_long_access_microTour,Decrease ebike if access time > threshold but t 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_logsum,Ebile utility for bike logsum,@df.bikeLS*ebike_time_multiplier,,,,,,,,,,,,,,,,,,,,,,coef_bikeLogsum, 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_logsum,Escooter utility for bike logsum,@df.bikeLS*escooter_time_multiplier,,,,,,,,,,,,,,,,,,,,,,,coef_bikeLogsum 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 \ No newline at end of file diff --git a/src/asim/configs/resident/trip_mode_choice_annotate_trips_preprocessor.csv b/src/asim/configs/resident/trip_mode_choice_annotate_trips_preprocessor.csv index 8aa97bb9f..3db1fd0e5 100644 --- a/src/asim/configs/resident/trip_mode_choice_annotate_trips_preprocessor.csv +++ b/src/asim/configs/resident/trip_mode_choice_annotate_trips_preprocessor.csv @@ -284,8 +284,10 @@ Number of school children in vehicle on trip,num_escortees,df.escort_participant ,tnc_prm_out_asc,"np.where((tnc_prm_out_asc > 0) & (odt_skims['KNROUT_PRM_XFERS'] > 0), 0.5 * tnc_prm_out_asc, tnc_prm_out_asc)" ,tnc_prm_inb_asc,"np.where((tnc_prm_inb_asc > 0) & (dot_skims['KNRIN_PRM_XFERS'] > 0), 0.5 * tnc_prm_inb_asc, tnc_prm_inb_asc)" # Micromobility times,, -ebike time,ebike_time,bike_time * bikeSpeed / ebikeSpeed -escooter time,escooter_time,bike_time * bikeSpeed / escooterSpeed +ebike time multiplier,ebike_time_multiplier,bikeSpeed / ebikeSpeed +ebike time,ebike_time,bike_time * ebike_time_multiplier +escooter time multiplier,escooter_time_multiplier,bikeSpeed / escooterSpeed +escooter time,escooter_time,bike_time * escooter_time_multiplier Micromobility access Time,MicroAccessTime,"reindex(land_use.MicroAccessTime,origin)" ebike max distance availability,ebikeMaxDistance,(od_skims['DIST'] > ebikeMaxDist) escooter max distance availability,escooterMaxDistance,(od_skims['DIST'] > escooterMaxDist) From 47e822cacba99c613f1ef6541c42fe2e820a3369 Mon Sep 17 00:00:00 2001 From: aber-sandag Date: Tue, 29 Oct 2024 09:33:17 -0700 Subject: [PATCH 07/12] fix ebike_owner in trip destination --- .../resident/trip_destination_annotate_trips_preprocessor.csv | 1 + src/asim/configs/resident/trip_destination_sample.csv | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/asim/configs/resident/trip_destination_annotate_trips_preprocessor.csv b/src/asim/configs/resident/trip_destination_annotate_trips_preprocessor.csv index 1d4183e47..e4396b67d 100644 --- a/src/asim/configs/resident/trip_destination_annotate_trips_preprocessor.csv +++ b/src/asim/configs/resident/trip_destination_annotate_trips_preprocessor.csv @@ -4,6 +4,7 @@ Description,Target,Expression ,is_joint,"reindex(tours.tour_category, df.tour_id) == 'joint'" ,tour_leg_origin,"np.where(df.outbound,reindex(tours.origin, df.tour_id), reindex(tours.destination, df.tour_id))" ,tour_leg_dest,"np.where(df.outbound,reindex(tours.destination, df.tour_id), reindex(tours.origin, df.tour_id))" +,ebike_owner_trips,"reindex(tours.ebike_owner, df.tour_id)" #,, ,_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) diff --git a/src/asim/configs/resident/trip_destination_sample.csv b/src/asim/configs/resident/trip_destination_sample.csv index 9fd195965..f9da9ec86 100644 --- a/src/asim/configs/resident/trip_destination_sample.csv +++ b/src/asim/configs/resident/trip_destination_sample.csv @@ -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)) * np.where((~df.ebike_owner) | (~df.ebikeTour),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),1,0))",-10,-10,-10,-10,-10,-10,-10,-10,-10,-10 From e97d1b945ce75072a9e7a5caa29cd7799ceef4fc Mon Sep 17 00:00:00 2001 From: aber-sandag Date: Tue, 29 Oct 2024 16:20:44 -0700 Subject: [PATCH 08/12] Revert bike logsum for micromobility (continue to use bike time) --- src/asim/configs/resident/tour_mode_choice.csv | 4 ++-- ...tour_mode_choice_annotate_choosers_preprocessor.csv | 10 ++++------ src/asim/configs/resident/trip_mode_choice.csv | 4 ++-- .../trip_mode_choice_annotate_trips_preprocessor.csv | 6 ++---- 4 files changed, 10 insertions(+), 14 deletions(-) diff --git a/src/asim/configs/resident/tour_mode_choice.csv b/src/asim/configs/resident/tour_mode_choice.csv index 36fd7e8ee..a4dbe4bf2 100644 --- a/src/asim/configs/resident/tour_mode_choice.csv +++ b/src/asim/configs/resident/tour_mode_choice.csv @@ -386,11 +386,11 @@ util_ebike_long_access,Shut off ebike if access time > threshold,"@(((df.micro_a 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))",,,,,,,,,,,,,,,,,,,,,,,-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_logsum,Ebike utility for bike logsum,(bikeLSI + bikeLSO)*ebike_time_multiplier,,,,,,,,,,,,,,,,,,,,,,coef_bikeLogsum, +util_ebike_ivt,Ebike utility for in-vehicle time,@(df.ebike_time_inb + df.ebike_time_out)*df.time_factor,,,,,,,,,,,,,,,,,,,,,,coef_ivt, util_ebike_access,Ebike utility for access/egress time,"@(microConstant + np.where(df.ebike_owner, 0, microRentTime + df.micro_access_inb + df.micro_access_out))*df.time_factor",,,,,,,,,,,,,,,,,,,,,,coef_acctime, util_ebike_cost_inb,Ebike utility for inbound cost,@((~df.ebike_owner)&((microFixedCost + microVarCost*df.ebike_time_inb)/df.cost_sensitivity)),,,,,,,,,,,,,,,,,,,,,,coef_income, util_ebike_cost_out,Ebike utility for outbound cost,@((~df.ebike_owner)&((microFixedCost + microVarCost*df.ebike_time_out)/df.cost_sensitivity)),,,,,,,,,,,,,,,,,,,,,,coef_income, -util_escooter_logsum,escooter utility for bike logsum,(bikeLSI + bikeLSO)*escooter_time_multiplier,,,,,,,,,,,,,,,,,,,,,,,coef_bikeLogsum +util_escooter_ivt,escooter utility for in-vehicle time,@(df.escooter_time_inb + df.escooter_time_out)*df.time_factor,,,,,,,,,,,,,,,,,,,,,,,coef_ivt util_escooter_access,escooter utility for in-vehicle time,@(microConstant + microRentTime + df.micro_access_inb + df.micro_access_out)*df.time_factor,,,,,,,,,,,,,,,,,,,,,,,coef_acctime util_escooter_cost_inb,escooter utility for inbound cost,@((microFixedCost + microVarCost*df.escooter_time_inb)/df.cost_sensitivity),,,,,,,,,,,,,,,,,,,,,,,coef_income util_escooter_cost_out,escooter utility for outbound cost,@((microFixedCost + microVarCost*df.escooter_time_out)/df.cost_sensitivity),,,,,,,,,,,,,,,,,,,,,,,coef_income diff --git a/src/asim/configs/resident/tour_mode_choice_annotate_choosers_preprocessor.csv b/src/asim/configs/resident/tour_mode_choice_annotate_choosers_preprocessor.csv index dfe5780e9..8a566f881 100644 --- a/src/asim/configs/resident/tour_mode_choice_annotate_choosers_preprocessor.csv +++ b/src/asim/configs/resident/tour_mode_choice_annotate_choosers_preprocessor.csv @@ -262,12 +262,10 @@ Determining Tour Destination,destination,df.destination if 'destination' in df.c ,tnc_prm_out_asc,"np.where((tnc_prm_out_asc > 0) & (odt_skims['KNROUT_PRM_XFERS'] > 0), 0.5 * tnc_prm_out_asc, tnc_prm_out_asc)", ,tnc_prm_inb_asc,"np.where((tnc_prm_inb_asc > 0) & (dot_skims['KNRIN_PRM_XFERS'] > 0), 0.5 * tnc_prm_inb_asc, tnc_prm_inb_asc)", # Micromobility times,,, -ebike time multiplier,ebike_time_multiplier,bikeSpeed / ebikeSpeed, -ebike time inbound,ebike_time_inb,bike_time_inb * ebike_time_multiplier, -ebike time outbound,ebike_time_out,bike_time_out * ebike_time_multiplier, -escooter time multiplier,escooter_time_multiplier,bikeSpeed / escooterSpeed, -escooter time inbound,escooter_time_inb,bike_time_inb * escooter_time_multiplier, -escooter time outbound,escooter_time_out,bike_time_out * escooter_time_multiplier, +ebike time inbound,ebike_time_inb,bike_time_inb * bikeSpeed / ebikeSpeed, +ebike time outbound,ebike_time_out,bike_time_out * bikeSpeed / ebikeSpeed, +escooter time inbound,escooter_time_inb,bike_time_inb * bikeSpeed / escooterSpeed, +escooter time outbound,escooter_time_out,bike_time_out * bikeSpeed / escooterSpeed, Micromobility access time outbound,micro_access_out,"reindex(land_use.MicroAccessTime,origin)", Micromobility access time inbound,micro_access_inb,"reindex(land_use.MicroAccessTime,destination)", ebike max distance availability,ebikeMaxDistance,(od_skims['DIST'] > ebikeMaxDist), diff --git a/src/asim/configs/resident/trip_mode_choice.csv b/src/asim/configs/resident/trip_mode_choice.csv index 531b7ee88..777fcae75 100644 --- a/src/asim/configs/resident/trip_mode_choice.csv +++ b/src/asim/configs/resident/trip_mode_choice.csv @@ -492,9 +492,9 @@ util_ebike_long_access_microTour,Decrease ebike if access time > threshold but t 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_logsum,Ebile utility for bike logsum,@df.bikeLS*ebike_time_multiplier,,,,,,,,,,,,,,,,,,,,,,coef_bikeLogsum, +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) | (~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_logsum,Escooter utility for bike logsum,@df.bikeLS*escooter_time_multiplier,,,,,,,,,,,,,,,,,,,,,,,coef_bikeLogsum +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 \ No newline at end of file diff --git a/src/asim/configs/resident/trip_mode_choice_annotate_trips_preprocessor.csv b/src/asim/configs/resident/trip_mode_choice_annotate_trips_preprocessor.csv index 3db1fd0e5..8aa97bb9f 100644 --- a/src/asim/configs/resident/trip_mode_choice_annotate_trips_preprocessor.csv +++ b/src/asim/configs/resident/trip_mode_choice_annotate_trips_preprocessor.csv @@ -284,10 +284,8 @@ Number of school children in vehicle on trip,num_escortees,df.escort_participant ,tnc_prm_out_asc,"np.where((tnc_prm_out_asc > 0) & (odt_skims['KNROUT_PRM_XFERS'] > 0), 0.5 * tnc_prm_out_asc, tnc_prm_out_asc)" ,tnc_prm_inb_asc,"np.where((tnc_prm_inb_asc > 0) & (dot_skims['KNRIN_PRM_XFERS'] > 0), 0.5 * tnc_prm_inb_asc, tnc_prm_inb_asc)" # Micromobility times,, -ebike time multiplier,ebike_time_multiplier,bikeSpeed / ebikeSpeed -ebike time,ebike_time,bike_time * ebike_time_multiplier -escooter time multiplier,escooter_time_multiplier,bikeSpeed / escooterSpeed -escooter time,escooter_time,bike_time * escooter_time_multiplier +ebike time,ebike_time,bike_time * bikeSpeed / ebikeSpeed +escooter time,escooter_time,bike_time * bikeSpeed / escooterSpeed Micromobility access Time,MicroAccessTime,"reindex(land_use.MicroAccessTime,origin)" ebike max distance availability,ebikeMaxDistance,(od_skims['DIST'] > ebikeMaxDist) escooter max distance availability,escooterMaxDistance,(od_skims['DIST'] > escooterMaxDist) From 8918da64102f38987f565c34356e789cfef58043 Mon Sep 17 00:00:00 2001 From: aber-sandag Date: Wed, 30 Oct 2024 12:08:33 -0700 Subject: [PATCH 09/12] Fix ebike owner in trip destination sample --- .../resident/trip_destination_annotate_trips_preprocessor.csv | 2 +- src/asim/configs/resident/trip_destination_sample.csv | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/asim/configs/resident/trip_destination_annotate_trips_preprocessor.csv b/src/asim/configs/resident/trip_destination_annotate_trips_preprocessor.csv index e4396b67d..8a7c40cdc 100644 --- a/src/asim/configs/resident/trip_destination_annotate_trips_preprocessor.csv +++ b/src/asim/configs/resident/trip_destination_annotate_trips_preprocessor.csv @@ -4,13 +4,13 @@ Description,Target,Expression ,is_joint,"reindex(tours.tour_category, df.tour_id) == 'joint'" ,tour_leg_origin,"np.where(df.outbound,reindex(tours.origin, df.tour_id), reindex(tours.destination, df.tour_id))" ,tour_leg_dest,"np.where(df.outbound,reindex(tours.destination, df.tour_id), reindex(tours.origin, df.tour_id))" -,ebike_owner_trips,"reindex(tours.ebike_owner, df.tour_id)" #,, ,_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,age_trips,"reindex(persons.age, df.person_id)" +adding _trips to avoid conflict with the variables in the tours_merged,ebike_owner_trips,"reindex(households.ebike_owner, df.person_id)" ,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)" diff --git a/src/asim/configs/resident/trip_destination_sample.csv b/src/asim/configs/resident/trip_destination_sample.csv index f9da9ec86..39c21dfe3 100644 --- a/src/asim/configs/resident/trip_destination_sample.csv +++ b/src/asim/configs/resident/trip_destination_sample.csv @@ -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)) * np.where((~df.ebike_owner_trips) | (~df.ebikeTour),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 From 259c5debe7acde716fb0f2df3575bef3bf60434d Mon Sep 17 00:00:00 2001 From: aber-sandag Date: Fri, 1 Nov 2024 12:02:37 -0700 Subject: [PATCH 10/12] Fix household reindex in trip destination preprocessor, add ebike tour check to ebike time/cost reporting --- .../trip_destination_annotate_trips_preprocessor.csv | 5 +++-- .../configs/resident/trip_mode_choice_annotate_trips.csv | 8 +++++--- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/src/asim/configs/resident/trip_destination_annotate_trips_preprocessor.csv b/src/asim/configs/resident/trip_destination_annotate_trips_preprocessor.csv index 8a7c40cdc..6bc7269a8 100644 --- a/src/asim/configs/resident/trip_destination_annotate_trips_preprocessor.csv +++ b/src/asim/configs/resident/trip_destination_annotate_trips_preprocessor.csv @@ -8,9 +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)" -adding _trips to avoid conflict with the variables in the tours_merged,ebike_owner_trips,"reindex(households.ebike_owner, 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)" diff --git a/src/asim/configs/resident/trip_mode_choice_annotate_trips.csv b/src/asim/configs/resident/trip_mode_choice_annotate_trips.csv index c83b8e454..87bb2bd1d 100644 --- a/src/asim/configs/resident/trip_mode_choice_annotate_trips.csv +++ b/src/asim/configs/resident/trip_mode_choice_annotate_trips.csv @@ -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 @@ -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" @@ -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" @@ -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" From 770c07fdd9b8c24033f7246d3204d3f1716b9375 Mon Sep 17 00:00:00 2001 From: aber-sandag Date: Mon, 4 Nov 2024 13:47:02 -0800 Subject: [PATCH 11/12] Disable micromobility when bike time = 0 --- src/asim/configs/resident/tour_mode_choice.csv | 4 ++-- .../resident/trip_mode_choice_annotate_trips_preprocessor.csv | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/asim/configs/resident/tour_mode_choice.csv b/src/asim/configs/resident/tour_mode_choice.csv index 440b34f5a..a5818f49f 100644 --- a/src/asim/configs/resident/tour_mode_choice.csv +++ b/src/asim/configs/resident/tour_mode_choice.csv @@ -382,8 +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_ebike_long_access,Shut off ebike if access time > threshold,"@(((df.micro_access_out > microAccessThreshold) | (df.micro_access_inb > microAccessThreshold) | (df.get('num_escortees', 0)>0)) & (~df.ebike_owner))",,,,,,,,,,,,,,,,,,,,,,-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))",,,,,,,,,,,,,,,,,,,,,,,-999 +util_ebike_long_access,Shut off ebike if access time > threshold,"@(((df.micro_access_out > microAccessThreshold) | (df.micro_access_inb > microAccessThreshold) | (df.get('num_escortees', 0)>0)) & (~df.ebike_owner)) | (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, diff --git a/src/asim/configs/resident/trip_mode_choice_annotate_trips_preprocessor.csv b/src/asim/configs/resident/trip_mode_choice_annotate_trips_preprocessor.csv index c3678a7b2..e816fb5ee 100644 --- a/src/asim/configs/resident/trip_mode_choice_annotate_trips_preprocessor.csv +++ b/src/asim/configs/resident/trip_mode_choice_annotate_trips_preprocessor.csv @@ -195,8 +195,8 @@ no sov for age < min drving age,sov_available,"(age>=minimumAgeDA) * is_indiv * ,sr2_available,"np.where((tourPNR)|(tourKNR)|(tourTNR)|(tourMaaS)|(tourSchBus)|(tourEbike)|(tourEscooter)|(df.number_of_participants>2),0,1)" ,sr3_available,"np.where((tourPNR)|(tourKNR)|(tourTNR)|(tourMaaS)|(tourSchBus)|(tourEbike)|(tourEscooter)|(df.number_of_participants==2),0,1)" no long walks,walkAvailable,"np.where((walk_time_skims < max_walk_time),1,0) * np.where((tourPNR)|(tourKNR)|(tourTNR)|(tourMaaS)|(tourSchBus)|(tourEbike)|(tourEscooter),0,1)" -,Escooter_available,"np.where((tourDA)|(tourS2)|(tourS3)|(tourWalk)|(tourBike)|(tourWTran)|(tourPNR)|(tourKNR)|(tourTNR)|(tourMaaS)|(tourSchBus)|(tourEbike),0,1)" -,Ebike_available,"np.where((tourDA)|(tourS2)|(tourS3)|(tourWalk)|(tourBike)|(tourWTran)|(tourPNR)|(tourKNR)|(tourTNR)|(tourMaaS)|(tourSchBus)|(tourEscooter),0,1)" +,Escooter_available,"(od_skims['BIKE_TIME']>0) * np.where((tourDA)|(tourS2)|(tourS3)|(tourWalk)|(tourBike)|(tourWTran)|(tourPNR)|(tourKNR)|(tourTNR)|(tourMaaS)|(tourSchBus)|(tourEbike),0,1)" +,Ebike_available,"(od_skims['BIKE_TIME']>0) * np.where((tourDA)|(tourS2)|(tourS3)|(tourWalk)|(tourBike)|(tourWTran)|(tourPNR)|(tourKNR)|(tourTNR)|(tourMaaS)|(tourSchBus)|(tourEscooter),0,1)" ,PNR_available,"(autos>0) * (age>15) * np.where((tourDA)|(tourS2)|(tourS3)|(tourWalk)|(tourBike)|(tourWTran)|(tourKNR)|(tourTNR)|(tourMaaS)|(tourSchBus)|(tourEbike)|(tourEscooter),0,1)" ,KNR_available,"np.where((tourDA)|(tourS2)|(tourS3)|(tourWalk)|(tourBike)|(tourWTran)|(tourPNR)|(tourTNR)|(tourMaaS)|(tourSchBus)|(tourEbike)|(tourEscooter),0,1)" ,TNR_available,"np.where((tourDA)|(tourS2)|(tourS3)|(tourWalk)|(tourBike)|(tourWTran)|(tourPNR)|(tourKNR)|(tourMaaS)|(tourSchBus)|(tourEbike)|(tourEscooter),0,1)" From f4e4e93985c1e5fdc84c85ff61b130aab34c1199 Mon Sep 17 00:00:00 2001 From: aber-sandag Date: Thu, 7 Nov 2024 15:08:47 -0800 Subject: [PATCH 12/12] Don't allow ebike for escort tours --- src/asim/configs/resident/tour_mode_choice.csv | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/asim/configs/resident/tour_mode_choice.csv b/src/asim/configs/resident/tour_mode_choice.csv index a5818f49f..60f87abc9 100644 --- a/src/asim/configs/resident/tour_mode_choice.csv +++ b/src/asim/configs/resident/tour_mode_choice.csv @@ -382,7 +382,7 @@ 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_ebike_long_access,Shut off ebike if access time > threshold,"@(((df.micro_access_out > microAccessThreshold) | (df.micro_access_inb > microAccessThreshold) | (df.get('num_escortees', 0)>0)) & (~df.ebike_owner)) | (od_skims['BIKE_TIME']<=0)",,,,,,,,,,,,,,,,,,,,,,-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