matrices

List of utilities for computing network matrices

compute_adjacency_matrix(net) ndarray[source]
compute_consumers_cycle_matrix(net)[source]

Computes the edge-loop incidence matrix, or cycle matrix, of the network containing loops from the producer to each consumer.

compute_cycle_matrix(net, method='nx')[source]

Computes the edge-loop incidence matrix, or cycle matrix, of a cycle basis of the Network net.

compute_imposed_mdot_matrix(net)[source]

Computes the edge-loop incidence matrix, or cycle matrix, of the network containing loops from the producer to each consumer.

compute_incidence_matrix(net, oriented: bool = True) ndarray[source]
compute_network_cycle_matrix(net)[source]

Computes the edge-loop incidence matrix, or cycle matrix, of the network graph such that:

  • There is a single cycle passing from each consumer, which includes only pipes and the main consumer

  • There is a single cycle passing from each secondary producer, which includes only pipes and the main consumer

This allows for a better flexibility on how to impose setpoints to the simulations.