Use estimated travel distances instead of euclidian distance #80
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.