Thank you. Best,
Alex ________________________________________ From: graph-tool [firstname.lastname@example.org] on behalf of Tiago de Paula Peixoto [email@example.com] Sent: Friday, March 10, 2017 17:35 To: Main discussion list for the graph-tool project Subject: Re: [graph-tool] FW: Graphtool: Finding the paths that the maximum flow algorithm produces
On 10.03.2017 16:16, Hobé Alex wrote:
I guess I need to be a little clearer on what I am trying to achieve. The previous image has 41 possible paths according to the graph tool (using all_paths). I have now been able to reduce these to 6 by removing all of the edges with a weight of 0.0 (attached png).
I am setting the flow through each path as the minimum weight encountered on that path. When I then sum over each path, the total flow should equal to the max flow result.
When I sum over the six paths obtained, I get a too high result. Using the rules I just described, the paths 1-4 add up to the desired result.
What you want seems to be the solution of a constrained optimization problem, i.e. sets of paths that collectively exhaust the maximum flow. There is not ready algorithm for this in graph-tool, you have to come up with your own.
-- Tiago de Paula Peixoto firstname.lastname@example.org