emod_api.demographics.demographics_overlay module#

class emod_api.demographics.demographics_overlay.DemographicsOverlay(nodes: list | None = None, idref: str | None = None, individual_attributes=None, node_attributes=None)[source]#

Bases: DemographicsBase

In contrast to class emod_api:emod_api.demographics.Demographics this class does not set any defaults. It inherits from emod_api:emod_api.demographics.DemographicsBase so all functions that can be used to create demographics can also be used to create an overlay file. Parameters can be changed/set specifically by passing node_id, individual attributes, and individual attributes to the constructor.

to_dict()[source]#
to_file(file_name='demographics_overlay.json')[source]#

Write the contents of the instance to an EMOD-compatible (JSON) file.