transportation, a MATLAB code which computes a feasible solution to a simple version of the transportation problem, in which a resource must be transported from several supply centers to several demand centers at minimal cost.
There is a resource currently stored at a number of supply centers, which needs to be transported to a number of demand centers. There is a path or connection from each supply center to each demand center. Each such path has an associated cost charged to transport each unit of resource. The administrator must decide a transportation plan which sends the demanded amount of resource to each demand center, in such a way as to minimize the total cost.
This problem can alternatively be considered an example of a minimal cost matching of nodes in a bipartite graph.
The information on this web page is distributed under the MIT license.
transportation is available in a MATLAB version and an Octave version and a Python version
bellman_ford, a MATLAB code which implements the Bellman-Ford algorithm for finding the shortest distance from a given node to all other nodes in a directed graph whose edges have been assigned real-valued lengths.
floyd, a MATLAB code which implements Floyd's algorithm for finding the shortest distance between pairs of nodes on a directed graph.
toms097, a MATLAB code which computes the distance between all pairs of nodes in a directed graph with weighted edges, using Floyd's algorithm.