RelationshipDurationChanger

The RelationshipDurationChanger node intervention class allows the user to change the duration of relationships of a particular type in a node. This allows the user to model, for example, how an education program or other intervention could cause a change in people’s behavior. This intervention overrides the Duration_Weibull_Heterogeneity and Duration_Weibull_Scale values in the Demographics file that typically determine duration for each relationship type. Note, this intervention does not expire; it causes an existing intervention to be removed. Hence, to reset the parameter, the user should submit a second intervention with the original value. This change impacts the relationships one time step after it was distributed.

Note

Parameters are case-sensitive. For Boolean parameters, set to 1 for true or 0 for false. Minimum, maximum, or default values of “NA” indicate that those values are not applicable for that parameter.

EMOD does not use true defaults; that is, if the dependency relationships indicate that a parameter is required, you must supply a value for it. However, many of the tools used to work with EMOD will use the default values provided below.

JSON format does not permit comments, but you can add “dummy” parameters to add contextual information to your files. Any keys that are not EMOD parameter names will be ignored by the model.

The table below describes all possible parameters with which this class can be configured. The JSON example that follows shows one potential configuration.

Parameter

Data type

Minimum

Maximum

Default

Description

Example

Disqualifying_Properties

array of strings

NA

NA

[]

A list of NodeProperty key:value pairs that causes the intervention not to be distributed to the node or aborted (stopped before it could be applied). See NodeProperties and IndividualProperties parameters for more information.

{
  "Disqualifying_Properties": [
    "HasHealthCare:YES"
  ]
}

Dont_Allow_Duplicates

boolean

0

1

0

If a node’s container has an intervention, set to true (1) to prevent it from receiving another copy of the intervention. Supported by all intervention classes.

{
  "Dont_Allow_Duplicates": 0
}

Intervention_Name

string

NA

NA

RelationshipDurationChanger

The optional name used to refer to this intervention as a means to differentiate it from others that use the same class.

{
  "Intervention_Config": {
    "Intervention_Name": "My_Duration_Changer",
    "class": "RelationshipDurationChanger"
  }
}

New_Property_Value

string

NA

NA

“”

An optional NodeProperty key:value pair that will be assigned when the intervention is applied. See NodeProperties and IndividualProperties parameters for more information.

{
  "New_Property_Value": "HasHealthCare:YES"
}

Overriding_Duration_Weibull_Heterogeneity

float

0

100

1

Overrides the Duration_Weibull_Heterogeneity Demographics parameter for the indicated relationship type. The heterogeneity parameter is the inverse of the Weibull shape (1/kappa) parameter of relationship duration in years.

{
  "class": "RelationshipDurationChanger",
  "Relationship_Type": "COMMERCIAL",
  "Overriding_Duration_Weibull_Heterogeneity": 0.6,
  "Overriding_Duration_Weibull_Scale": 22
}

Overriding_Duration_Weibull_Scale

float

0

3.40282e+38

1

Overrides the Duration_Weibull_Scale Demographics parameter for the indicated relationship type. The heterogeneity parameter is the Weibull scale parameter of relationship duration in years.

{
  "class": "RelationshipDurationChanger",
  "Relationship_Type": "COMMERCIAL",
  "Overriding_Duration_Weibull_Heterogeneity": 0.6,
  "Overriding_Duration_Weibull_Scale": 22
}

Relationship_Type

enum

NA

NA

TRANSITORY

Change the behavior of the relationships for this type of relationship in this node. Possible values are:

  • TRANSITORY

  • INFORMAL

  • MARITAL

  • COMMERCIAL

{
  "Overriding_Duration_Weibull_Heterogeneity": 0.6,
  "Overriding_Duration_Weibull_Scale": 22,
  "Relationship_Type": "COMMERCIAL",
  "class": "RelationshipDurationChanger"
}
{
    "Use_Defaults": 1,
    "Events": [{
        "class": "CampaignEvent",
        "Start_Day": 40,
        "Nodeset_Config": {
            "class": "NodeSetAll"
        },
        "Event_Coordinator_Config": {
            "class": "StandardInterventionDistributionEventCoordinator",
            "Node_Property_Restrictions": [{
                "HasHealthCare": "YES"
            }],
            "Intervention_Config": {
                "class": "RelationshipDurationChanger",
                "Relationship_Type": "COMMERCIAL",
                "Overriding_Duration_Weibull_Heterogeneity": 0.6,
                "Overriding_Duration_Weibull_Scale": 22.0
            }
        }
    }]
}