Git rid of dependencies (will speed up run time significantly)
Memory management of networkx is currently the bigger limitation with respect to runtime than solving the min cost flow.
If we had a standalone min cost flow solver (e.g. https://github.com/lagrang3/mincostflow ) which also had no dependencies we could also store the UncertaintyNetwork within the min cost flow solver.
Hi @renepickhardt. I was considering the options we have to address this issue in the context of the Summer of Bitcoin project. One possibility is that we start coding the MCF (min cost flow solver) on this repository, or continue the work in https://github.com/lagrang3/mincostflow. I prefer the second option because it splits the purposes of the repositories and the tasks of the developers in a well defined manner. However, my mincostflow is going to be implemented for the sole purpose of solving the Multi-Part-Payments, hence it also makes sense if they could be found together either in the same repository or as two different repositories under the same superproject. We can leave this matter on the table and decide to migrate later if the idea is seemed convenient.
I was also thinking on the python bindings and doing some little experiments because I am not an expert on the field. I have seen two was we can achieve this:
- the first is to use Boost Python library, which should be straightforward. Once we have a Boost dependency we could also think of experimenting with different backends for the MCF, our problem specific solver and Boost's Graph library.
- another option would be to provide python bindings through Python's
ctypeslibrary, that would give us lower level control but it is also more difficult.