Skip to content

Commit

Permalink
don't correct bug that wouldn't be backwards compatible
Browse files Browse the repository at this point in the history
  • Loading branch information
s-bessey committed May 11, 2023
1 parent 4001bfa commit 996fc74
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions tests/integration_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -427,10 +427,10 @@ def test_dissolution(params_integration, tmpdir):
model.params.demographics.black.sex_type.MSM.drug_type.Inj.num_partners
)
for agent in model.pop.all_agents:
agent.mean_num_partners["Inj"] = 0
agent.mean_num_partners["Sex"] = 0
agent.mean_num_partners["SexInj"] = 0
agent.mean_num_partners["Social"] = 0
agent.mean_num_partners["Inj"] = -1
agent.mean_num_partners["Sex"] = -1
agent.mean_num_partners["SexInj"] = -1
agent.mean_num_partners["Social"] = -1
model.pop.update_partner_targets()

model.step(tmpdir)
Expand Down
2 changes: 1 addition & 1 deletion titan/population.py
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ def update_partnerability(self, a):
"""
for bond in self.params.classes.bond_types.keys():
if a in self.partnerable_agents[bond]:
if len(a.partners[bond]) >= (
if len(a.partners[bond]) > (
a.target_partners[bond] * self.params.calibration.partnership.buffer
):
self.partnerable_agents[bond].remove(a)
Expand Down

0 comments on commit 996fc74

Please sign in to comment.