examples/cplex/README
author Alpar Juttner <alpar@cs.elte.hu>
Sun, 05 Dec 2010 17:35:23 +0100
changeset 2 4c8956a7bdf4
permissions -rw-r--r--
Set up CMAKE build environment
     1 The program module in this subdirectory is a crude implementation of
     2 CPLEX-like interface to GLPK API. It consists of two files: cplex.c and
     3 cplex.h.
     4 
     5 NOTE that this module is NOT a clean room implementation of the CPLEX
     6 callable library. It only implements a CPLEX-like interface to the GLPK
     7 API routines, and its main purpose is to provide possibility to build
     8 and run applications which normally use the CPLEX callable library.
     9 
    10 This module approximately corresponds to CPLEX 9.0.
    11 
    12 Currently this module can be used as a linear programming solver for
    13 Concorde, the state-of-the-art computer code for solving the symmetric
    14 traveling salesman problem (TSP) developed by David Applegate, Robert
    15 Bixby, Vasek Chvatal, and William Cook. For details about Concorde see
    16 its web page at http://www.tsp.gatech.edu/concorde.html.
    17 
    18 To build Concorde along with GLPK you need to do the following:
    19 
    20 1. Configure, build, and install GLPK.
    21 
    22 2. Download the Concorde tarball co031219.tgz (version Dec 19, 2003),
    23    unpack and unarchive it.
    24 
    25 3. Copy files cplex.h and cplex.c to subdirectory concorde/LP/.
    26 
    27 4. Create file named lpglpk.c in subdirectory concorde/LP/. This file
    28    must contain the following two lines:
    29 
    30       #include "cplex.c"
    31       #include "lpcplex8.c"
    32 
    33 5. Configure Concorde in usual way (./configure) and then build it with
    34    the following command:
    35 
    36       make CPPFLAGS=-I. LPSOLVER_INTERFACE=lpglpk.c LPSOLVER_LIB=-lglpk
    37 
    38    The Concorde executable can be found in subdirectory concorde/TSP/.
    39 
    40 Please note that currently this GLPK interface module does not support
    41 some important features (namely, CPXgetijdiv, CPXmdleave, CPXpivotin,
    42 CPXpivotout, and CPXstrongbranch), so large (more than 1000 nodes) TSP
    43 instances cannot be solved in a reasonable time, and some instances may
    44 cause abnormal termination of Concorde (if CPXgetijdiv is called).