source: releases/2.9.3/INSTALL

Last change on this file was 1750, checked in by tkr, 7 years ago

Attempt to fix AMPL interface

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 5.4 KB
Line 
1These are quick install instructions mainly intended for UNIX-like systems
2(including Linux, OS X, AIX, Cygwin and MSys). Additional details for building
3this and other COIN projects are available at
4
5  https://projects.coin-or.org/BuildTools
6
7You can find instructions for building with Microsoft Visual Studio under
8Windows at
9
10  https://projects.coin-or.org/MSVisualStudio
11
12**********************************************************************
13***                         DOWNLOAD                               ***
14**********************************************************************
15
16Pre-built binaries are available for some versions of Cbc on some platforms.
17They can be downloaded at
18
19  http://www.coin-or.org/download/binary/Cbc
20
21If you would like to build from source, you can obtain the source code for the
22Cbc package in two ways:
23
241. Obtain the source directly from the COIN-OR subversion repository
25   (recommended). For this you needs the program 'svn' installed on your
26   machine, and output of "svn --version" must contain "handles 'https'
27   scheme". On Windows, it is recommended to get the source with the SVN
28   client TortoiseSVN (http://tortoisesvn.net).
29
30   Assuming that you want to download a release version 2.7.0, as an example,
31   you would execute the command
32
33   svn co https://projects.coin-or.org/svn/Cbc/releases/2.7.0 Cbc-2.7.0
34
35   You can similarly get source for the latest stable version or the trunk
36   (development) version.
37
382. Download the tarball from http://www.coin-or.org/download/source/Cbc
39   and extract it. For example, for the release 2.7.0 you type
40
41   gunzip Cbc-2.7.0.tgz
42   tar xvf Cbc-2.7.0.tar
43
44**********************************************************************
45***                        CONFIGURATION                           ***
46**********************************************************************
47
48Go into the directory that you just downloaded or extracted (e.g., Cbc-2.7.0).
49Then create a build directory and configure the package by typing
50
51   mkdir build
52   cd build
53   ../configure
54
55Note that you might have to specify additional options, in case you
56don't want to use the default choices that configure makes (e.g.,
57compilers).  Please visit
58
59   https://projects.coin-or.org/BuildTools/
60
61and the Cbc Trac page
62
63   https://projects.coin-or.org/Cbc
64
65for more information.
66
67If everything went fine, you will see at the end of the output
68
69   "Main configuration of Cbc successful"
70
71**********************************************************************
72***                COMPILATION AND INSTALLATION                    ***
73**********************************************************************
74
75In the directory where you ran the configure script:
76
771. Compile the code by typing
78
79   make
80
812. To test if the code works, you can type
82
83   make test
84
853. To install the code, you type
86
87   make install
88
89   After this, you will find the executables, libraries and header
90   files in the "bin", "lib" and "include" subdirectory, respectively.
91
92More information on the compilation and installation can be found at
93
94   https://projects.coin-or.org/BuildTools/
95
96**********************************************************************
97***                     USING CBC                                  ***
98**********************************************************************
99
100After installing Cbc, you will have an executable named "cbc" (Unix-like
101environments) or "cbc.exe" (Windows). We will call it "cbc" from here on.
102
103The executable "cbc" takes various options. First, run the program in
104interactive mode by typing just "cbc" on the command line with no arguments.
105You will see the prompt
106
107CoinSolver takes input from arguments ( - switches to stdin)
108Enter ? for list of commands or help
109Coin:
110
111Type ? to get some idea of what you can do. The executable can also be run in
112batch mode. To simply solve a given instance with default parameter settings, type
113
114cbc <file>
115
116By typing a sequence of interactive commands on the command line
117with each command preceded by a "-", you can run set parameters and chane other options. For example, typing
118
119cbc <file> -cuts root -solve
120
121will import file and solve the problem, generating cuts only at the root node.
122On Linux, the cbc interactive solver can do file completion and line editing
123if built from source with that option enabled.
124
125With the installed libraries, you can also link your own code with the
126installed libraries. You can find examples in the
127
128   Cbc/examples/
129
130To build these examples, go into the directory build/Cbc/examples and type
131
132   make sample1
133
134to build the executable corresponding to sample1.cpp. The two simplest samples
135are:
136
137sample.cpp  This is a simple program to read an mps file.and solve the
138                integer problem.
139
140sample2.cpp.  This is the benchmark driver for the competition.  It overrides
141                the default branching methods and adds a (mildly useless)
142                heuristic.  It is intended to show you how to add your
143                own methods.  See CbcCompareUser.hpp for how to modify
144                choice of node from tree.  See CbcBranchUser.?pp for
145                how to modify which variable is chosen at a node.  For
146                more complex stuff such as new types of branches see
147                CbcBranchBase and CbcBranchActual in directory Cbc.
148                To see how to add heuristics see CbcHeuristicUser.?pp.
149
150                To add cut generators - define them as in Cgl and then just
151                add them as in sample2.cpp
152
153                The script "runtimes" in Samples directory will
154                run some or all of test set.  The version checked in
155                does some - just take off # to run.  An optional time
156                in minutes can be passed.
157
Note: See TracBrowser for help on using the repository browser.