Back to SYMPHONY Home Page
Next: Developing a New Application
Up: Quick Start Guide
Previous: Compiling the Distributed Version.
Compiling the Sample Application with Microsoft Windows
Here is a sketch outline of how to compile the sample application, a VRP and
TSP solver, in Microsoft Windows. This is the same information contained in
the README file that comes with the distribution. Direct support is provided
for compilation under MS Visual Studio 6.0. Compilation for other compilers
should also be possible. Note that the windows version has some
limitations. Detailed timing information is not currently provided. Support
is only provided for running in sequential mode at this time.
- Download SYMPHONY-3.0.1.zip and unzip the archive. This will
create a subdirectory called SYMPHONY-3.0.1 containing all
the source files.
- In MS Visual C++ 6.0, open the workspace
SYMPHONY-3.0.1WIN32vrp.dsw. Note that there are
two projects, one called ``symphony'' and one called ``vrp''. The
symphony project contains the source code needed to build the internal
library. The vrp project contains the source code for the user-defined
functions needed to build the sample application, a VRP and TSP solver. Note
that to develop a solver of your own, you would replace the VRP library with
one of your own. A template for doing so is provided (see the quick start
guide in Section ).
- By default, SYMPHONY is set up to use CPLEX 8.1 installed in a folder
called ``C:ILOGCPLEX81''. To use a different LP
solver or to specify a different location for CPLEX, there are a number of
changes that need to be made.
- You must specify the name of and path to the library to be linked. Do
this by right-clicking on the symphony project and choosing ``Add Files to
Project...'' Then locate the library file for the LP solver you are using
(either CPLEX or OSL). For CPLEX, you need the library called cplex**.lib, where ** is your CPLEX version. Make sure to delete the old
library dependency.
- You must set the include path for the solver header files. Do this
by right-clicking on the symphony project and choosing ``Settings...'' Then
choose the ``C/C++'' tab, and choose the category ``Preprocessor'' on the
drop-down menu. Edit the path in the ``Additional include directories''
window.
- You must set the compiler defines so that the right LP solver interface
will be used. Follow the procedure above to get to the preprocessor settings
and edit the ``Preprocessor definitions.'' Make sure that __OSL__ is
defined if you are using OSL or __CPLEX__ is defined if you are
using CPLEX. DO NOT CHANGE COMPILER DEFINES NOT RELATED TO THE LP
SOLVER. Important note for OSL users: When using OSL in Windows, you must also add OSLMSDLL to the list of definitions.
- Note that there are a number of additional compiler defines that control
the functionality of SYMPHONY. These defines are described in SYMPHONY-3.0.1Makefile, a Unix-style makefile included with the
distribution. To enable the functionality associated with a particular
compiler define, simply add it to the list of defines under the preprocessor
settings, as above.
- You must also be sure to have any ``.dll'' files required for your LP
solver to be in your search path. Either move the required .dll to the
directory containing symphony.exe or add the path to the ``PATH''
Windows environment variable.
- Once you have the proper settings for your LP solver, choose "Build
symphony.exe" from the ``Build'' menu. This should successfully build the
executable.
- To test the executable, right click on the symphony project, go to the
``Debug'' tab and set the Program arguments to ``-F
SYMPHONY-3.0.1sample.vrp -N 5 -u 522.'' Note that command-line
switches are Unix-style. The argument to -N is the number of routes that
should be used in the solution and the -u argument supplies the solver with an
initial upper bound.
- Now choose ``Execute'' from the ``Build'' menu and the solver should
solve the sample VRP file.
- Note that there is some functionality missing from the Windows
version. Most prominently, the timing functions do not work. I suppose this
functionality should be easy to add. In addition, the Windows
version will only run in sequential mode for a variety of reasons. However, it
should be relatively easy to get it running in parallel if you can get PVM
working under Windows.
Next: Developing a New Application
Up: Quick Start Guide
Previous: Compiling the Distributed Version.
Ted Ralphs
2003-05-29