[Lemon-user] lemon::MinCostMaxFlow

Kovács Péter kpeter at inf.elte.hu
Sun Nov 21 22:51:15 CET 2010


Dear Arun,

The current releases of LEMON do not contain a direct implementation of 
MinCostMaxFlow. However, they provide efficient algorithms for the max 
flow and min cost flow problems and it is quite easy to combine these 
algorithms to find a min cost max flow.

You can find the max flow value between two nodes using the Preflow 
class (e.g. by calling runMinCut(), which is faster than run()). After 
that, you should use NetworkSimplex or CostScaling to compute a minimum 
cost flow with the previously computed flow vale (use stSupply(s, t, 
flowValue) for initialization).

Best regards,
Peter

> Hi,
>
> I was wondering whether this class has been implemented? Any example of
> it's usage please?
>
> Thanks,
> --
> Arun



More information about the Lemon-user mailing list