Skip to content

Issue with change of HealthSystem parameters in master #1774

@marghe-molaro

Description

@marghe-molaro

Job_ID = effect_of_capabilities_scaling-2026-01-08T182812Z was submitted branching off from the current version of master considering a standard scenario file , in which a mode or consumable availability switch in the HealthSystem are considered in 2019.

The two draws which involve a parameter change (draws 1 and 2) appear to fail at the point in the simulation when parameters should be updated. The error messages are different in each case (copied below).

Possible explanations:

  • Error in the scenario file?
  • Bug in the current version of master

Updating mode
Traceback (most recent call last):
File "/usr/local/bin/tlo", line 8, in
sys.exit(cli())
^^^^^
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1157, in call
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/TLOmodel/src/tlo/cli.py", line 298, in batch_run
runner.run_sample_by_number(output_directory, draw, sample)
File "/TLOmodel/src/tlo/scenario.py", line 452, in run_sample_by_number
sim.run_simulation_to(to_date=self.scenario.end_date)
File "/TLOmodel/src/tlo/simulation.py", line 386, in run_simulation_to
self.fire_single_event(event, date)
File "/TLOmodel/src/tlo/simulation.py", line 428, in fire_single_event
event.run()
File "/TLOmodel/src/tlo/events.py", line 66, in run
self.apply(self.target)
File "/TLOmodel/src/tlo/methods/healthsystem.py", line 3237, in apply
event = HSIEventQueueItem(
^^^^^^^^^^^^^^^^^^
TypeError: HSIEventQueueItem.new() missing 1 required positional argument: 'hsi_event'

Updating consumable availability
Traceback (most recent call last):
File "/usr/local/bin/tlo", line 8, in
sys.exit(cli())
^^^^^
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1157, in call
return self.main(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1078, in main
rv = self.invoke(ctx)
^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/lib/python3.11/site-packages/click/core.py", line 783, in invoke
return __callback(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/TLOmodel/src/tlo/cli.py", line 298, in batch_run
runner.run_sample_by_number(output_directory, draw, sample)
File "/TLOmodel/src/tlo/scenario.py", line 452, in run_sample_by_number
sim.run_simulation_to(to_date=self.scenario.end_date)
File "/TLOmodel/src/tlo/simulation.py", line 386, in run_simulation_to
self.fire_single_event(event, date)
File "/TLOmodel/src/tlo/simulation.py", line 428, in fire_single_event
event.run()
File "/TLOmodel/src/tlo/events.py", line 66, in run
self.apply(self.target)
File "/TLOmodel/src/tlo/methods/healthsystem.py", line 3087, in apply
self.module.consumables.availability = self._parameters["cons_availability"]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/TLOmodel/src/tlo/methods/consumables.py", line 97, in availability
self._update_prob_item_codes_available(self._availability)
File "/TLOmodel/src/tlo/methods/consumables.py", line 176, in _update_prob_item_codes_available
raise ValueError
ValueError

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions