source: stable/2.7/INSTALL @ 1691

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

Mergin r1690 from trunk

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