Google Ryhmät ei enää tue uusia Usenet-postauksia tai ‐tilauksia. Aiempi sisältö on edelleen nähtävissä.

Example for NetworkFlow function

11 katselukertaa
Siirry ensimmäiseen lukemattomaan viestiin

Karsten W.

lukematon,
26.2.2009 klo 7.59.3226.2.2009
vastaanottaja
Hello,

can you point me to a minimal commented example of the NetworkFlow
function?

I have a graph with sources, sinks and transshipment nodes and I do
not know how to specify these nodes as function parameters.

Any hint appreciated,
kind regards,

Karsten.

Sjoerd C. de Vries

lukematon,
1.3.2009 klo 4.57.241.3.2009
vastaanottaja
Not sure whether this helps, but as an example the network in the
wikipedia article (http://en.wikipedia.org/wiki/Flow_network)
translates to (if I'm interpreting everything right):

NetworkFlow[FromAdjacencyMatrix[{{Infinity, 5, 3, Infinity, Infinity,
Infinity}, {0, Infinity, 2, 3, Infinity, Infinity},
{0, 2, Infinity, Infinity, 4, Infinity}, {Infinity, 0,
Infinity,
Infinity, 1, 2}, {Infinity, Infinity, 0, 0, Infinity, 5},
{Infinity, Infinity, Infinity, 0, 0, Infinity}},
EdgeWeight], 1, 6]

You're talking about sinks and sources. Judging from the documentation
I'd say only one sink and one source are possible.

Cheers -- Sjoerd

On Feb 26, 2:59 pm, "Karsten W." <Karsten.G.Wein...@googlemail.com>
wrote:

0 uutta viestiä