emodpy_hiv.interventions.setsexualdebut module

emodpy_hiv.interventions.setsexualdebut.track_sexual_debut_intervention(camp, YearSexualDebutRatios, Start_Year=1960.5, End_Year=2050, node_ids=None, Target_Age_Max=125, Target_Age_Min=0, Target_Demographic='Everyone', Target_Gender='All', Update_Period=30.416667, Distributed_Event_Trigger='Setting_Age_Sexual_Debut', Setting_Type='CURRENT_AGE', Age_Years=None, intervention_name: str | None = None, disqualifying_properties: List[str] | None = None, new_property_value: str | None = None)[source]

Return a campaign event with an intervention that sets target values for sexual debuts for different points in time.

Parameters:
  • camp – emod_api.campaign object with schema_path set.

  • YearSexualDebutRatios – A map that maps time to values e.g. {“1960”: 0.1, “1970”: 0.2, “1980”: 0.3}

  • Start_Year – When to start.

  • End_Year – When to end.

  • node_ids – Nodes to target with this intervention, return from utils.do_nodes().

  • Target_Age_Max – Maximum age (in years).

  • Target_Age_Min – Minimum age (in years).

  • Target_Demographic – Everyone, ExplicitAgeRanges, etc.

  • Target_Gender – All, Male, or Female.

  • Update_Period – Number representing how frequently the distributions are done.

  • Distributed_Event_Trigger – Event that is broadcasted when the intervention is distributed to the individual.

  • Setting_Type – “CURRENT_AGE” lets individuals debut at their current age, “USER_SPECIFIED” uses Age_Years to set the age of sexual debut.

  • Age_Years – Age of sexual debut.

Returns:

Schema-based smart dictionary representing a new ReferenceTrackingEventCoordinatorTrackingConfig intervention ready to be added to a campaign.

Return type:

ReadOnlyDict

emodpy_hiv.interventions.setsexualdebut.new_intervention_event(camp, Event_Start_Day=1, Coverage=1.0, Target_Age_Max=None, Target_Age_Min=None, Target_Gender='All', Target_Demographic='Everyone', node_ids=None, Setting_Type=None, Age_Years=None, Distributed_Event_Trigger=None, intervention_name: str | None = None, disqualifying_properties: List[str] | None = None, new_property_value: str | None = None)[source]

SetSexualDebutAge campaign event to set the age of sexual debut. :param camp: emod_api.campaign object with schema_path set.camp (): :param Event_Start_Day: When to start. :param Coverage: Coverage of the intervention. :param Target_Age_Max: Maximum age (in years). :param Target_Age_Min: Minimum age (in years). :param Target_Gender: All, Male, or Female. :param Target_Demographic: Everyone, ExplicitAgeRanges, etc. :param node_ids: Nodes to target with this intervention, return from utils.do_nodes(). :param Setting_Type: “USER_SPECIFIED” or “CURRENT_AGE”. “USER_SPECIFIED” needs Age_Years to be set. :param Age_Years: Age at what on individuals will debut. :param Distributed_Event_Trigger: Event that is distributed when the intervention is applied. :param intervention_name: The name of the intervention. :type intervention_name: str :param disqualifying_properties: A list of IndividualProperty key:value pairs that cause an intervention to be aborted :type disqualifying_properties: list of str :param new_property_value: An optional IndividualProperty key:value pair that will be assigned when the intervention is distributed. :type new_property_value: str

Returns:

Schema-based smart dictionary representing a new SetSexualDebutAge event that can be added to a campaign.

Return type:

ReadOnlyDict

emodpy_hiv.interventions.setsexualdebut.new_intervention_as_file(camp, start_day, filename='SexualDebut.json')[source]

Adds the SetSexualDebutAge event to the emod_api.campaign object and saves the campaign to a file. :param camp: emod_api.campaign object :param start_day: start day of the event :param filename: output file name

Returns:

name of the file

Return type:

filename