Previous topic


Next topic


This Page


AttributeStateProcess.nodeUpdateRule(node, srcNetwork, dt)

Perform local node changes. This method is called once per node per iteration in the simulation. The state of node and srcNetwork is that of the previous iteration. After execution node is expected to be updated and returned in the new state.

This method needs to be overloaded in any sub classes. Its purpose is to make attribute changes to a single node at the time and it should ONLY make changes to node alone.

Parameters :

node : networkx node, Structure: (<node id>, {<attribute name-value map>})

This is a copy of the current node and the target of any changes.

srcNetwork : networkx.Graph

A networkX graph, with the original nodes. Will remain unchanged.

dt : float

Time differential (float) as a fraction of time unit (since last update).

Returns :

node : networkx node

node with changes