Next topic

deduceEdgeState

This Page

__init__

AttributeStateProcess.__init__(nodeAttributeDict, edgeAttributeDict, meanFieldStates, runNodeUpdate=True, runEdgeUpdate=True, runNetworkUpdate=True, constantTopology=False)

Initialize an object of this class by giving all possible node and edge state values.

If you subclass and overload this method make sure to use super to call it.

Parameters :

nodeAttributeDict : dict

A dictionary where key:val pair is the name of the node attribute and a tuple of all its possible values. Example: {‘age’: (1,2,3,4), ‘colour’: (‘red’,’green’)} denotes a process where nodes have two attributes (age, and colour). The first one can take one out of four different values and the second one of two values. This result in a network with 4*2=8 different node states.

edgeAttributeDict : dict

A dictionary where key:val pair is the name of the edge attribute and a tuple of all its possible values. Example: {‘age’: (1,2,3,4), ‘colour’: (‘red’,’green’)} denotes a process where edges have two attributes (age, and colour). The first one can take one out of four different values and the second one of two values. This result in a network with 4*2=8 different edge states.

meanFieldStates : list

A list of mean field states. The states specified in here will be tracked by the process and stored as a network attribute. Each state is a dictionary made up of either node or edge attribute:value pairs.

runEdgeUpdate : bool

See Process

runNodeUpdate : bool

See Process

runNetworkUpdate : bool

See Process

constantTopology : bool

See Process