The Transportation Problem can be solved with a simplex algorithm, but it's time-consuming.
I'm wondering if there exists a specific Python-implemented algorithm with low complexity.
The Transportation Problem can be solved with a simplex algorithm, but it's time-consuming.
I'm wondering if there exists a specific Python-implemented algorithm with low complexity.
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:
You can try CBC which uses Dual Simplex (the same algorithm CPLEX & GUROBI use). The easiest way to use that through Python is Pyomo.
I personally use networkx some example of transportation modelling from networkx is available in my article here.