Commodity flow problems
Provides examples that involve transporting one or more commodities through a network of facilities.
Commodity flow problems involve transporting one or more commodities through a network of facilities. Constraints can exist on the quantity that can flow on some arcs. Sparsity is likely to be a consideration.
A set of transportation examples
The examples are based on a simple model of transportation between different cities. This represents a multicommodity flow problem on a bipartite graph. It is a classic transportation problem with the addition of a capacity constraint on the intercity connections.
The methodology for exploiting sparsity in OPL consists of mirroring the structure of the application in the model. This structure can be inferred from the objective function and the constraints of the application. A good representation for this application consists of a set of connections, a set of routes, the cost of the routes, and the demand and supply information.
The examples are:
The basic transportation model: examples/opl/transp. This is accessed using the default run configuration Basic Configuration.
First step towards a sparse model: examples/opl/transp/transp2.mod. This is accessed using the run configuration Sparsity.
Second step towards a sparse model: examples/opl/transp/transp3.mod. This is accessed using the default run configuration Better sparsity.
A version of the project with preprocessing scripts to prepare the data: examples/opl/transp/transp4.mod. This is accessed using the default run configuration Even better sparsity.
See also The transportation example in IDE Tutorials, and Modeling tips in the Language User’s Manual.