Groups - openmpp/openmpp.github.io GitHub Wiki

Home > Model Development Topics > Groups

Groups are hierarchical collections of parameters, tables and attributes declared in model code.

Related topics

Topic contents

Parameter groups

A parameter group is a named, ordered list of parameters and other parameter groups, e.g.

parameter_group PG12_SchoolOneFate  //EN Primary School 
{
    Educ1Model,
    PG10_SchoolOneFateBase,
    PG11_SchoolOneFateRefined,
    PG10_ShoolOneTracking
};

Parameter groups are described in a wiki subtopic here .

[back to topic contents]

Table groups

A table group is a named, ordered list of tables and other table groups, e.g.

table_group TG04_Education //EN Education
{
    TG04_Preschool,
    TG04_Primary,
    TG04_Secondary
};

Table groups are described in a wiki subtopic here .

[back to topic contents]

Attribute groups

An attribute group is a named, ordered list of attributes of a specified kind of entity, and other attribute groups.

The following is an example of an attribute group declaration for the RiskPaths model:

attribute_group Person AG02_Unions  //EN Union-related attributes
{
    dissolution_duration,
    in_union,
    union_duration,
    union_period2_change,
    union_status,
    unions
};

The name of a model code module, quoted, can also be an element of an attribute group. It will be expanded into a list of all the attributes of the specified kind declared in the module, in lexicographical order. For example, the following attribute group

attribute_group Person AG03_Unions  //EN Union-related attributes
{
    "Unions.mpp"
};

has exactly the same attributes, and in the same order, as the attribute group AG02_UnionAttributes shown above.

Attribute groups can be used to specify attributes in an ini file or a command-line option, e.g.

[Microdata]
ToCsv = yes
ToDB = yes
Person = CommonAttributes, union_status

where the attribute group CommonAttributes is declared in model code as

attribute_group Person CommonAttributes  //EN Commonly-used attributes
{
    case_id,
    entity_id,
    age
};

[back to topic contents]

⚠️ **GitHub.com Fallback** ⚠️