Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2009

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Example for NetworkFlow function

  • To: mathgroup at smc.vnet.net
  • Subject: [mg96996] Re: Example for NetworkFlow function
  • From: "Sjoerd C. de Vries" <sjoerd.c.devries at gmail.com>
  • Date: Sun, 1 Mar 2009 04:57:19 -0500 (EST)
  • References: <go63nk$ptc$1@smc.vnet.net>

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... at googlemail.com>
wrote:
> 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.



  • Prev by Date: Re: contourlabels in contour plot
  • Next by Date: Re: Can't quite figure out tensors
  • Previous by thread: Re: contourlabels in contour plot
  • Next by thread: Re: Can't quite figure out tensors