Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cordon pricing #1

Draft
wants to merge 57 commits into
base: main
Choose a base branch
from
Draft

Cordon pricing #1

wants to merge 57 commits into from

Conversation

zneedell
Copy link
Contributor

@zneedell zneedell commented Jun 8, 2023

NOT FOR MERGING


Making a draft PR here to make it easier to compare

@@ -22,7 +22,7 @@ util_DRIVEALONEPAY_Terminal_time,DRIVEALONEPAY - Terminal time,@2 * walktimeshor
util_DRIVEALONEPAY_Operating_cost,DRIVEALONEPAY - Operating cost,@ivt_cost_multiplier * df.ivot * costPerMile * (odt_skims['SOVTOLL_DIST'] + dot_skims['SOVTOLL_DIST']),,coef_ivt,,,,,,,,,,,,,,,,,,,
util_DRIVEALONEPAY_Parking_cost,DRIVEALONEPAY - Parking cost,@ivt_cost_multiplier * df.ivot * df.daily_parking_cost,,coef_ivt,,,,,,,,,,,,,,,,,,,
util_DRIVEALONEPAY_Bridge_toll,DRIVEALONEPAY - Bridge toll,@ivt_cost_multiplier * df.ivot * (odt_skims['SOVTOLL_BTOLL'] + dot_skims['SOVTOLL_BTOLL']),,coef_ivt,,,,,,,,,,,,,,,,,,,
util_DRIVEALONEPAY_Value_toll,DRIVEALONEPAY - Value toll,@ivt_cost_multiplier * df.ivot * (odt_skims['SOVTOLL_VTOLL'] + dot_skims['SOVTOLL_VTOLL']),,coef_ivt,,,,,,,,,,,,,,,,,,,
util_DRIVEALONEPAY_Value_toll,DRIVEALONEPAY - Value toll,@ivt_cost_multiplier * df.ivot * (odt_skims['SOVTOLL_VTOLL'] + dot_skims['SOVTOLL_VTOLL']) + cordon_toll * df.is_dest_cordon - income_low_100_discount * df.is_income_lower_100,,coef_ivt,,,,,,,,,,,,,,,,,,,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the discount also be multiplied by df.is_dest_cordon here? Maybe something like

cordon_toll * df.is_dest_cordon ( 1 - income_low_100_discount * df.is_income_lower_100 )
if I'm understanding correctly

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Or, if income_low_100_discount is dollars, something like

df.is_dest_cordon * (cordon_toll - income_low_100_discount * df.is_income_lower_100)

Copy link
Collaborator

@cristian-poliziani cristian-poliziani Jun 10, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's right, thanks for noticing !

I also multipied the cordon toll by '@ivt_cost_multiplier * df.ivot ' like the other part of the toll. I did a similar thing for the trip file as well.

Now looks like this:

util_DRIVEALONEPAY_Value_toll,DRIVEALONEPAY - Value toll,@ivt_cost_multiplier * df.ivot * (odt_skims['SOVTOLL_VTOLL'] + dot_skims['SOVTOLL_VTOLL'] + df.is_dest_cordon * (cordon_toll - income_low_100_discount * df.is_income_lower_100)),,coef_ivt,,,,,,,,,,,,,,,,,,,

@@ -72,3 +72,6 @@ local,_DF_IS_TOUR,'tour_type' in df.columns
destination in central business district,destination_in_cbd,"(reindex(land_use.area_type, df[dest_col_name]) < setting('cbd_threshold')) * 1"
#,,FIXME diagnostic
#,sov_dist_rt,(odt_skims['SOV_DIST'] + dot_skims['SOV_DIST'])
,is_dest_cordon, df[dest_col_name].isin(LIST_SMALL_CORDON_TAZS_SF)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this looks right but I'd just confirm that the destination TAZ names and LIST_SMALL_CORDON_TAZS_SF are the same data type. I think this might fail if the TAZ names are strings (I think they're integers but let's make sure)

DRIVEALONEPAY - Operating cost,@df.c_cost * costPerMile * odt_skims['SOVTOLL_DIST'],,1,,,,,,,,,,,,,,,,,,,
DRIVEALONEPAY - Parking cost,c_cost * total_parking_cost,,1,,,,,,,,,,,,,,,,,,,
DRIVEALONEPAY - Bridge toll,@df.c_cost * odt_skims['SOVTOLL_BTOLL'],,1,,,,,,,,,,,,,,,,,,,
DRIVEALONEPAY - Value toll,@df.c_cost * odt_skims['SOVTOLL_VTOLL'] + cordon_toll * df.is_dest_cordon - income_low_100_discount * df.is_income_lower_100,,1,,,,,,,,,,,,,,,,,,,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similar comment here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One thing you could try doing is in line 53 adding a filter to sov_available that marks (free) sov trips as not available for destinations within the cordon. That might mean we wouldn't have to do anything in PILATES at all if it works

Description,Expression,DRIVEALONEFREE,DRIVEALONEPAY,SHARED2FREE,SHARED2PAY,SHARED3FREE,SHARED3PAY,WALK,BIKE,WALK_LOC,WALK_LRF,WALK_EXP,WALK_HVY,WALK_COM,DRIVE_LOC,DRIVE_LRF,DRIVE_EXP,DRIVE_HVY,DRIVE_COM,TAXI,TNC_SINGLE,TNC_SHARED
#Drive alone no toll,,,,,,,,,,,,,,,,,,,,,,
DRIVEALONEFREE - Unavailable,sov_available == False,-999,,,,,,,,,,,,,,,,,,,,
DRIVEALONEFREE - Unavailable for zero auto households,auto_ownership == 0,-999,,,,,,,,,,,,,,,,,,,,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similarly, I wonder if you could add another row here marking DRIVEALONEFREE (and the other free modes) as unavailable for destinations in the cordon:

DRIVEALONEFREE - Unavailable for trips in the cordon area,df.is_dest_cordon,-999,,,,,,,,,,,,,,,,,,,,

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great idea, I'll do in that way !

SHARED2PAY - Operating cost,@df.c_cost * costPerMile * odt_skims['HOV2TOLL_DIST'],,,,1,,,,,,,,,,,,,,,,,
SHARED2PAY - Parking cost,@df.c_cost * df.total_parking_cost / costShareSr2,,,,1,,,,,,,,,,,,,,,,,
SHARED2PAY - Bridge toll,@df.c_cost * odt_skims['HOV2TOLL_BTOLL'] / costShareSr2,,,,1,,,,,,,,,,,,,,,,,
SHARED2PAY - Value toll,@df.c_cost * odt_skims['HOV2TOLL_VTOLL'] / costShareSr2,,,,1,,,,,,,,,,,,,,,,,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we'd also want to add the cordon toll here (and for SHARED3PAY)

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's right, done !

DRIVEALONEPAY - Value toll,@df.c_cost * odt_skims['SOVTOLL_VTOLL'] + cordon_toll * df.is_dest_cordon - income_low_100_discount * df.is_income_lower_100,,1,,,,,,,,,,,,,,,,,,,
DRIVEALONEPAY - Person is between 16 and 19 years old,@c_age1619_da * ((df.age >= 16) & (df.age <= 19)),,1,,,,,,,,,,,,,,,,,,,
#Shared ride 2,,,,,,,,,,,,,,,,,,,,,,
SHARED2FREE - Unavailable,hov2_available == False,,,-999,,,,,,,,,,,,,,,,,,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could also add a new row here marking SHARED2FREE as unavailable for trips to the cordon area

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's right, done !

@@ -115,3 +115,5 @@ joint_ride_hail_ASC_tnc_shared,0,0,0,0,0,0,0,0,0,0
#,,,,,,,,,,
c_walk_express_penalty,10.00 * c_ivt,10.00 * c_ivt,10.00 * c_ivt,10.00 * c_ivt,10.00 * c_ivt,10.00 * c_ivt,10.00 * c_ivt,10.00 * c_ivt,10.00 * c_ivt,10.00 * c_ivt
adjust_tnc_shared,30 * c_ivt,30 * c_ivt,30 * c_ivt,30 * c_ivt,30 * c_ivt,30 * c_ivt,30 * c_ivt,30 * c_ivt,30 * c_ivt,30 * c_ivt
cordon_toll,650 * c_ivt,650 * c_ivt,650 * c_ivt,650 * c_ivt,650 * c_ivt,650 * c_ivt,650 * c_ivt,650 * c_ivt,650 * c_ivt,650 * c_ivt
income_low_100_discount,300 * c_ivt,300 * c_ivt,300 * c_ivt,300 * c_ivt,300 * c_ivt,300 * c_ivt,300 * c_ivt,300 * c_ivt,300 * c_ivt,300 * c_ivt
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't quite understand this part (not to say I think it's wrong!) -- if we're including the cordon toll as part of the "value toll" that already exists, wouldn't that mean we don't need to change the utility functions at all?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Here I'm just defining the new coefficients to be used in the 'value toll' expression. Just defining the toll is 650 cents and the discount is 300 cents

#TNC Single,,,,,,,,,,,,,,,,,,,,,,
TNC Single - In-vehicle time,@c_ivt * odt_skims['HOV2TOLL_TIME'] ,,,,,,,,,,,,,,,,,,,,1,
TNC Single - Wait time,@c_ivt * 1.5 * df.origSingleTNCWaitTime,,,,,,,,,,,,,,,,,,,,1,
TNC Single - Tolls,@df.c_cost * odt_skims['HOV2TOLL_VTOLL'],,,,,,,,,,,,,,,,,,,,1,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could add an additional component to the cost of TNCs here based on (I think) whether the trip either ends or starts in the cordon zone

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's right ! Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants