emodpy_hiv.emod_task module#

class emodpy_hiv.emod_task.EMODHIVTask(command: str | ~idmtools.entities.command_line.CommandLine = <property object>, platform_requirements: ~typing.Set[~idmtools.entities.platform_requirements.PlatformRequirements] = <factory>, _ITask__pre_creation_hooks: ~typing.List[~typing.Callable[[~idmtools.entities.simulation.Simulation | ~idmtools.entities.iworkflow_item.IWorkflowItem, ~idmtools.entities.iplatform.IPlatform], ~typing.NoReturn]] = <factory>, _ITask__post_creation_hooks: ~typing.List[~typing.Callable[[~idmtools.entities.simulation.Simulation | ~idmtools.entities.iworkflow_item.IWorkflowItem, ~idmtools.entities.iplatform.IPlatform], ~typing.NoReturn]] = <factory>, common_assets: ~idmtools.assets.asset_collection.AssetCollection = <factory>, transient_assets: ~idmtools.assets.asset_collection.AssetCollection = <factory>, eradication_path: str | None = None, demographics: ~emodpy.emod_file.DemographicsFiles = <factory>, migrations: ~emodpy.emod_file.MigrationFiles = <factory>, reporters: ~emodpy.reporters.base.Reporters = <factory>, climate: ~emodpy.emod_file.ClimateFiles = <factory>, config: dict = <factory>, config_file_name: str = 'config.json', campaign: ~emodpy.emod_campaign.EMODCampaign = <factory>, simulation_demographics: ~emodpy.emod_file.DemographicsFiles = <factory>, simulation_migrations: ~emodpy.emod_file.MigrationFiles = <factory>, use_embedded_python: bool = True, py_path_list: list = <factory>, is_linux: bool = False, implicit_configs: list = <factory>, sif_filename: str | None = None)[source]#

Bases: EMODTask

The EMODHIVTask class is a subclass of the EMODTask class from the emodpy.emod_task module. It is specifically designed to handle tasks related to the EMOD HIV model. It provides a function from_default() to create an EMODHIVTask object, which can then be used to run simulations, generate reports, and perform other tasks related to the EMOD HIV model.

The subclass was created so that we could pass the schema path from the from_default() method into the build_campaign() method. This was needed so that the path could be passed to a country model’s build_campaign() method without requiring the user to create their own build function. The country model’s build_campaign() method needs the schema so that it can call set_schema() to reset the campaign’s event array.

This subclass also reduces the users need to know about the emodpy package.

classmethod from_default(eradication_path: str, schema_path: str, param_custom_cb: callable | None = None, config_path: str = 'config.json', campaign_builder: callable | None = None, demog_builder: callable | None = None, write_default_config: str | None = None, ep4_path=None, **kwargs) EMODHIVTask[source]#

Create an EMODHIVTask object for the EMOD HIV model.

Parameters:
  • eradication_path (str) – The path to the eradication executable.

  • schema_path (str) – The path to the schema file.

  • param_custom_cb (callable, optional) – A custom callback function to update the config parameters. Default to None.

  • config_path (str, optional) – Optional filename for the generated config.json file. Default to “config.json”.

  • campaign_builder (callable, optional) – A custom callback function to build the campaign. If this function takes a schema_path argument, it will be passed the schema_path. Default to None.

  • demog_builder (callable, optional) – A custom callback function to build the demographic configuration. Default to None.

  • write_default_config (str, optional) – If provided, it should be a file path where the default config will be written to. If it’s set to None, no default config file will be written. default to None.

  • ep4_path (str, optional) – The path to the directory which contains the EP4(dtk_in_process.py, dtk_post_process.py and dtk_pre_process.py) scripts.

  • **kwargs – Additional keyword arguments.

Returns:

An EMODHIVTask object for the EMOD HIV model.

Return type:

EMODHIVTask

demographics: DemographicsFiles#

Common Demographics

migrations: MigrationFiles#

Common Migrations

reporters: Reporters#

Common Reports

climate: ClimateFiles#

Common Climate

config: dict#

Represents config.jon

campaign: EMODCampaign#

Campaign configuration

simulation_demographics: DemographicsFiles#

Simulation level demographics such as overlays

simulation_migrations: MigrationFiles#

Simulation level migrations

py_path_list: list#
implicit_configs: list#