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

Calculate highway reliability in warmstart and 1st global iteration only #163

Merged
merged 5 commits into from
Aug 27, 2024

Conversation

i-am-sijia
Copy link
Collaborator

@i-am-sijia i-am-sijia commented Aug 2, 2024

What existing problem does the pull request solve and why should we include it?

This PR address #146

The updated reliability design:

  • Reliability continues to be included in the VDFs. It has two parts: a static part and a LOS-based part. This is same as before.
  • When running reliability, it continues to require two assignments. After the first assignment, reliability is written out as a link attribute, and gets skimmed in the second assignment. This is same as before.
  • Implement a switch in the model config for reliability, so that users can choose to turn it on or off.
  • If turned on, reliability is run in global iteration 0 (warmstart assignment) and 1 only. Assignment is run twice for glob iter 0 and 1, reliability is calculated and updated as a link-level attribute, and reliability skim is saved in the emmbank. Assignment is run only once for glob iter 2 and 3, the reliability skim does not get updated.
  • If turned off, assignment is run once in all glob iter. Reliability is included in the VDFs, but not saved out as a link attribute, reliability skim will be skipped and be written out as 0.

What is the testing plan?

Should test run global iteration 1 and 2's highway assignment to make sure in global iter 1, assignment is run twice and highway reliability is calculated; and in glob iter 2, assignment is run once and highway reliability is not updated.

Demonstrate the code is solid by discussing how results are verified and covered by tests

  • When reliability = true, check glob iter 1 calculated reliability, and glob iter 2 does not. Check the reliability skims from glob iter 1 and 2, to confirm they are the same.
  • When reliability = false, check assignment is run once in both glob iter 1 and 2, and the reliability skims are all 0.

Questions

  • When reliability = false, do we still want to keep the same VDF (with reliability in it)? If yes, then the travel time includes reliability, and the reliability in travel time is not consistent with the reliability skims.

Code formatting

Code should be PEP8 compliant before merging by running a package like black

  • Code linted

Applicable Issues

Please do not create a Pull Request without creating an issue first.

Issues List

@i-am-sijia i-am-sijia marked this pull request as ready for review August 12, 2024 16:38
)
net_calc(
"@reliability",
"(@static_rel+" + reliability_expr,
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@inrokevin I noticed @reliability == @static_rel for all links in the final assigned network which means the LOS based part of reliability was 0 in this step. I believe it's because here reliability_expr had get(1), but get(1) was not initialized. I removed the get(1) from the reliability expr. Please give a thumb-up if you agree with this approach.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

To clarify, this is after I initialized put(1) in the BPR and Akcelik parts in the VDFs.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Agree, this is the simplest fix. I reviewed the changed expression and it looks correct. Thanks Sijia.

@i-am-sijia i-am-sijia merged commit 50148a1 into develop Aug 27, 2024
0 of 2 checks passed
@i-am-sijia i-am-sijia deleted the highway-reliability branch August 27, 2024 15:25
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