kpeter@3
|
1 |
/* -*- mode: C++; indent-tabs-mode: nil; -*-
|
kpeter@3
|
2 |
*
|
kpeter@3
|
3 |
* This file is a part of LEMON, a generic C++ optimization library.
|
kpeter@3
|
4 |
*
|
kpeter@3
|
5 |
* Copyright (C) 2003-2008
|
kpeter@3
|
6 |
* Egervary Jeno Kombinatorikus Optimalizalasi Kutatocsoport
|
kpeter@3
|
7 |
* (Egervary Research Group on Combinatorial Optimization, EGRES).
|
kpeter@3
|
8 |
*
|
kpeter@3
|
9 |
* Permission to use, modify and distribute this software is granted
|
kpeter@3
|
10 |
* provided that this copyright notice appears in all copies. For
|
kpeter@3
|
11 |
* precise terms see the accompanying LICENSE file.
|
kpeter@3
|
12 |
*
|
kpeter@3
|
13 |
* This software is provided "AS IS" with no warranty of any kind,
|
kpeter@3
|
14 |
* express or implied, and with no claim as to its suitability for any
|
kpeter@3
|
15 |
* purpose.
|
kpeter@3
|
16 |
*
|
kpeter@3
|
17 |
*/
|
kpeter@3
|
18 |
|
kpeter@3
|
19 |
/**
|
kpeter@3
|
20 |
\page getting_started How to Start Using LEMON
|
kpeter@3
|
21 |
|
kpeter@3
|
22 |
In this page we detail how to start using LEMON, from downloading it to
|
kpeter@3
|
23 |
your computer, through the steps of installation, to showing a simple
|
kpeter@3
|
24 |
"Hello World" type program that already uses LEMON. We assume that you
|
kpeter@3
|
25 |
have a basic knowledge of your operating system and C++ programming
|
kpeter@3
|
26 |
language. The procedure is pretty straightforward, but if you have any
|
kpeter@3
|
27 |
difficulties don't hesitate to
|
kpeter@3
|
28 |
<a href="mailto:lemon-user@lemon.cs.elte.hu"><b>ask</b></a>.
|
kpeter@3
|
29 |
|
kpeter@3
|
30 |
\section requirements_lemon Hardware and Software Requirements
|
kpeter@3
|
31 |
|
kpeter@3
|
32 |
In LEMON we use C++ templates heavily, thus compilation takes a
|
kpeter@3
|
33 |
considerable amount of time and memory. So some decent box would be
|
kpeter@3
|
34 |
advantageous. But otherwise there are no special hardware requirements.
|
kpeter@3
|
35 |
|
kpeter@3
|
36 |
You will need a recent C++ compiler. Our primary target is the GNU C++
|
kpeter@3
|
37 |
Compiler (g++), from version 3.3 upwards. We also checked the Intel C++
|
kpeter@3
|
38 |
Compiler (icc) and Microsoft Visual C++ .NET 2003, 2005.
|
kpeter@3
|
39 |
If you want to develop with LEMON under Windows you could consider
|
kpeter@3
|
40 |
using Cygwin.
|
kpeter@3
|
41 |
|
kpeter@3
|
42 |
In this description we will suppose a Linux environment and GNU C++ Compiler.
|
kpeter@3
|
43 |
|
kpeter@3
|
44 |
\subsection requirements_lp LP Solver Requirements
|
kpeter@3
|
45 |
|
kpeter@3
|
46 |
The LEMON LP solver interface can use the GLPK (GNU Linear Programming
|
kpeter@3
|
47 |
Kit), CPLEX (was tested with CPLEX 7.5) and SoPlex solver. If you want
|
kpeter@3
|
48 |
to use it you will need at least one of these. See \ref configure_flags
|
kpeter@3
|
49 |
how to enable these at compile time.
|
kpeter@3
|
50 |
|
kpeter@3
|
51 |
\section download_lemon How to Download LEMON
|
kpeter@3
|
52 |
|
kpeter@3
|
53 |
You can download LEMON from the LEMON web site:
|
kpeter@3
|
54 |
<a href="http://lemon.cs.elte.hu/">https://lemon.cs.elte.hu/</a>.
|
kpeter@3
|
55 |
There you will find released versions in form of <tt>.tar.gz</tt> files.
|
kpeter@3
|
56 |
If you want a developer version (for example you want to contribute in
|
kpeter@3
|
57 |
developing the library LEMON) then you might want to use our Mercurial
|
kpeter@3
|
58 |
repository. This case is detailed later, so from now on we suppose that
|
kpeter@3
|
59 |
you downloaded a <tt>.tar.gz</tt> file.
|
kpeter@3
|
60 |
|
kpeter@3
|
61 |
\section install_lemon How to Install LEMON
|
kpeter@3
|
62 |
|
kpeter@3
|
63 |
In order to install LEMON you have to do the following steps.
|
kpeter@3
|
64 |
|
kpeter@3
|
65 |
Download the tarball (named <tt>lemon-x.y.z.tar.gz</tt> where \c x, \c y
|
kpeter@3
|
66 |
and \c z are numbers indicating the version of the library, in our example
|
kpeter@3
|
67 |
we will have <tt>lemon-1.0.tar.gz</tt>) and issue the following commands:
|
kpeter@3
|
68 |
|
kpeter@3
|
69 |
\verbatim
|
kpeter@3
|
70 |
tar xvzf lemon-1.0.tar.gz
|
kpeter@3
|
71 |
cd lemon-1.0
|
kpeter@3
|
72 |
./configure
|
kpeter@3
|
73 |
make
|
kpeter@3
|
74 |
make check # This is optional, but recommended. It runs a bunch of tests.
|
kpeter@3
|
75 |
make install
|
kpeter@3
|
76 |
\endverbatim
|
kpeter@3
|
77 |
|
kpeter@3
|
78 |
These commands install LEMON under \c /usr/local (you will
|
kpeter@3
|
79 |
need root privileges to be able to install to that
|
kpeter@3
|
80 |
directory). If you want to install it to some other place, then
|
kpeter@3
|
81 |
pass the \c --prefix=DIRECTORY flag to <tt>./configure</tt>, for example:
|
kpeter@3
|
82 |
|
kpeter@3
|
83 |
\verbatim
|
kpeter@3
|
84 |
./configure --prefix=/home/username/lemon
|
kpeter@3
|
85 |
\endverbatim
|
kpeter@3
|
86 |
|
kpeter@3
|
87 |
In what follows we will assume that you were able to install to directory
|
kpeter@3
|
88 |
\c /usr/local, otherwise some extra care is to be taken to use the library.
|
kpeter@3
|
89 |
|
kpeter@3
|
90 |
We briefly explain these commands below.
|
kpeter@3
|
91 |
|
kpeter@3
|
92 |
\verbatim
|
kpeter@3
|
93 |
tar xvzf lemon-1.0.tar.gz
|
kpeter@3
|
94 |
\endverbatim
|
kpeter@3
|
95 |
This command untars the <tt>tar.gz</tt> file into a directory named
|
kpeter@3
|
96 |
<tt>lemon-1.0</tt>.
|
kpeter@3
|
97 |
|
kpeter@3
|
98 |
\verbatim
|
kpeter@3
|
99 |
cd lemon-1.0
|
kpeter@3
|
100 |
\endverbatim
|
kpeter@3
|
101 |
This command enters the directory.
|
kpeter@3
|
102 |
|
kpeter@3
|
103 |
\verbatim
|
kpeter@3
|
104 |
./configure
|
kpeter@3
|
105 |
\endverbatim
|
kpeter@3
|
106 |
This command runs the configure shell script, which does some checks and
|
kpeter@3
|
107 |
creates the makefiles.
|
kpeter@3
|
108 |
|
kpeter@3
|
109 |
\verbatim
|
kpeter@3
|
110 |
make
|
kpeter@3
|
111 |
\endverbatim
|
kpeter@3
|
112 |
This command compiles the non-template part of LEMON into <tt>libemon.a</tt>
|
kpeter@3
|
113 |
file. It also compiles the programs in the tools and demo subdirectories
|
kpeter@3
|
114 |
when enabled.
|
kpeter@3
|
115 |
|
kpeter@3
|
116 |
\verbatim
|
kpeter@3
|
117 |
make check
|
kpeter@3
|
118 |
\endverbatim
|
kpeter@3
|
119 |
This step is optional, but recommended. It runs the test programs that
|
kpeter@3
|
120 |
we developed for LEMON to check whether the library works properly on
|
kpeter@3
|
121 |
your platform.
|
kpeter@3
|
122 |
|
kpeter@3
|
123 |
\verbatim
|
kpeter@3
|
124 |
make install
|
kpeter@3
|
125 |
\endverbatim
|
kpeter@3
|
126 |
This command will copy the directory structure to its final destination
|
kpeter@3
|
127 |
(e.g. to \c /usr/local) so that your system can access it.
|
kpeter@3
|
128 |
This command should be issued as "root", unless you provided a
|
kpeter@3
|
129 |
\c --prefix switch to the \c configure to install the library in
|
kpeter@3
|
130 |
non-default location.
|
kpeter@3
|
131 |
|
kpeter@3
|
132 |
Several other configure flags can be passed to <tt>./configure</tt>.
|
kpeter@3
|
133 |
For more information see <tt>./configure --help</tt> and the INSTALL
|
kpeter@3
|
134 |
file in the install directory.
|
kpeter@3
|
135 |
|
kpeter@3
|
136 |
\section hg_checkout How to Checkout LEMON from our Mercurial Repository
|
kpeter@3
|
137 |
|
kpeter@3
|
138 |
You can obtain the latest version of LEMON from our Mercurial repository.
|
kpeter@3
|
139 |
To do this issue the following command:
|
kpeter@3
|
140 |
\verbatim
|
kpeter@3
|
141 |
hg clone http://lemon.cs.elte.hu/hg/lemon lemon-src
|
kpeter@3
|
142 |
\endverbatim
|
kpeter@3
|
143 |
|
kpeter@3
|
144 |
\section hg_compile How to Compile the Source from the Repository
|
kpeter@3
|
145 |
|
kpeter@3
|
146 |
You can compile the code from the repository similarly to the packaged
|
kpeter@3
|
147 |
version, but you will need to run <b><tt>autoreconf -vif</tt></b> or
|
kpeter@3
|
148 |
<b><tt>./bootstrap</tt></b> in some older environment before
|
kpeter@3
|
149 |
<tt>./configure</tt>. See <tt>./configure --help</tt> for options.
|
kpeter@3
|
150 |
For bootstrapping you will need the following tools:
|
kpeter@3
|
151 |
|
kpeter@3
|
152 |
- <a href="http://www.gnu.org/software/automake/">automake</a> (1.7 or newer)
|
kpeter@3
|
153 |
- <a href="http://www.gnu.org/software/autoconf/">autoconf</a> (2.59 or newer)
|
kpeter@3
|
154 |
- <a href="http://www.gnu.org/software/libtool/">libtool</a>
|
kpeter@3
|
155 |
- <a href="http://pkgconfig.freedesktop.org/">pkgconfig</a>
|
kpeter@3
|
156 |
|
kpeter@3
|
157 |
To generate the documentation, run <tt>make html</tt>.
|
kpeter@3
|
158 |
You will need <a href="http://www.doxygen.org/">Doxygen</a> for this.
|
kpeter@3
|
159 |
|
kpeter@3
|
160 |
*/
|