Skip to content

Commit

Permalink
Revert erroneous change to kwargs in set capabilities monitor
Browse files Browse the repository at this point in the history
  • Loading branch information
willGraham01 committed Jun 6, 2024
1 parent 7eb6d64 commit 73c6c1a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
11 changes: 4 additions & 7 deletions src/tlo/methods/bed_days.py
Original file line number Diff line number Diff line change
Expand Up @@ -600,13 +600,10 @@ def resolve_overlapping_occupancies(
# since these are always "non_bed_space", IE not beds.
# In such cases, the occupancies should not have been scheduled in
# anyway, so throw an error.
assert (bed_on_each_day < len(self.bed_types) - 1).all(), (
"Patient is scheduled to have at least one day in a non-bed-space "
"when resolving conflicting bed day occupancies. "
"This implies that at least one occupancy in the two sets of "
"occupancies does not conflict with the others. "
"Such non-conflicting occupancies should be removed before "
"calling this method."
if not (bed_on_each_day < len(self.bed_types) - 1).all():
self._logger.warning(
f"Patient {patient_id} is scheduled to have at least one day "
"in a non-bed-space when resolving conflicting bed day occupancies."
)

# We now know the bed allocation for this person.
Expand Down
2 changes: 1 addition & 1 deletion src/tlo/methods/healthsystem.py
Original file line number Diff line number Diff line change
Expand Up @@ -1028,7 +1028,7 @@ def _rescale_capabilities_to_capture_effective_capability(self):
# Only rescale if rescaling factor is greater than 1 (i.e. don't reduce
# available capabilities if these were under-used the previous year).
rescaling_factor = self._summary_counter.frac_time_used_by_officer_type_and_level(
officer_type, level
officer_type=officer_type, level=level
)
if rescaling_factor > 1 and rescaling_factor != float("inf"):
self._daily_capabilities[officer] *= rescaling_factor
Expand Down

0 comments on commit 73c6c1a

Please sign in to comment.