-
Notifications
You must be signed in to change notification settings - Fork 27
/
INSTALL
148 lines (102 loc) · 5.08 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
###############################################################
# #
# Couenne #
# #
# (Convex Over and Under ENvelopes for Nonlinear Estimation) #
# #
###############################################################
### Downloading Couenne ######################################
Couenne is found in the COIN-OR repository. It can be downloaded with
Subversion (http://subversion.tigris.org). Run the following command
(if you are reading this file, you probably have Couenne already and
don't need to):
$ svn co https://projects.coin-or.org/svn/Couenne/trunk Couenne
This creates a directory Couenne/ and downloads most of the necessary
source files that are needed for building Couenne.
### Obtaining Third Party code ###############################
Couenne also requires that some third party packages, i.e. software
that is not found on the COIN-OR repository, be downloaded and
installed by the user (unless they are already on his/her
machine). These are ASL, Blas, Lapack, and one of the two packages
HSL or MUMPS. For the first three, simply move to the corresponding
directory and run the get.XYZ script file. For instance, ASL can be
downloaded as follows:
$ cd ThirdParty/ASL
$ ./get.ASL
$ cd ../..
and similarly for Blas and Lapack. To download HSL, see the
instructions in ThirdParty/HSL/INSTALL.HSL to obtain two files that
are necessary to Ipopt.
### Building Couenne #########################################
To build Couenne, you may just run the commands "configure" and "make".
However, it is usually desirable to have several builds in separate
sub-directories. To do so, create a subdirectory and run configure
and make from there:
$ mkdir build
$ cd build
$ ../configure -C
$ make
The libraries and executables will by default be installed in
subdirectories of the directory where you have run the configure/make
scripts. However, by properly setting the configure option --prefix,
you can install Couenne in a different directory:
$ ../configure --prefix=/usr/local
This installs executables in /usr/local/bin and libraries in
/usr/local/lib. You may have to run the "make install" command
as a super user.
### Testing ####################################################
There are a few built-in tests to check whether Couenne is installed
properly and that it solves certain MINLPs correctly. Before running
"make install", you may run
$ make unitTest
to test most features of Couenne (reliability branching, bound
tightening, etc). The test may take a few minutes as several MINLP
problems are solved in the process, each resulting in a short output
line:
$ make unitTest
Testing couenne.opt.vt
Global Optimum Test on circle.nl OK
Global Optimum Test on cube.nl OK
...
Global Optimum Test on qquad.nl OK
Global Optimum Test on sin.nl OK
Global Optimum Test on small2.nl OK
Global Optimum Test on toy.nl OK
$
If all these tests return OK, congratulations! You have set up Couenne
correctly. It is now safe to install Couenne.
### Installing and using Couenne ###############################
Simply run
$ make install
to install header files, libraries, and executables as specified by
the --prefix option given at the configure command. For instance, if
option "--prefix=/usr/local/" was given, now the couenne executable is
found in /usr/local/bin/couenne and you may invoke it simply by
$ couenne stub.nl
(assuming /usr/local/bin is included in your $PATH environent
variable). If no such option was used, the executable of Couenne is
found in the bin/ directory. In this case, simply run
$ bin/couenne stub.nl
Where stub.nl is a nonlinear programming problem file created with
AMPL. Stub files can be generated from AMPL as follows: consider a
model file xyz.mod and a data file xyz.dat. Run the following AMPL
commands:
$ ampl
ampl: model xyz.mod
ampl: data xyz.dat
ampl: write gxyz;
ampl: quit;
This will create a stub file xyz.nl that can be fed to Couenne (notice
the "g" after the "write" keyword).
Couenne can be fine-tuned by setting parameters in the option file couenne.opt,
which is read from the same directory where Couenne is launched. A typical
couenne.opt is provided in Couenne/src/, with some explanation on how to use
its parameters. You may copy it to your directory and change some of the parameters,
however those set by default are usually best on most of the instances we have tried.
### Documentation ##############################################
Doxygen documentation can be generated by running
$ make doxydoc
from the same build/ directory where you ran configure, make, and make
install. Documentation in both html and LaTeX format can be found in
the Doc/ subdirectory. Fire up your browser and take a look at
Doc/html/index.html for documentation of Couenne.