# source:stable/5.3/SYMPHONY/Doc/man-API.tex@1915

Last change on this file since 1915 was 1915, checked in by tkr, 3 years ago

Updating externals

• Property svn:eol-style set to native
• Property svn:keywords set to Author Date Id Revision
File size: 26.4 KB
Line
1%===========================================================================%
2%                                                                           %
3% This file is part of the documentation for the SYMPHONY MILP Solver.      %
4%                                                                           %
5% SYMPHONY was jointly developed by Ted Ralphs (ted@lehigh.edu) and         %
6% Laci Ladanyi (ladanyi@us.ibm.com).                                        %
7%                                                                           %
8% (c) Copyright 2000-2011 Ted Ralphs. All Rights Reserved.                  %
9%                                                                           %
10% SYMPHONY is licensed under the Common Public License. Please see          %
11% accompanying file for terms.                                              %
12%                                                                           %
13%===========================================================================%
14
15\section{Using SYMPHONY Interactively}
16
17\subsection{Unix-like Environments}
18
19If you are planning to use the interactive optimizer in a Unix-like
20environment and you are building SYMPHONY from source, it is recommended that
21you run the configuration script (see Section \ref{configuring}) with the
22command-line argument that enables GNU packages, i.e.,
23{\color{Brown}
24\begin{verbatim}
25 ./configure --enable-gnu-packages
26\end{verbatim}
27} This will allow the interactive shell to behave exactly like a Linux
28terminal command line, i.e., it will keep the history of the used commands,
29will do command completion, etc. Note that you must have the required packages
30(\code{readline} and \code{history}) installed.
31
32To use SYMPHONY's interactive shell, run the executable without any
33command line arguments, i.e., type
34{\color{Brown}
35\begin{verbatim}
36 bin/symphony
37\end{verbatim}
38} You will enter a command shell environment where you will be prompted for
39inputs. The user interface consists of a \emph{main menu}, where an instance
40is read in and solved, a \emph{set menu}, where parameters are set, and a
41\emph{display menu}, where results, statistics and parameter values are
42displayed.
43
44\subsection{Microsoft Windows}
45
46To invoke SYMPHONY's interactive solver in an Microsoft Windows environment,
47simply double-click on the \code{symphony.exe} file in Windows Explorer. This
48should open a terminal window in which the solver will run. Note that if you
49built SYMPHONY in CYGWIN without the option \code{--enable-dos-compile}, then
50you will have to have the CYGWIN DLL in your path in order for the executable
51to run.
52
53\subsection{Main Menu}
54
55Below is the main menu displayed at the beginning of a new session:
56
57{\color{Brown}
58\begin{verbatim}
59 *******************************************************
60 *   This is SYMPHONY Version 5.3.4                    *
61 *   Copyright 2000-2010 Ted Ralphs                    *
62 *   All Rights Reserved.                              *
63 *   Distributed under the Common Public License 1.0   *
64 *******************************************************
65
66 ***** WELCOME TO SYMPHONY INTERACTIVE MIP SOLVER ******
67
68 Please type 'help'/'?' to see the main commands!
69
70 SYMPHONY:
71\end{verbatim}
72}
73When you type \code{help} or \code{?}, a list of main commands is displayed:
74{\color{Brown}
75\begin{verbatim}
76 SYMPHONY: help
77
78 List of main commands:
79
80 load      : read a problem in mps or ampl format
81 solve     : solve the problem
82 lpsolve   : solve the lp relaxation of the problem
83 set       : set a parameter
84 display   : display optimization results and stats
85 reset     : restart the optimizer
86 help      : show the available commands/params/options
87
88 quit/exit : leave the optimizer
89
90 SYMPHONY:
91\end{verbatim}
92}
93Following is an illustration of a session to read in a sample instance:
94{\color{Brown}
95\begin{verbatim}
96 SYMPHONY: load
97 Name of the file: sample.mps
98 Coin0001I At line 1 NAME SAMPLE
99 Coin0001I At line 2 ROWS
100 Coin0001I At line 6 COLUMNS
101 Coin0001I At line 25 RHS
102 Coin0001I At line 28 BOUNDS
103 Coin0001I At line 34 ENDATA
104 Coin0002I Problem SAMPLE has 2 rows, 6 columns and 10 elements
105 SYMPHONY:
106\end{verbatim}
107}
108The format of the input file is recognized from the file extension. If there is
109none, you will be prompted to define the input format:
110{\color{Brown}
111\begin{verbatim}
112 SYMPHONY: load
113 Name of the file: sample
114 Type of the file ('mps'/'ampl'/'gmpl'): mps
115 Coin0001I At line 1 NAME SAMPLE
116 Coin0001I At line 2 ROWS
117 Coin0001I At line 6 COLUMNS
118 Coin0001I At line 25 RHS
119 Coin0001I At line 28 BOUNDS
120 Coin0001I At line 34 ENDATA
121 Coin0002I Problem SAMPLE has 2 rows, 6 columns and 10 elements
122 SYMPHONY:
123\end{verbatim}
124}
125If the input is in AMPL/GMPL format, you will also be prompted to read in a
126data file (note again that in order to enable GMPL/AMPL reader, you have to
127install GLPK---see Section
128\ref{building})):
129{\color{Brown}
130\begin{verbatim}
131 SYMPHONY: load
132 Name of the file: sample.mod
133 Name of the data file: sample.dat
134 Reading model section from sample.mod...
135 32 lines were read
136 Reading data section from sample.dat...
137 68 lines were read
138 Generating nb...
139 Generating cost...
140 Model has been successfully generated
141 SYMPHONY:
142\end{verbatim}
143}
144After loading the instance, type \code{solve} to solve the
145corresponding integer program or \code{lpsolve} to solve its linear
146relaxation:
147{\color{Brown}
148\begin{verbatim}
149 SYMPHONY: solve
150
151 ****** Found Better Feasible Solution !
152 ****** Cost: -40.000000
153
154
155 ****************************************************
156 * Optimal Solution Found                           *
157 ****************************************************
158
159 SYMPHONY: lpsolve
160
161 ****** Found Better Feasible Solution !
162 ****** Cost: -43.000000
163
164
165 ****************************************************
166 * Optimal Solution Found                           *
167 ****************************************************
168
169 SYMPHONY:
170\end{verbatim}
171}
172As above, only the objective values of the feasible solutions found so far and
173the termination code of the solution process will be displayed (see Section
174\ref{set_menu} for displaying more output).
175
176\subsection{Set Menu}\label{set_menu}
177The \code{Set} submenu is used to set SYMPHONY's run-time parameters. To enter
178this submenu, type \code{set}: {\color{Brown}
179\begin{verbatim}
180SYMPHONY: set
181Please type 'help'/'?' to see the list of parameters!
182SYMPHONY\Set:
183\end{verbatim}
184}
185You can override the default value of a parameter by typing the name of
186the parameter. You will then be prompted
187to enter the new value of that parameter. For instance, in order to
188display more outputs during the solution process, you need to set the
189\code{verbosity} parameter (set to -1 by default for the interactive shell
190routines) to a nonnegative integer:
191{\color{Brown}
192\begin{verbatim}
193SYMPHONY\Set: verbosity
194Value of the parameter: 3
195Setting verbosity to: 3
196SYMPHONY\Set:
197\end{verbatim}
198}
199A confirmation message will also be displayed. Note that typing \code{help}
200or \code{?} displays only a subset of the most commonly used run-time
201parameters. However, you are allowed to set any of the parameters given in
202Section \ref{params}. Additionally, you can set the values of parameters using
203a parameter file as an input. In such a file, the new value of each parameter
204must follow the name of that parameter. For instance, suppose that the
205\code{my\_param} file consists of the following lines:
206\begin{verbatim}
207 verbosity 3
208 node_selection_rule 3
209 time_limit 100
210\end{verbatim}
211Then, type \code{param\_file} to be prompted to read in the parameter file:
212{\color{Brown}
213\begin{verbatim}
214 SYMPHONY\Set: param_file
215 Name of the parameter file: my_param
216 Setting verbosity to: 3
217 Setting node_selection_rule to: 3
218 Setting time_limit to: 100
219 SYMPHONY\Set:
220\end{verbatim}
221}
222At this point, you can return to the main menu by typing \code{back}
223load an instance and solve it with updated run-time parameters.
224
225\subsection{Display Menu}
226
227The \code{Display} submenu is used to print out results and statistics of the
228solution process after a \code{solve} call. To enter this submenu and see
229available options, type \code{display} and then \code{help} or \code{?}:
230{\color{Brown}
231\begin{verbatim}
232 SYMPHONY: display
233 Please type 'help'/'?' to see the display options!
234 SYMPHONY\Display: help
235
236 List of display options:
237
238 solution     : display the column values
239 obj          : display the objective value
240 stats        : display the statistics
241 parameter    : display the value of a parameter
242
243 back         : leave this menu
244 quit/exit    : leave the optimizer
245
246 SYMPHONY\Display:
247\end{verbatim}
248}
249Clearly, in order to display column solutions and the optimal solution value,
250you need to type \code{solution} and then \code{obj}:
251{\color{Brown}
252\begin{verbatim}
253 SYMPHONY\Display: solution
254 Optimal Solution found!
255 +++++++++++++++++++++++++++++++++++++++++++++++
256 Nonzero column names and values in the solution
257 +++++++++++++++++++++++++++++++++++++++++++++++
258 COL00002      3.000
259 COL00006      1.000
260
261 SYMPHONY\Display: obj
262 Objective Value: -40.000000
263 SYMPHONY\Display:
264\end{verbatim}
265}
266You can also display the values of SYMPHONY's run-time parameters (see Section
267\ref{params}) by moving into \code{parameters} submenu:
268{\color{Brown}
269\begin{verbatim}
270 SYMPHONY\Display: parameter
271 Please type 'help'/'?' to see the list of available parameters!
272 SYMPHONY\Display\Parameter:
273\end{verbatim}
274}
275For instance, in order to display the verbosity level, type \code{verbosity}:
276{\color{Brown}
277\begin{verbatim}
278 SYMPHONY\Display\Parameter: verbosity
279 The value of verbosity: 3
280 SYMPHONY\Display\Parameter:
281\end{verbatim}
282}
283As in Set submenu, typing \code{help} or \code{?} will display only a subset of
284available run-time parameters. However, you are allowed to display the value of
285any of the parameters given in Section \ref{params}.
286
287\subsection{Sub Menu Browsing}
288
289SYMPHONY's interactive optimizer also allows the user to reach the lower
290level menu commands from the higher level menus. In other words, the user
291has the flexibility to use submenu commands without entering the
292corresponding submenu. As an instance, all three of the following sessions
293have the same result:
294{\color{Brown}
295\begin{itemize}
296\item
297  \begin{verbatim}
298    SYMPHONY: display parameter verbosity
299  \end{verbatim}
300\item
301  \begin{verbatim}
302    SYMPHONY: display
303    Please type 'help'/'?' to see the display options!
304    SYMPHONY\Display: parameter verbosity
305  \end{verbatim}
306\item
307  \begin{verbatim}
308    SYMPHONY: display
309    Please type 'help'/'?' to see the display options!
310    SYMPHONY\Display: parameter
311    Please type 'help'/'?' to see the list of available parameters!
312    SYMPHONY\Display\Parameter: verbosity
313  \end{verbatim}
314\end{itemize}
315}
316This flexibility is also enabled for the \code{load} command and the Set
317submenu. The followings are all valid commands:
318{\color{Brown}
319  \begin{verbatim}
320    SYMPHONY: load sample.mps
321  \end{verbatim}
322  \begin{verbatim}
323    SYMPHONY: load sample.mod sample.dat
324  \end{verbatim}
325  \begin{verbatim}
326    SYMPHONY: set
327    SYMPHONY\Set: verbosity 3
328  \end{verbatim}
329  \begin{verbatim}
330    SYMPHONY: set verbosity 3
331    SYMPHONY: set param_file my_param
332  \end{verbatim}
333}
334
335\section{Using SYMPHONY from the Command Line}
336
337For batch processing and scripting, SYMPHONY can also be called from the
338command line from a terminal in any operating system (note that in the Windows
339terminal, the path separator is \code{\bs} rather than \code{/}).
340When called from the command line, a number of command-line switches can be
341invoked to specify the file to be read and solved, as well as set parameters.
342Note that the switches are Unix-style, even in Windows). At a minimum, one must
343specify the name of the file to be read and solved. The following is the
344calling sequence to load in an instance file in MPS format and
345solve it.
346{\color{Brown}
347\begin{verbatim}
348 ./symphony -F sample.mps
349\end{verbatim}
350}
351To read and solve a model in LP format, the command would be
352{\color{Brown}
353\begin{verbatim}
354 ./symphony -L sample.lp
355\end{verbatim}
356}
357To read and solve a GMPL model and associated data file, the command would be
358{\color{Brown}
359\begin{verbatim}
360 ./symphony -F sample.mod -D sample.dat
361\end{verbatim}
362}
363In addition to specifying the name of the instance file, most of the common
364parameters can also be set on the command line by adding various switches.
365Calling \BB\ with just the argument \code{-h} will list all the options. To
366set parameters that cannot be set on the command line or to save parameter
367setting, it is possible to use a parameter file in which a group of parameters
368can be set. To invoke \BB\ with a parameter file, type \code{./symphony -f
369filename}, where \code{filename} is the name of the parameter file. The format
370of the file and a list of all parameters is given in Section
371\ref{parameter_file}.
372
373The output level can be controlled through the use of the verbosity parameter,
374which can be invoked Setting this parameter at different levels will cause
375different progress messages to be printed out. Level 0 only prints out the
376introductory and solution summary messages, along with status messages every
37710 minutes. Level 1 prints out a message every time a new node is created.
378Level 3 prints out messages describing each iteration of the solution process.
379Levels beyond 3 print out even more detailed information. To get no output at
380all, the verbosity level must be set to -2.
381
382%There are also two possible graphical interfaces. For graph-based
383%problems, the Interactive Graph Drawing Software allows visual display
384%of fractional solutions, as well as feasible and optimal solutions
385%discovered during the solution process. For all types of problems,
386%VBCTOOL creates a visual picture of the branch and cut tree, either
387%in real time as the solution process evolves or as an emulation from a
388%file created by
389%\BB. See Section \ref{tm_params} for information on how to use VBCTOOL
390%with SYMPHONY. Binaries for VBCTOOL can be obtained at \\
391%{\tt \htmladdnormallink
392%{http://www.informatik.uni-koeln.de/ls\_juenger/projects/vbctool.html}
393%{http://www.informatik.uni-koeln.de/ls\_juenger/projects/vbctool.html}}.
394
395\section{Using the Callable Library}\label{callable_library}
396
397SYMPHONY's callable library consists of a complete set of subroutines for
398loading and modifying problem data, setting parameters, and invoking solution
399algorithms. The user invokes these subroutines through the API specified in
400the header file \code{symphony\_api.h}. Some of the basic commands are
401described below. For the sake of brevity, the arguments have been left out.
402
403\subsection{The C API}
404
405\paragraph{\ptt{sym\_open\_environment()}} Opens a new environment, and
406returns a pointer to it. This pointer then has to be passed as an argument to
407all other API subroutines (in the C++ interface, this pointer is maintained
408for the user).
409
410\paragraph{\ptt{sym\_parse\_command\_line()}} Invokes the built-in
411parser for setting commonly used parameters, such as the file name which to
412read the problem data, via command-line switches. A call to this subroutine
413instructs SYMPHONY to parse the command line and set the appropriate
414parameters. This subroutine also sets all other parameter values to their
415defaults, so it should only called when this is desired.
416
417\paragraph{\ptt{sym\_load\_problem()}} Reads the problem data and sets up
418the root subproblem. This includes specifying which cuts and variables are in
419the \emph{core} (those that are initially present in every subproblem during
420the search process) and the additional cuts and variables to be initially
421active in the root subproblem. By default, SYMPHONY reads an MPS or GMPL
422file specified by the user, but the user can override this default by
423implementing a user callback that reads the data from a file in a customized
424format (see Section \ref{callback}).
425
426\paragraph{\ptt{sym\_find\_initial\_bounds()}} Invokes the user callback to
427find initial bounds using a custom heuristic.
428
429\paragraph{\ptt{sym\_solve()}} Solves the currently loaded problem from
430scratch. This method is described in more detail in Section
431\ref{initial_solve}.
432
433\paragraph{\ptt{sym\_warm\_solve()}} Solves the currently loaded problem
434from a warm start. This method is described in more detail in
435Section \ref{warm_solve}.\\
436
437\paragraph{\ptt{sym\_mc\_solve()}} Solves the currently loaded problem as a
438multicriteria problem. This method is described in more detail in Section
439\ref{mc_solve}.
440
441\paragraph{\ptt{sym\_close\_environment()}} Frees all problem data and
442deletes the environment. \\
443
444\noindent As an example of the use of the library functions, Figure
445\ref{default_main} shows the code for implementing a generic MILP solver with
446default parameter settings.
447\begin{figure}[tb]
448%\centering
449{\color{Brown}
450\begin{Verbatim}[frame=lines]
451int main(int argc, char **argv)
452{
453   sym_environment *env = sym_open_environment();
454   sym_parse_command_line(env, argc, argv);
455   sym_load_problem(env);
456   sym_solve(env);
457   sym_close_environment(env);
458}
459\end{Verbatim}
460}
461\caption{Implementation of a generic MILP solver with the SYMPHONY
462C callable library. \label{default_main}}
463\end{figure}
464To read in an MPS file called \code{sample.mps} and solve it using
465this program, the following command would be issued: \\
466{\color{Brown}
467\begin{verbatim}
468 ./symphony -F sample.mps
469\end{verbatim}
470}
471To read and solve a model in LP format, the command would be
472{\color{Brown}
473\begin{verbatim}
474 ./symphony -L sample.lp
475\end{verbatim}
476}
477The user does not have to invoke a command to read the input file. During the
478call to \ptt{sym\_parse\_} \ptt{command\_line()}, SYMPHONY determines that the
479user wants to read in an MPS file. During the subsequent call to
480\ptt{sym\_load\_problem()}, the file is read and the problem data stored.
481To read an GMPL file, the user would issue the command
482{\color{Brown}
483\begin{verbatim}
484 ./symphony -F sample.mod -D sample.dat
485\end{verbatim}
486}
487Although the same command-line switch is used to specify the model file, the
488additional presence of the \code{-D} option indicates to SYMPHONY that the
489model file is in GMPL format and GLPK's GMPL parser is invoked
490\cite{GLPK}. Note that the interface and the code of Figure \ref{default_main}
491is the same for both sequential and parallel computations. The choice between
492sequential and parallel execution modes is made at compile-time through
493modification of the makefile or the project settings, depending on the
494operating system.
495
496To start the solution process from a warm start, the \ptt{sym\_warm\_solve()}
497command is used. SYMPHONY automatically records the warm start information
498resulting from the last solve call and restarts from that checkpoint if a call
499to \ptt{sym\_warm\_solve()} is made. Alternatively, external warm start
500information can be loaded manually. Figure \ref{dynamic} illustrates the use
501of the re-solve capability by showing the code for implementing a solver that
502changes from depth first search to best first search after the first feasible
503solution is found.
504\begin{figure}[tb]
505%\centering
506{\color{Brown}
507\begin{Verbatim}[frame=lines]
508int main(int argc, char **argv)
509{
510   sym_environment *env = sym_open_environment();
511   sym_parse_command_line(env, argc, argv);
512   sym_load_problem(env);
513   sym_set_int_param(env, "find_first_feasible", TRUE);
514   sym_set_int_param(env, "node_selection_strategy", DEPTH_FIRST_SEARCH);
515   sym_solve(env);
516   sym_set_int_param(env, "find_first_feasible", FALSE);
517   sym_set_int_param(env, "node_selection_strategy", BEST_FIRST_SEARCH);
518   sym_warm_solve(env);
519}
520\end{Verbatim}
521}
522\caption{Implementation of a dynamic MILP solver with SYMPHONY.
523\label{dynamic}}
524\end{figure}
525The user can also modify problem data in between calls to the solver. Code for
526doing so is shown in Figure \ref{warm_start}. In this example, the
527solver is allowed to process 100 nodes and then save the warm start
528information. Afterward, the original problem is solved to optimality, then is
529modified and re-solved from the saved checkpoint.
530\begin{figure}[tb]
531%\centering
532{\color{Brown}
533\begin{Verbatim}[frame=lines]
534int main(int argc, char **argv)
535{
536   warm_start_desc *ws;
537   sym_environment *env = sym_open_environment();
538   sym_parse_command_line(env, argc, argv);
539   sym_load_problem(env);
540   sym_set_int_param(env, "node_limit", 100);
541   sym_set_int_param(env, "keep_warm_start", TRUE);
542   sym_solve(env);
543   ws = sym_get_warm_start(env);
544   sym_set_int_param(env, "node_limit", -1);
545   sym_warm_solve(env);
546   sym_set_obj_coeff(env, 0, 100);
547   sym_set_obj_coeff(env, 200, 150);
548   sym_set_warm_start(ws);
549   sym_warm_solve(env);
550}
551\end{Verbatim}
552}
553\caption{Use of SYMPHONY's warm start capability. \label{warm_start}}
554\end{figure}
555
556Finally, SYMPHONY now also has a bicriteria solve call. The applications of
557such a solver are numerous. Besides yielding the ability to closely examine
558the tradeoffs between competing objectives, the method can be used to perform
559detailed sensitivity analysis in a manner analogous to that which can be done
560with simplex based solvers for linear programs. As an example, suppose we
561would like to know exactly how the optimal objective function value for a
562given pure integer program depends on the value of a given objective function
563coefficient. Consider increasing the objective function
564coefficient of variable $i$ from its current value. Taking the first objective
565function to be the original one and taking the second objective function to be
566the $i^\textrm{th}$ unit vector, we can derive the desired sensitivity
567function by using the bicriteria solution algorithm to enumerate all supported
568solutions and breakpoints. This information can easily be used to obtain the
569desired function. Figure \ref{multi_criteria} shows the code for performing
570this analysis on variable 0.
571\begin{figure}[tb]
572%\centering
573{\color{Brown}
574\begin{Verbatim}[frame=lines]
575int main(int argc, char **argv)
576{
577   sym_environment *env = sym_open_environment();
578   sym_parse_command_line(env, argc, argv);
579   sym_load_problem(env);
580   sym_set_obj2_coeff(env, 0, 1);
581   sym_mc_solve(env);
582}
583\end{Verbatim}
584}
585\caption{Performing sensitivity analysis with SYMPHONY's bicriteria solver.
586\label{multi_criteria}}
587\end{figure}
588
589In addition to the parts of the API we have just described, there are a number
590of standard subroutines for accessing and modifying problem data and
591parameters. These can be used between calls to the solver to change the
592behavior of the algorithm or to modify the instance being solved. These
593modifications are discussed in more detail in Section \ref{warm_solve}.
594
595\subsection{The C++ API}\label{OSI}
596
597The Open Solver Interface (OSI) is a C++ class that provides a standard API
598for accessing a variety of solvers for mathematical programs. It is provided
599as part of the COIN-OR repository \cite{coin-or}, along with a collection of
600solver-specific derived classes that translate OSI call into calls to the
601underlying libraries of the solvers. A code implemented using calls to the
602methods in the OSI base class can easily be linked with any solver for which
603there is an OSI interface. This allows development of solver-independent codes
604and eliminates many portability issues. The current incarnation of OSI
605supports only solvers for linear and mixed-integer linear programs, although a
606new version supporting a wider variety of solvers is currently under
607development.
608
609We have implemented an OSI interface for SYMPHONY \VER\ that allows any solver
610built with SYMPHONY to be accessed through the OSI, including customized
611solvers and those configured to run on parallel architectures. To ease code
612maintenance, for each method in the OSI base class, there is a corresponding
613method in the callable library. The OSI methods are implemented simply as
614wrapped calls to the SYMPHONY callable library. When an instance of the OSI
615interface class is constructed, a call is made to
616\ptt{sym\_open\_environment()} and a pointer to the environment is stored
617in the class. Most subsequent calls within the class can then be made without
618any arguments. When the OSI object is destroyed,
619\ptt{sym\_close\_environment} is called and the environment is destroyed.
620
621To fully support SYMPHONY's capabilities, we have extended the OSI interface to
622include some methods not in the base class. For example, we added calls
623equivalent to our \ptt{sym\_parse\_command\_line()} and
624\ptt{sym\_find\_initial\_bounds()}. Figure \ref{OSI_main} shows the
625program of Figure \ref{default_main} implemented using the OSI interface.
626\begin{figure}[tb]
627{\color{Brown}
628\begin{Verbatim}[frame=lines]
629int main(int argc, char **argv)
630{
631   OsiSymSolverInterface si;
632   si.parseCommandLine(argc, argv);
633   si.loadProblem();
634   si.branchAndBound();
635}
636\end{Verbatim}
637}
638\caption{Implementation of a generic MILP solver with the SYMPHONY
639OSI interface. \label{OSI_main}}
640\end{figure}
641Note that the code would be exactly the same for accessing any customized
642SYMPHONY solver, sequential or parallel.
643
644Although we are using the OSI to access a MILP solver, the current version of
645the OSI is geared primarily toward support of solvers for linear programming
646(LP) problems. This is because LP solvers employing some version of the
647simplex algorithm support much richer functionality and a wider range of
648interface functions, due to their support of warm starting from previously
649saved checkpoints. This functionality is difficult to provide for MILP
650solvers.  In SYMPHONY \VER, we have implemented for MILPs some of the same
651functionality that has long been available for LP solvers. As such, our OSI
652interface supports warm starting and sensitivity analysis. The implementations
653of this functionality is straightforward at the moment, but will be improved
654in future versions.
655
656\subsection{Linking to the Callable Library}
657
658To link your program to the callable library, make sure you have included the
659header file \code{symphony.h} in all the source files that call SYMPHONY
660functions. Also, make sure that your include path contains the directory where
661all of SYMPHONY's header files are stored. Then simply include the appropriate
662SYMPHONY library in the set of libraries to be linked and make sure that the
663path to the library is in the library path. Example makefiles For Unix-like
664environments are included in the \code{Examples/} directory.
665
666\section{Using the Callback Functions}\label{callback}
667
668The user's main avenues for customization of SYMPHONY are the tuning of
669parameters and the implementation of one or more of over 50 user callback
670functions. The callback functions allow the user to override SYMPHONY's
671default behavior for many of the functions performed as part of its algorithm.
672The user has complete control over branching, cutting plane generation,
673management of the cut pool and the LP relaxation, search and diving
674strategies, etc. More detailed information about using the callback functions
675to develop custom applications is provided in
676Chapter~\ref{SYMPHONY-development}.
677
Note: See TracBrowser for help on using the repository browser.