diff --git a/scripts/3.1_assign_primary_feasible_zones.py b/scripts/3.1_assign_primary_feasible_zones.py index 11c9a83..d1984c6 100644 --- a/scripts/3.1_assign_primary_feasible_zones.py +++ b/scripts/3.1_assign_primary_feasible_zones.py @@ -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, ) @@ -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, ) diff --git a/scripts/run_pipeline.sh b/scripts/run_pipeline.sh index 8944c2b..9da0845 100755 --- a/scripts/run_pipeline.sh +++ b/scripts/run_pipeline.sh @@ -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 diff --git a/src/acbm/assigning/utils.py b/src/acbm/assigning/utils.py index 3b2214e..fb6d7cc 100644 --- a/src/acbm/assigning/utils.py +++ b/src/acbm/assigning/utils.py @@ -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(