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

Add code to check for freeway input inconsistencies between marea_dvmt_split_by_road_class.csv and marea_lane_miles.csv input files #154

Open
gregorbj opened this issue Oct 12, 2021 · 1 comment

Comments

@gregorbj
Copy link
Contributor

If an base year marea value for "LdvFwyDvmtProp" in the "marea_dvmt_split_by_road_class.csv" input file is 0 but the corresponding "FwyLaneMi" value in the "marea_lane_miles.csv" file is not zero, the "CalculateRoadPerformance" module will calculate a negative value for freeway light-duty vehicle (LDV) DVMT. This occurs because the module calibrates a value for "lambda" for the base year which is used in the model which splits LDV DVMT between freeways and arterials as a function of the ratio of the "average travel speed" on freeways and arterials. In the calibration of this parameter, the module does an initial calculation as a function of the population of the marea and the ratio of freeway to arterial lane-miles. It then uses a binary search using estimated average speeds to adjust the initial lambda to match the input DVMT targets. Since the inputs says there are freeway lane-miles but no freeway DVMT, the algorithm computes a negative lambda value. This results in negative freeway LDV DVMT for all other model run years.

This is the worst kind of error because the model run does not fail and wrong results are calculated. I had not anticipated this corner case when writing the code. I suggest doing 2 things to catch it in the future:

  1. Modify the "Initialize" module in the VETravelPerformance package to check for input file inconsistencies between "marea_dvmt_split_by_road_class.csv" and "marea_lane_miles.csv". This will enable this input error to be caught during model initialization.
  2. Modify the "CalculateRoadPerformance" module in the VETravelPerformance package to catch negative lambda errors (or perhaps any value that is outside of a plausible range) and pass appropriate error messages to the framework to write in the log.
@jrawbits
Copy link
Collaborator

Consider part 1 of this issue (the initialize function) in relation to a modified architecture for initialize. (see #106 and #20 )

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

No branches or pull requests

2 participants