Kami models (indra.assemblers.kami.assembler)

class indra.assemblers.kami.assembler.KamiAssembler(statements=None)[source]
make_model(policies=None, initial_conditions=True, reverse_effects=False)[source]

Assemble the Kami model from the collected INDRA Statements.

This method assembles a Kami model from the set of INDRA Statements. The assembled model is both returned and set as the assembler’s model argument.

  • policies (Optional[Union[str, dict]]) – A string or dictionary of policies, as defined in indra.assemblers.KamiAssembler. This set of policies locally supersedes the default setting in the assembler. This is useful when this function is called multiple times with different policies.
  • initial_conditions (Optional[bool]) – If True, default initial conditions are generated for the agents in the model.

model – The assembled Kami model.

Return type:


class indra.assemblers.kami.assembler.Nugget(id, name, rate)[source]

Represents a Kami Nugget.


Add an INDRA Agent and its conditions to the Nugget.

add_edge(from_node, to_node)[source]

Add an edge between two nodes to the Nugget.

add_node(name_base, attrs=None)[source]

Add a node with a given base name to the Nugget and return ID.

add_typing(node_id, typing)[source]

Add typing information to a node in the Nugget.


Return the Nugget as a dictionary.


Return the Nugget’s typing information as a dictionary.