source: stable/2.9/INSTALL @ 2274

Last change on this file since 2274 was 2274, checked in by tkr, 2 years ago

Merging r2273 from trunk

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