Previous topic

initializeNetwork

Next topic

initializeNetworkNodes

This Page

initializeNetworkEdges

ExplicitStateProcess.initializeNetworkEdges(network, *args, **kwargs)

Set initial edge states and parameters to a network.

This implementation of initializeNetworkEdges assumes that it is passed the fraction/amount of edges in each state as additional arguments. That is the parameter name must be a valid edge state as declared when the object is initialized and the value of the parameter must be an integer or a float. If all parameter values add up to the number of edges in network the exact number of edges in that state will be randomly distributed. If the sum is not the number of edges the number of edges in a particular state will be proportional to that number.

Parameters :

network : networkx.Graph

The network to initialize

kwargs : special

One parameter name per state in the process model the value of which should be a number.

Returns :

network : networkx.Graph

The updated network object with edge state distributed.

See also

Process
Superclass