This class is a specialization of Process where node and edge states are determined from associated attribute dictionary. As a returned state must be hashable it is defined as the frozen set of the attribute dictionary. Methods that take state names as parameters do this as strings formatted as python dictionaries (thus describing the attribute dictionary).
When initialized this class require a declaration of all possible attribute names, and all possible values those attributes may be set to.
Used for convenience to collect a number of similar methods for all subclasses.
A deriving class need only to overload the __init__ and/or any of the *UpdateRule methods that will be used.
See also
Methods
deduceEdgeState(edge) | Gives the state of a edge. |
deduceNodeState(node) | Gives the state of a node. |
edgeUpdateRule(edge, srcNetwork, dt) | Perform local edge change. |
initializeNetwork(network, *args, **kwargs) | Initialize the mean field states on the network. |
initializeNetworkEdges(network, *args, **kwargs) | Set initial edge states and parameters to a network. |
initializeNetworkNodes(network, *args, **kwargs) | Set initial node states and parameters to a network. |
networkUpdateRule(network, dt) | Perform update to global network structure and attributes. |
nodeUpdateRule(node, srcNetwork, dt) | Perform local node changes. |
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
edgeAttributeDict : dict
meanFieldStates : list
runEdgeUpdate : bool
runNodeUpdate : bool
runNetworkUpdate : bool
constantTopology : bool
|
---|
Methods
__init__(nodeAttributeDict, ...[, ...]) | Initialize an object of this class by giving all possible node and edge state values. |
deduceEdgeState(edge) | Gives the state of a edge. |
deduceNodeState(node) | Gives the state of a node. |
edgeUpdateRule(edge, srcNetwork, dt) | Perform local edge change. |
initializeNetwork(network, *args, **kwargs) | Initialize the mean field states on the network. |
initializeNetworkEdges(network, *args, **kwargs) | Set initial edge states and parameters to a network. |
initializeNetworkNodes(network, *args, **kwargs) | Set initial node states and parameters to a network. |
networkUpdateRule(network, dt) | Perform update to global network structure and attributes. |
nodeUpdateRule(node, srcNetwork, dt) | Perform local node changes. |
Attributes
CFG_PARAM_deal_exact | str(object) -> string |