Skip to content

Commit

Permalink
fixed for the test from old code
Browse files Browse the repository at this point in the history
  • Loading branch information
bobkatla committed Aug 25, 2024
1 parent b94fc7a commit d4cbaed
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
8 changes: 4 additions & 4 deletions PopSynthesis/Methods/connect_HH_PP/scripts/adjust_5.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ def main():
geo_lev = "POA"
processed_already = ["hhsize", "totalvehs", "hhinc", "dwelltype", "owndwell"]

all_rela_exist = ALL_RELA.copy()
all_rela_exist.remove("Self")
all_rela_exist = AVAILABLE_RELATIONSHIPS.copy()
all_rela_exist.remove("Main")

ls_final_hh = []
ls_final_pp = []
Expand Down Expand Up @@ -184,14 +184,14 @@ def main():
# We do not convert the deleted to new marg anymore
# We created the new ones based on kept and update the kept
marg_from_kept_hh = convert_full_to_marg_count(
hh_df_keep, geo_lev, ALL_RELA + ["POA", "hhid"]
hh_df_keep, geo_lev, AVAILABLE_RELATIONSHIPS + ["POA", "hhid"]
)
diff_marg = get_diff_marg(marg_hh, marg_from_kept_hh)
new_kept_hh = adjust_kept_hh_match_census(hh_df_keep, diff_marg, geo_lev)

# checking
new_kept_marg = convert_full_to_marg_count(
new_kept_hh, geo_lev, ALL_RELA + ["POA", "hhid"]
new_kept_hh, geo_lev, AVAILABLE_RELATIONSHIPS + ["POA", "hhid"]
)
new_diff_marg = get_diff_marg(marg_hh, new_kept_marg)
checking_not_neg = new_diff_marg < 0
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ def filter_pool(pool):
# hhsize HAS to be equal the total of other rela (+1 because of main person)
# we will have the max hhsize
max_hhsize = 11
print(check_relas)
pool["sum_by_rela"] = pool[check_relas].sum(axis=1) + 1

def f(r):
Expand Down

0 comments on commit d4cbaed

Please sign in to comment.