source: releases/2.7.6/INSTALL @ 1995

Last change on this file since 1995 was 1693, checked in by tkr, 8 years ago

Merging r1692 from trunk

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 5.5 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.0.0 you type
40
41   gunzip Cbc-2.0.0.tgz
42   tar xvf Cbc-2.0.0.tar
43
44   More detailed download instructions can be found at
45
46**********************************************************************
47***                        CONFIGURATION                           ***
48**********************************************************************
49
50Go into the directory that you just downloaded or extracted (e.g., Cbc-2.7.0).
51Then create a build directory and configure the package by typing
52
53   mkdir build
54   cd build
55   ../configure
56
57Note that you might have to specify additional options, in case you
58don't want to use the default choices that configure makes (e.g.,
59compilers).  Please visit
60
61   https://projects.coin-or.org/BuildTools/
62
63and the Cbc Trac page
64
65   https://projects.coin-or.org/Cbc
66
67for more information.
68
69If everything went fine, you will see at the end of the output
70
71   "Main configuration of Cbc successful"
72
73**********************************************************************
74***                COMPILATION AND INSTALLATION                    ***
75**********************************************************************
76
77In the directory where you ran the configure script:
78
791. Compile the code by typing
80
81   make
82
832. To test if the code works, you can type
84
85   make test
86
873. To install the code, you type
88
89   make install
90
91   After this, you will find the executables, libraries and header
92   files in the "bin", "lib" and "include" subdirectory, respectively.
93
94More information on the compilation and installation can be found at
95
96   https://projects.coin-or.org/BuildTools/wiki/user-compile
97
98**********************************************************************
99***                     USING CBC                                  ***
100**********************************************************************
101
102After installing Cbc, you will have an executable named "cbc" (Unix-like
103environments) or "cbc.exe" (Windows). We will call it "cbc" from here on.
104
105The executable "cbc" takes various options. First, run the program in
106interactive mode by typing just "cbc" on the command line with no arguments.
107You will see the prompt
108
109CoinSolver takes input from arguments ( - switches to stdin)
110Enter ? for list of commands or help
111Coin:
112
113Type ? to get some idea of what you can do. The executable can also be run in
114batch mode. To simply solve a given instance with default parameter settings, type
115
116cbc <file>
117
118By typing a sequence of interactive commands on the command line
119with each command preceded by a "-", you can run set parameters and chane other options. For example, typing
120
121cbc <file> -cuts root -solve
122
123will import file and solve the problem, generating cuts only at the root node.
124On Linux, the cbc interactive solver can do file completion and line editing
125if built from source with that option enabled.
126
127With the installed libraries, you can also link your own code with the
128installed libraries. You can find examples in the
129
130   Cbc/examples/
131
132To build these examples, go into the directory build/Cbc/examples and type
133
134   make sample1
135
136to build the executable corresponding to sample1.cpp. The two simplest samples
137are:
138
139sample.cpp  This is a simple program to read an mps file.and solve the
140                integer problem.
141
142sample2.cpp.  This is the benchmark driver for the competition.  It overrides
143                the default branching methods and adds a (mildly useless)
144                heuristic.  It is intended to show you how to add your
145                own methods.  See CbcCompareUser.hpp for how to modify
146                choice of node from tree.  See CbcBranchUser.?pp for
147                how to modify which variable is chosen at a node.  For
148                more complex stuff such as new types of branches see
149                CbcBranchBase and CbcBranchActual in directory Cbc.
150                To see how to add heuristics see CbcHeuristicUser.?pp.
151
152                To add cut generators - define them as in Cgl and then just
153                add them as in sample2.cpp
154
155                The script "runtimes" in Samples directory will
156                run some or all of test set.  The version checked in
157                does some - just take off # to run.  An optional time
158                in minutes can be passed.
159
Note: See TracBrowser for help on using the repository browser.