COIN-OR::LEMON - Graph Library

source: lemon-tutorial/getting_started.dox @ 4:89f6fff82e93

Last change on this file since 4:89f6fff82e93 was 3:0cf8882c7e7c, checked in by Peter Kovacs <kpeter@…>, 16 years ago

Add Intro and Getting Started pages

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