3
$\begingroup$

Transportation Problem can be solved with simplex algorithm, but it's time demanding.

I'm wondering if there exist a specific Python-implemented algorithm with low complexity.

Thanks

$\endgroup$
7
$\begingroup$

You could try to solve it as a min cost flow problem.

NetworkX is a package for graph algorithms and has algorithms for this implemented. It can easily be installed via pip install networkx.

An minimal working example is given at the bottom of this link:

https://networkx.github.io/documentation/networkx-2.4/reference/algorithms/generated/networkx.algorithms.flow.min_cost_flow.html#networkx.algorithms.flow.min_cost_flow

| improve this answer | |
$\endgroup$
2
$\begingroup$

You can try CBC which uses Dual Simplex (the same algorithm CPLEX & GUROBI use). The easiest way to use that through Python is Pyomo.

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.