Presenting the transportation example

Summarizes the problem and explains what to do and where to find the files.

This is a multicommodity flow problem with cities that supply products and cities that demand products. In addition, there is a capacity constraint on the connections between the cities. One issue in large-scale transportation problems like this is that only a fraction of the cities are interconnected. Because of this sparsity issue, a good representation for this application consists of explicit sets of connections, routes, and costs of routes, as well as the demand and supply information.

The approach to solving this example is described in detail in Exploiting sparsity in the Language User’s Manual. This section assumes that you are familiar with this example and the solving strategy as explained in that document.

The file transp4.mod contains preprocessing scripts to prepare data and options and to display data. See the code sample Preprocessing statements.

Preprocessing scripts are execute blocks declared before constraints, like this:


execute {
...
}
Important:

Any execute statement for preprocessing must precede the objective function in the model file.

What you are going to do

Working from the transportation example described, you will:

The script variant of the example is supplied as file transp4.mod, used in the run configuration named Even better sparsity, which associates the model file transp4.mod and the data file transp4.dat of the transp project, available at the following location:

<Install_dir>\opl\examples\opl\transp

where <Install_dir> is your installation directory.