-
Notifications
You must be signed in to change notification settings - Fork 1
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
Use estimated travel distances instead of euclidian distance #80
Merged
sgreenbury
merged 10 commits into
main
from
79-checking-and-validating-travel-distance-assumptions
Jan 31, 2025
Merged
Use estimated travel distances instead of euclidian distance #80
sgreenbury
merged 10 commits into
main
from
79-checking-and-validating-travel-distance-assumptions
Jan 31, 2025
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 tasks
2 tasks
Added a test for _adjust_distance here: 18aecb4 TODO: Add a warning to say "default decay rate only works well if the distances are in meters". |
sgreenbury
reviewed
Jan 24, 2025
sgreenbury
force-pushed
the
79-checking-and-validating-travel-distance-assumptions
branch
from
January 31, 2025 09:48
d4dc19d
to
7c6e914
Compare
sgreenbury
force-pushed
the
79-checking-and-validating-travel-distance-assumptions
branch
from
January 31, 2025 09:54
7c6e914
to
22c98de
Compare
Thanks for this @Hussein-Mahfouz, this looks great. I rebased on main and added 22c98de to address the comment we added when reviewing last week and the TODO above so will go ahead and merge. |
sgreenbury
deleted the
79-checking-and-validating-travel-distance-assumptions
branch
January 31, 2025 12:46
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Introduces a new feature to account for detour factors and decay rates when calculating travel distances. These travel distances are used in estimating feasible zones, and in plotting actual vs reported distances. Related to #79
Key changes:
Utility Function Updates:
src/acbm/assigning/utils.py
: Added_adjust_distance
function and updatedzones_to_time_matrix
to include detour and decay adjustments when calculting travel distance from euclidean distances. To check parameters, see this interactive wolfram alpha plotsrc/acbm/assigning/feasible_zones_primary.py
: Updatedget_possible_zones
to includedetour_factor
anddecay_rate
parameters and adjusted the travel time matrix accordingly.src/acbm/validating/utils.py
: Updatedcalculate_od_distances
to include the detour and decay adjustments.Configuration Updates:
config/base.toml
: Addeddetour_factor
anddecay_rate
parameters under the new[feasible_assignment]
section.src/acbm/config.py
: IntroducedFeasibleAssignmentParams
class and added it to theConfig
class.Script Updates:
scripts/3.1_assign_primary_feasible_zones.py
: Updated theget_possible_zones
function to passdetour_factor
anddecay_rate
to the travel time matrix and filtering functions.scripts/3.3_assign_facility_all.py
: Updated theplot_scatter_actual_reported
function to use the new parameters when plotting. The distance is calculated from the euclidian distance.scripts/4_validation.py
: Addeddetour_factor
anddecay_rate
parameters to the distance validation plots.