Skip to content

Commit

Permalink
Fix negative parking cost for airport employees
Browse files Browse the repository at this point in the history
  • Loading branch information
aber-sandag committed May 20, 2024
1 parent 9c1403d commit 553db28
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions src/asim/configs/common_airport/trip_mode_choice.csv
Original file line number Diff line number Diff line change
Expand Up @@ -21,19 +21,19 @@ ridehailloc1_av,Ridehail location 1 availability,@df['ridehailloc1_av'],,,,,,,,,
ridehailloc2_av,Ridehail location 2 availability,@df['ridehailloc2_av'],,,,,,,,,,,-999,,-999,,,,,,,,,,,,,,,
util_park1_ivt,IVT to parking location 1,@df['partySizeParkLocation1AutoIVT'],coef_ivt,,,,,,,,,,,,,,,,,,,,,,,,,,,
util_park1_cost,Driving cost to parking location 1,@(df['partySizeParkLocation1AutoDist']*costPerMile + df['partySizeParkLocation1AutoToll']),coef_c_cost_ls,,,,,,,,,,,,,,,,,,,,,,,,,,,
util_park1_parkcost,Parking cost at parking location 1,@((df['nights']*parkLocation1CostDay + parkLocation1CostDay)*100),coef_c_cost,,,,,,,,,,,,,,,,,,,,,,,,,,,
util_park1_parkcost,Parking cost at parking location 1,"@((np.maximum(df['nights'],0)*parkLocation1CostDay + parkLocation1CostDay)*100)",coef_c_cost,,,,,,,,,,,,,,,,,,,,,,,,,,,
util_park2_ivt,IVT to parking location 2,@df['partySizeParkLocation2AutoIVT'],,coef_ivt,,,,,,,,,,,,,,,,,,,,,,,,,,
util_park2_cost,Driving cost to parking location 2,@(df['partySizeParkLocation2AutoDist']*costPerMile + df['partySizeParkLocation2AutoToll']),,coef_c_cost_ls,,,,,,,,,,,,,,,,,,,,,,,,,,
util_park2_parkcost,Parking cost at parking location 2,@((df['nights']*parkLocation2CostDay + parkLocation2CostDay)*100),,coef_c_cost,,,,,,,,,,,,,,,,,,,,,,,,,,
util_park2_parkcost,Parking cost at parking location 2,"@((np.maximum(df['nights'],0)*parkLocation2CostDay + parkLocation2CostDay)*100)",,coef_c_cost,,,,,,,,,,,,,,,,,,,,,,,,,,
util_park3_ivt,IVT to parking location 3,@df['partySizeParkLocation3AutoIVT'],,,coef_ivt,,,,,,,,,,,,,,,,,,,,,,,,,
util_park3_cost,Driving cost to parking location 3,@(df['partySizeParkLocation3AutoDist']*costPerMile + df['partySizeParkLocation3AutoToll']),,,coef_c_cost_ls,,,,,,,,,,,,,,,,,,,,,,,,,
util_park3_parkcost,Parking cost at parking location 3,@((df['nights']*parkLocation3CostDay + parkLocation3CostDay)*100),,,coef_c_cost,,,,,,,,,,,,,,,,,,,,,,,,,
util_park3_parkcost,Parking cost at parking location 3,"@((np.maximum(df['nights'],0)*parkLocation3CostDay + parkLocation3CostDay)*100)",,,coef_c_cost,,,,,,,,,,,,,,,,,,,,,,,,,
util_park4_ivt,IVT to parking location 4,@df['partySizeParkLocation4AutoIVT'],,,,coef_ivt,,,,,,,,,,,,,,,,,,,,,,,,
util_park4_cost,Driving cost to parking location 4,@(df['partySizeParkLocation4AutoDist']*costPerMile + df['partySizeParkLocation4AutoToll']),,,,coef_c_cost_ls,,,,,,,,,,,,,,,,,,,,,,,,
util_park4_parkcost,Parking cost at parking location 4,@((df['nights']*parkLocation4CostDay + parkLocation4CostDay)*100),,,,coef_c_cost,,,,,,,,,,,,,,,,,,,,,,,,
util_park4_parkcost,Parking cost at parking location 4,"@((np.maximum(df['nights'],0)*parkLocation4CostDay + parkLocation4CostDay)*100)",,,,coef_c_cost,,,,,,,,,,,,,,,,,,,,,,,,
util_park5_ivt,IVT to parking location 5,@df['partySizeParkLocation5AutoIVT'],,,,,coef_ivt,,,,,,,,,,,,,,,,,,,,,,,
util_park5_cost,Driving cost to parking location 5,@(df['partySizeParkLocation5AutoDist']*costPerMile + df['partySizeParkLocation5AutoToll']),,,,,coef_c_cost_ls,,,,,,,,,,,,,,,,,,,,,,,
util_park5_parkcost,Parking cost at parking location 5,@((df['nights']*parkLocation5CostDay + parkLocation5CostDay)*100),,,,,coef_c_cost,,,,,,,,,,,,,,,,,,,,,,,
util_park5_parkcost,Parking cost at parking location 5,"@((np.maximum(df['nights'],0)*parkLocation5CostDay + parkLocation5CostDay)*100)",,,,,coef_c_cost,,,,,,,,,,,,,,,,,,,,,,,
util_parkEscort_cost,Driving cost to escort parking location,@(df['partySizeParkEscortLocationAutoDist']*costPerMile + df['partySizeParkEscortLocationAutoToll']),,,,,,coef_c_cost_ls,,,,,,,,,,,,,,,,,,,,,,
util_parkEscort_ivt,IVT to escort parking location,@df['partySizeParkEscortLocationAutoIVT'],,,,,,coef_ivt,,,,,,,,,,,,,,,,,,,,,,
util_ShuttleVanLocation_cost,Driving cost to shuttle van location,@(df['partySizeShuttleVanLocationAutoDist']*costPerMile + df['partySizeShuttleVanLocationAutoToll']),,,,,,,,coef_c_cost_ls,,,,,,,,,,,,,,,,,,,,
Expand All @@ -54,7 +54,7 @@ util_curb5_ivt,IVT to curb location 5,@df['partySizeCurbLocation5AutoIVT'],,,,,,
util_curb5_cost,Driving cost to curb location 5,@(df['partySizeCurbLocation5AutoDist']*costPerMile + df['partySizeCurbLocation5AutoToll']),,,,,,,,,,,,,,,,,,coef_c_cost_ls,,,,,,,,,,
util_rental_ivt,IVT to curb location 6,@df['partySizeRentalLocationAutoIVT'],,,,,,,coef_ivt,,,,,,,,,,,,,,,,,,,,,
util_rental_cost,Driving cost to curb location 6,@(df['partySizeRentalLocationAutoDist']*costPerMile + df['partySizeRentalLocationAutoToll']),,,,,,,coef_c_cost_ls,,,,,,,,,,,,,,,,,,,,,
util_rental_cost2,IVT to curb location 7,@((df['nights']*rentalCostPerDay + rentalCarAccessCost + rentalCostPerDay)*100),,,,,,,coef_c_cost,,,,,,,,,,,,,,,,,,,,,
util_rental_cost2,IVT to curb location 7,"@((np.maximum(df['nights'],0)*rentalCostPerDay + rentalCarAccessCost + rentalCostPerDay)*100)",,,,,,,coef_c_cost,,,,,,,,,,,,,,,,,,,,,
util_rental_time,rental car time,@rentalCarInVehicleTime,,,,,,,coef_ivt,,,,,,,,,,,,,,,,,,,,,
util_rental_walk,rental car walk time,@rentalCarWalkTime,,,,,,,coef_walk,,,,,,,,,,,,,,,,,,,,,
util_rental_wait,rental car wait time,@rentalCarWaitTime,,,,,,,coef_wait,,,,,,,,,,,,,,,,,,,,,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,11 @@ Description,Target,Expression
,origin,_origin
#,,
,_cost_parking,0
,_cost_parking,"_cost_parking + df.trip_mode.isin(['PARK_LOC1']) * (((df['nights']*parkLocation1CostDay + parkLocation1CostDay)*100) / _tour_participants)"
,_cost_parking,"_cost_parking + df.trip_mode.isin(['PARK_LOC2']) * (((df['nights']*parkLocation2CostDay + parkLocation2CostDay)*100) / _tour_participants)"
,_cost_parking,"_cost_parking + df.trip_mode.isin(['PARK_LOC3']) * (((df['nights']*parkLocation3CostDay + parkLocation3CostDay)*100) / _tour_participants)"
,_cost_parking,"_cost_parking + df.trip_mode.isin(['PARK_LOC4']) * (((df['nights']*parkLocation4CostDay + parkLocation4CostDay)*100) / _tour_participants)"
,_cost_parking,"_cost_parking + df.trip_mode.isin(['PARK_LOC5']) * (((df['nights']*parkLocation5CostDay + parkLocation5CostDay)*100) / _tour_participants)"
,_cost_parking,"_cost_parking + df.trip_mode.isin(['PARK_LOC1']) * (((np.maximum(df['nights'],0)*parkLocation1CostDay + parkLocation1CostDay)*100) / _tour_participants)"
,_cost_parking,"_cost_parking + df.trip_mode.isin(['PARK_LOC2']) * (((np.maximum(df['nights'],0)*parkLocation2CostDay + parkLocation2CostDay)*100) / _tour_participants)"
,_cost_parking,"_cost_parking + df.trip_mode.isin(['PARK_LOC3']) * (((np.maximum(df['nights'],0)*parkLocation3CostDay + parkLocation3CostDay)*100) / _tour_participants)"
,_cost_parking,"_cost_parking + df.trip_mode.isin(['PARK_LOC4']) * (((np.maximum(df['nights'],0)*parkLocation4CostDay + parkLocation4CostDay)*100) / _tour_participants)"
,_cost_parking,"_cost_parking + df.trip_mode.isin(['PARK_LOC5']) * (((np.maximum(df['nights'],0)*parkLocation5CostDay + parkLocation5CostDay)*100) / _tour_participants)"
,cost_parking,"_cost_parking + df.trip_mode.isin(['PARK_ESCORT']) * (parkEscortCostHour*100 / (_tour_participants + 1))"
#,,
,_cost_fare_drive,0
Expand All @@ -80,7 +80,7 @@ Description,Target,Expression
,_cost_fare_drive,"_cost_fare_drive + df.trip_mode.isin(['TNC_MIX']) * ~df.outbound * (np.maximum((odt_skims['TNCOUT_MIX_ACC']*ridehailCostPerMinute + (odt_skims['TNCOUT_MIX_ACC']/60 * driveSpeed)*ridehailCostPerMile + ridehailCostInitial),ridehailCostMinimum) * 100 / _tour_participants)"
,cost_fare_drive,"_cost_fare_drive + df.trip_mode.isin(['TNC_MIX']) * df.outbound * (np.maximum((odt_skims['TNCIN_MIX_EGR']*ridehailCostPerMinute + (odt_skims['TNCIN_MIX_EGR']/60 * driveSpeed)*ridehailCostPerMile + ridehailCostInitial),ridehailCostMinimum) * 100 / _tour_participants)"
#,,
,cost_rental,"df.trip_mode.isin(['RENTAL']) * ((df['nights']*rentalCostPerDay + rentalCarAccessCost + rentalCostPerDay)*100) / _tour_participants"
,cost_rental,"df.trip_mode.isin(['RENTAL']) * ((np.maximum(df['nights'],0)*rentalCostPerDay + rentalCarAccessCost + rentalCostPerDay)*100) / _tour_participants"
#,,
,_time_transit_drive,0
,_time_transit_drive,"_time_transit_drive + (df.trip_mode.isin(['KNR_LOC'])) * (odt_skims['KNROUT_LOC_ACC'])*~df.outbound"
Expand Down

0 comments on commit 553db28

Please sign in to comment.