nocad.datasets.make_water_tanks#

nocad.datasets.make_water_tanks(n_tanks=3, topology='branch', connection='physical')[source]#

Networks of water tanks with different connection types.

Parameters:
n_tanksint, default=3
topology{“branch”, “cascade”}

"branch": tank 1 feeds all the others (the example of Leitold et al. 2017); "cascade": tank \(i\) feeds tank \(i+1\).

connection{“physical”, “free_outflow”, “connected”}

"physical": one edge per pipe (type a); "free_outflow": the outflow of every tank depends on its own level, so every state has a self-loop (type d); "connected": connected vessels, the flow depends on the level difference, so every pipe gives a symmetric pair of edges and every tank a self-loop (type g).

Returns:
dataBunch with adj, labels (h1, h2, …) and pipes (edge list).

Examples

>>> make_water_tanks(3, "branch", "physical").adj.toarray().astype(int)
array([[0, 1, 1],
       [0, 0, 0],
       [0, 0, 0]])

Examples using nocad.datasets.make_water_tanks#

From a state-space model to the network of its state variables

From a state-space model to the network of its state variables