FirstNodeWithNodePropertyEventCoordinator

The FirstNodeWithNodePropertyEventCoordinator coordinator class screens for a desired node property (NP) and then broadcasts a coordinator event when found. When this event coordinator is triggered to start, it goes through the provided list of nodes and checks the NPs of each. (The nodes in the provided list must be defined in the CampaignEvent’s Nodeset_Config parameter.) Once a node is found with the desired NP, the coordinator event is broadcast. An additional coordinator event can be broadcast if the desired NP is NOT found.

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

Coordinator_Name

string

NA

NA

FirstNodeWithNodePropertyEventCoordinator

The unique identifying coordinator name used to identify the different coordinators in reports.

{
  "Coordinator_Name": "FirstNodeWithNodePropertyEventCoordinator"
}

Node_ID_To_Coordinator_Event_List

array of json objects

[]

The list of Node ID & Coordinator Event pairs to find the first node id that has the given NodeProperty.

{
  "Node_ID_To_Coordinator_Event_List": [
    {
      "Coordinator_Event_To_Broadcast": "Send_People_To_Node_2",
      "Node_ID": 2
    },
    {
      "Coordinator_Event_To_Broadcast": "Send_People_To_Node_3",
      "Node_ID": 3
    }
  ]
}

Node_Property_Key_Value_To_Have

string

NA

NA

“”

The NodeProperty key:value pair that the node must have to get its event broadcasted.

{
  "Node_Property_Key_Value_To_Have": "Place:URBAN"
}

Not_Found_Coordinator_Event

string

NA

NA

“”

Coordinator event to broadcast when a node with the given NodeProperty key:value pair is not found. The events contained in the list are defined in Custom_Coordinator_Events in the simulation configuration file.

{
  "Not_Found_Coordinator_Event": "My_Not_Found_Event"
}

Start_Trigger_Condition_List

array of strings

NA

NA

[]

If one of the coordinator events in this list is heard, the coordinator will start and attempt to send an event based on the selection of a node. The events contained in the list are defined in Custom_Coordinator_Events in the simulation configuration file.

{
  "Start_Trigger_Condition_List": [
    "My_Trigger_Event_1",
    "My_Trigger_Event_2"
  ]
}
{
    "Use_Defaults": 1,
    "Events": [{
        "class": "CampaignEvent",
        "Nodeset_Config": {
            "class": "NodeSetAll"
        },
        "Start_Day": 50,
        "Event_Coordinator_Config": {
            "class": "FirstNodeWithNodePropertyEventCoordinator",
            "Start_Trigger_Condition_List": [ "Send_People_To_Node" ],
            "Node_Property_Key_Value_To_Have" : "Place:URBAN",
            "Node_ID_To_Coordinator_Event_List": [
                { "Node_ID":  2, "Coordinator_Event_To_Broadcast": "Send_People_To_Node_2" },
                { "Node_ID":  3, "Coordinator_Event_To_Broadcast": "Send_People_To_Node_3" },
                { "Node_ID":  4, "Coordinator_Event_To_Broadcast": "Send_People_To_Node_4" },
                { "Node_ID":  5, "Coordinator_Event_To_Broadcast": "Send_People_To_Node_5" },
                { "Node_ID":  6, "Coordinator_Event_To_Broadcast": "Send_People_To_Node_6" },
                { "Node_ID":  7, "Coordinator_Event_To_Broadcast": "Send_People_To_Node_7" },
                { "Node_ID":  8, "Coordinator_Event_To_Broadcast": "Send_People_To_Node_8" },
                { "Node_ID":  9, "Coordinator_Event_To_Broadcast": "Send_People_To_Node_9" },
                { "Node_ID": 10, "Coordinator_Event_To_Broadcast": "Send_People_To_Node_10" },
                { "Node_ID": 11, "Coordinator_Event_To_Broadcast": "Send_People_To_Node_11" }
            ],
            "Not_Found_Coordinator_Event": "My_Not_Found_Event"
        }
    }]
}