How to Set Up a Network¶

Therefore, the network does not hold much data itself but rather passes requests to the subcompontent
that holds the data. For example, if an algorithm sends a request to the network about
the cost of a flow network.C(x)
, the network passes this request to its cost
subcomponent and returns (a modified) value network.cost(x).sum()
. The main network elements can
be accessed via
network.shared
,
network.nodes
,
network.edges
,
network.cost
and
network.demand
.
We developed this architecture to achieve modularization and separate of concerns while allowing for
complex cost and demand functions. Note that all network components need access to certain network attributes
such as the number of vertices and links reference
to the Shared
network object that in
turn wraps nodes and edges.
For further details about how to set up a graph (directed or undirected) or specify demand and costs, see: