Skip to content

Commit

Permalink
update _adjust_distance
Browse files Browse the repository at this point in the history
  • Loading branch information
Hussein-Mahfouz committed Dec 13, 2024
1 parent 84a9273 commit a588c67
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions scripts/3.1_assign_primary_feasible_zones.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ def main(config_file):
zone_id=config.zone_id,
filter_by_activity=True,
activity_col="education_type",
time_tolerance=0.3,
time_tolerance=0.2,
detour_factor=config.feasible_assignment.detour_factor,
decay_rate=config.feasible_assignment.decay_rate,
)
Expand Down Expand Up @@ -255,7 +255,7 @@ def main(config_file):
zone_id=config.zone_id,
filter_by_activity=True,
activity_col="dact",
time_tolerance=0.3,
time_tolerance=0.2,
detour_factor=config.feasible_assignment.detour_factor,
decay_rate=config.feasible_assignment.decay_rate,
)
Expand Down
10 changes: 5 additions & 5 deletions scripts/run_pipeline.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ set -e
# python scripts/0_preprocess_inputs.py --config_file $1
# python scripts/0.1_run_osmox.py --config_file $1
# python scripts/1_prep_synthpop.py --config_file $1
# python scripts/2_match_households_and_individuals.py --config_file $1
# python scripts/3.1_assign_primary_feasible_zones.py --config_file $1
# python scripts/3.2.1_assign_primary_zone_edu.py --config_file $1
# python scripts/3.2.2_assign_primary_zone_work.py --config_file $1
# python scripts/3.2.3_assign_secondary_zone.py --config_file $1
python scripts/2_match_households_and_individuals.py --config_file $1
python scripts/3.1_assign_primary_feasible_zones.py --config_file $1
python scripts/3.2.1_assign_primary_zone_edu.py --config_file $1
python scripts/3.2.2_assign_primary_zone_work.py --config_file $1
python scripts/3.2.3_assign_secondary_zone.py --config_file $1
python scripts/3.3_assign_facility_all.py --config_file $1
python scripts/4_validation.py --config_file $1
python scripts/5_acbm_to_matsim_xml.py --config_file $1
2 changes: 1 addition & 1 deletion src/acbm/assigning/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ def _adjust_distance(
float
The adjusted distance.
"""
return distance * (1 + ((detour_factor - 1) * np.exp(-decay_rate * distance)))
return distance * ((1 + (detour_factor - 1)) * np.exp(-decay_rate * distance))


def zones_to_time_matrix(
Expand Down

0 comments on commit a588c67

Please sign in to comment.