MCPcopy Create free account
hub / github.com/ERGO-Code/HiGHS / flow

Function flow

examples/network_flow.py:25–26  ·  view source on GitHub ↗
(E)

Source from the content-addressed store, hash-verified

23 return 1 if n == orig else -1 if n == dest else 0
24
25def flow(E):
26 return h.qsum((x[e] for e in E))
27
28h.addConstrs(flow(G.out_edges(n)) - flow(G.in_edges(n)) == rhs(n) for n in G.nodes)
29h.minimize()

Callers 1

network_flow.pyFile · 0.85

Calls 1

qsumMethod · 0.80

Tested by

no test coverage detected