Skip to main content
1 of 2

Max flow, min cost with upper and lower bounds

:)

I am trying to implement an algorithm that fairly distributes people into groups, given their ranking of those groups, while also taking into account their preference for partners.

I have modeled this as a directed graph with upper and lower bounds and costs on edges representing their ratings. Finding a solution would simply mean maximizing the flow between a source and a drain.

However finding an algorithm that can actually solve this has proven difficult. The only one I came across that seems to match all my requirements is the Out-Of-Kilter algorithm.

Literature about this algorithm is very sparse and dense though. I could also not find a good implementation of it.

I found this one https://github.com/MichalNowicki/NumericalAlgebraCodes but it seems to have some errors, since it produces solutions that do not conserve flow.

What am I missing here? Is there an easier algorithm? Is there a good implementation somewhere out there?

Any help would be greatly appreciated.