0
6
0
34
21
15
9
31
60
... | ... |
@@ -313,21 +313,23 @@ |
313 | 313 |
/** |
314 | 314 |
@defgroup search Graph Search |
315 | 315 |
@ingroup algs |
316 | 316 |
\brief Common graph search algorithms. |
317 | 317 |
|
318 | 318 |
This group contains the common graph search algorithms, namely |
319 |
\e breadth-first \e search (BFS) and \e depth-first \e search (DFS) |
|
319 |
\e breadth-first \e search (BFS) and \e depth-first \e search (DFS) |
|
320 |
\ref clrs01algorithms. |
|
320 | 321 |
*/ |
321 | 322 |
|
322 | 323 |
/** |
323 | 324 |
@defgroup shortest_path Shortest Path Algorithms |
324 | 325 |
@ingroup algs |
325 | 326 |
\brief Algorithms for finding shortest paths. |
326 | 327 |
|
327 |
This group contains the algorithms for finding shortest paths in digraphs |
|
328 |
This group contains the algorithms for finding shortest paths in digraphs |
|
329 |
\ref clrs01algorithms. |
|
328 | 330 |
|
329 | 331 |
- \ref Dijkstra algorithm for finding shortest paths from a source node |
330 | 332 |
when all arc lengths are non-negative. |
331 | 333 |
- \ref BellmanFord "Bellman-Ford" algorithm for finding shortest paths |
332 | 334 |
from a source node when arc lenghts can be either positive or negative, |
333 | 335 |
but the digraph should not contain directed cycles with negative total |
... | ... |
@@ -343,22 +345,22 @@ |
343 | 345 |
/** |
344 | 346 |
@defgroup spantree Minimum Spanning Tree Algorithms |
345 | 347 |
@ingroup algs |
346 | 348 |
\brief Algorithms for finding minimum cost spanning trees and arborescences. |
347 | 349 |
|
348 | 350 |
This group contains the algorithms for finding minimum cost spanning |
349 |
trees and arborescences. |
|
351 |
trees and arborescences \ref clrs01algorithms. |
|
350 | 352 |
*/ |
351 | 353 |
|
352 | 354 |
/** |
353 | 355 |
@defgroup max_flow Maximum Flow Algorithms |
354 | 356 |
@ingroup algs |
355 | 357 |
\brief Algorithms for finding maximum flows. |
356 | 358 |
|
357 | 359 |
This group contains the algorithms for finding maximum flows and |
358 |
feasible circulations. |
|
360 |
feasible circulations \ref clrs01algorithms, \ref amo93networkflows. |
|
359 | 361 |
|
360 | 362 |
The \e maximum \e flow \e problem is to find a flow of maximum value between |
361 | 363 |
a single source and a single target. Formally, there is a \f$G=(V,A)\f$ |
362 | 364 |
digraph, a \f$cap: A\rightarrow\mathbf{R}^+_0\f$ capacity function and |
363 | 365 |
\f$s, t \in V\f$ source and target nodes. |
364 | 366 |
A maximum flow is an \f$f: A\rightarrow\mathbf{R}^+_0\f$ solution of the |
... | ... |
@@ -367,18 +369,22 @@ |
367 | 369 |
\f[ \max\sum_{sv\in A} f(sv) - \sum_{vs\in A} f(vs) \f] |
368 | 370 |
\f[ \sum_{uv\in A} f(uv) = \sum_{vu\in A} f(vu) |
369 | 371 |
\quad \forall u\in V\setminus\{s,t\} \f] |
370 | 372 |
\f[ 0 \leq f(uv) \leq cap(uv) \quad \forall uv\in A \f] |
371 | 373 |
|
372 | 374 |
LEMON contains several algorithms for solving maximum flow problems: |
373 |
- \ref EdmondsKarp Edmonds-Karp algorithm. |
|
374 |
- \ref Preflow Goldberg-Tarjan's preflow push-relabel algorithm. |
|
375 |
- \ref DinitzSleatorTarjan Dinitz's blocking flow algorithm with dynamic trees. |
|
376 |
- \ref GoldbergTarjan Preflow push-relabel algorithm with dynamic trees. |
|
375 |
- \ref EdmondsKarp Edmonds-Karp algorithm |
|
376 |
\ref edmondskarp72theoretical. |
|
377 |
- \ref Preflow Goldberg-Tarjan's preflow push-relabel algorithm |
|
378 |
\ref goldberg88newapproach. |
|
379 |
- \ref DinitzSleatorTarjan Dinitz's blocking flow algorithm with dynamic trees |
|
380 |
\ref dinic70algorithm, \ref sleator83dynamic. |
|
381 |
- \ref GoldbergTarjan !Preflow push-relabel algorithm with dynamic trees |
|
382 |
\ref goldberg88newapproach, \ref sleator83dynamic. |
|
377 | 383 |
|
378 |
In most cases the \ref Preflow |
|
384 |
In most cases the \ref Preflow algorithm provides the |
|
379 | 385 |
fastest method for computing a maximum flow. All implementations |
380 | 386 |
also provide functions to query the minimum cut, which is the dual |
381 | 387 |
problem of maximum flow. |
382 | 388 |
|
383 | 389 |
\ref Circulation is a preflow push-relabel algorithm implemented directly |
384 | 390 |
for finding feasible circulations, which is a somewhat different problem, |
... | ... |
@@ -390,24 +396,28 @@ |
390 | 396 |
@defgroup min_cost_flow_algs Minimum Cost Flow Algorithms |
391 | 397 |
@ingroup algs |
392 | 398 |
|
393 | 399 |
\brief Algorithms for finding minimum cost flows and circulations. |
394 | 400 |
|
395 | 401 |
This group contains the algorithms for finding minimum cost flows and |
396 |
circulations. For more information about this problem and its dual |
|
397 |
solution see \ref min_cost_flow "Minimum Cost Flow Problem". |
|
402 |
circulations \ref amo93networkflows. For more information about this |
|
403 |
problem and its dual solution, see \ref min_cost_flow |
|
404 |
"Minimum Cost Flow Problem". |
|
398 | 405 |
|
399 | 406 |
LEMON contains several algorithms for this problem. |
400 | 407 |
- \ref NetworkSimplex Primal Network Simplex algorithm with various |
401 |
pivot strategies. |
|
408 |
pivot strategies \ref dantzig63linearprog, \ref kellyoneill91netsimplex. |
|
402 | 409 |
- \ref CostScaling Push-Relabel and Augment-Relabel algorithms based on |
403 |
cost scaling |
|
410 |
cost scaling \ref goldberg90approximation, \ref goldberg97efficient, |
|
411 |
\ref bunnagel98efficient. |
|
404 | 412 |
- \ref CapacityScaling Successive Shortest %Path algorithm with optional |
405 |
capacity scaling. |
|
406 |
- \ref CancelAndTighten The Cancel and Tighten algorithm. |
|
407 |
|
|
413 |
capacity scaling \ref edmondskarp72theoretical. |
|
414 |
- \ref CancelAndTighten The Cancel and Tighten algorithm |
|
415 |
\ref goldberg89cyclecanceling. |
|
416 |
- \ref CycleCanceling Cycle-Canceling algorithms |
|
417 |
\ref klein67primal, \ref goldberg89cyclecanceling. |
|
408 | 418 |
|
409 | 419 |
In general NetworkSimplex is the most efficient implementation, |
410 | 420 |
but in special cases other algorithms could be faster. |
411 | 421 |
For example, if the total supply and/or capacities are rather small, |
412 | 422 |
CapacityScaling is usually the fastest algorithm (without effective scaling). |
413 | 423 |
*/ |
... | ... |
@@ -531,19 +541,22 @@ |
531 | 541 |
|
532 | 542 |
This group contains some general optimization frameworks |
533 | 543 |
implemented in LEMON. |
534 | 544 |
*/ |
535 | 545 |
|
536 | 546 |
/** |
537 |
@defgroup lp_group |
|
547 |
@defgroup lp_group LP and MIP Solvers |
|
538 | 548 |
@ingroup gen_opt_group |
539 |
\brief |
|
549 |
\brief LP and MIP solver interfaces for LEMON. |
|
540 | 550 |
|
541 |
This group contains Lp and Mip solver interfaces for LEMON. The |
|
542 |
various LP solvers could be used in the same manner with this |
|
543 |
|
|
551 |
This group contains LP and MIP solver interfaces for LEMON. |
|
552 |
Various LP solvers could be used in the same manner with this |
|
553 |
high-level interface. |
|
554 |
|
|
555 |
The currently supported solvers are \ref glpk, \ref clp, \ref cbc, |
|
556 |
\ref cplex, \ref soplex. |
|
544 | 557 |
*/ |
545 | 558 |
|
546 | 559 |
/** |
547 | 560 |
@defgroup lp_utils Tools for Lp and Mip Solvers |
548 | 561 |
@ingroup lp_group |
549 | 562 |
\brief Helper tools to the Lp and Mip solvers. |
... | ... |
@@ -18,30 +18,36 @@ |
18 | 18 |
|
19 | 19 |
/** |
20 | 20 |
\mainpage LEMON Documentation |
21 | 21 |
|
22 | 22 |
\section intro Introduction |
23 | 23 |
|
24 |
\subsection whatis What is LEMON |
|
25 |
|
|
26 |
LEMON stands for <b>L</b>ibrary for <b>E</b>fficient <b>M</b>odeling |
|
27 |
and <b>O</b>ptimization in <b>N</b>etworks. |
|
28 |
It is a C++ template |
|
29 |
library aimed at combinatorial optimization tasks which |
|
30 |
often involve in working |
|
31 |
with graphs. |
|
24 |
<b>LEMON</b> stands for <i><b>L</b>ibrary for <b>E</b>fficient <b>M</b>odeling |
|
25 |
and <b>O</b>ptimization in <b>N</b>etworks</i>. |
|
26 |
It is a C++ template library providing efficient implementation of common |
|
27 |
data structures and algorithms with focus on combinatorial optimization |
|
28 |
problems in graphs and networks. |
|
32 | 29 |
|
33 | 30 |
<b> |
34 | 31 |
LEMON is an <a class="el" href="http://opensource.org/">open source</a> |
35 | 32 |
project. |
36 | 33 |
You are free to use it in your commercial or |
37 | 34 |
non-commercial applications under very permissive |
38 | 35 |
\ref license "license terms". |
39 | 36 |
</b> |
40 | 37 |
|
41 |
|
|
38 |
The project is maintained by the |
|
39 |
<a href="http://www.cs.elte.hu/egres/">Egerváry Research Group on |
|
40 |
Combinatorial Optimization</a> \ref egres |
|
41 |
at the Operations Research Department of the |
|
42 |
<a href="http://www.elte.hu/">Eötvös Loránd University, |
|
43 |
Budapest</a>, Hungary. |
|
44 |
LEMON is also a member of the <a href="http://www.coin-or.org/">COIN-OR</a> |
|
45 |
initiative \ref coinor. |
|
46 |
|
|
47 |
\section howtoread How to Read the Documentation |
|
42 | 48 |
|
43 | 49 |
If you would like to get to know the library, see |
44 | 50 |
<a class="el" href="http://lemon.cs.elte.hu/pub/tutorial/">LEMON Tutorial</a>. |
45 | 51 |
|
46 | 52 |
If you know what you are looking for, then try to find it under the |
47 | 53 |
<a class="el" href="modules.html">Modules</a> section. |
... | ... |
@@ -23,13 +23,13 @@ |
23 | 23 |
|
24 | 24 |
\section mcf_def Definition (GEQ form) |
25 | 25 |
|
26 | 26 |
The \e minimum \e cost \e flow \e problem is to find a feasible flow of |
27 | 27 |
minimum total cost from a set of supply nodes to a set of demand nodes |
28 | 28 |
in a network with capacity constraints (lower and upper bounds) |
29 |
and arc costs. |
|
29 |
and arc costs \ref amo93networkflows. |
|
30 | 30 |
|
31 | 31 |
Formally, let \f$G=(V,A)\f$ be a digraph, \f$lower: A\rightarrow\mathbf{R}\f$, |
32 | 32 |
\f$upper: A\rightarrow\mathbf{R}\cup\{+\infty\}\f$ denote the lower and |
33 | 33 |
upper bounds for the flow values on the arcs, for which |
34 | 34 |
\f$lower(uv) \leq upper(uv)\f$ must hold for all \f$uv\in A\f$, |
35 | 35 |
\f$cost: A\rightarrow\mathbf{R}\f$ denotes the cost per unit flow |
... | ... |
@@ -147,21 +147,31 @@ |
147 | 147 |
year = 2000 |
148 | 148 |
} |
149 | 149 |
|
150 | 150 |
|
151 | 151 |
%%%%% Maximum flow algorithms %%%%% |
152 | 152 |
|
153 |
@ |
|
153 |
@article{edmondskarp72theoretical, |
|
154 |
author = {Jack Edmonds and Richard M. Karp}, |
|
155 |
title = {Theoretical improvements in algorithmic efficiency |
|
156 |
for network flow problems}, |
|
157 |
journal = {Journal of the ACM}, |
|
158 |
year = 1972, |
|
159 |
volume = 19, |
|
160 |
number = 2, |
|
161 |
pages = {248-264} |
|
162 |
} |
|
163 |
|
|
164 |
@article{goldberg88newapproach, |
|
154 | 165 |
author = {Andrew V. Goldberg and Robert E. Tarjan}, |
155 | 166 |
title = {A new approach to the maximum flow problem}, |
156 |
booktitle = {STOC '86: Proceedings of the Eighteenth Annual ACM |
|
157 |
Symposium on Theory of Computing}, |
|
158 |
year = 1986, |
|
159 |
publisher = {ACM Press}, |
|
160 |
address = {New York, NY}, |
|
161 |
pages = {136-146} |
|
167 |
journal = {Journal of the ACM}, |
|
168 |
year = 1988, |
|
169 |
volume = 35, |
|
170 |
number = 4, |
|
171 |
pages = {921-940} |
|
162 | 172 |
} |
163 | 173 |
|
164 | 174 |
@article{dinic70algorithm, |
165 | 175 |
author = {E. A. Dinic}, |
166 | 176 |
title = {Algorithm for solution of a problem of maximum flow |
167 | 177 |
in a network with power estimation}, |
... | ... |
@@ -226,48 +236,24 @@ |
226 | 236 |
journal = {Management Science}, |
227 | 237 |
year = 1967, |
228 | 238 |
volume = 14, |
229 | 239 |
pages = {205-220} |
230 | 240 |
} |
231 | 241 |
|
232 |
@ |
|
242 |
@article{goldberg89cyclecanceling, |
|
233 | 243 |
author = {Andrew V. Goldberg and Robert E. Tarjan}, |
234 | 244 |
title = {Finding minimum-cost circulations by canceling |
235 | 245 |
negative cycles}, |
236 |
booktitle = {STOC '88: Proceedings of the Twentieth Annual ACM |
|
237 |
Symposium on Theory of Computing}, |
|
238 |
year = 1988, |
|
239 |
publisher = {ACM Press}, |
|
240 |
address = {New York, NY}, |
|
241 |
pages = {388-397} |
|
246 |
journal = {Journal of the ACM}, |
|
247 |
year = 1989, |
|
248 |
volume = 36, |
|
249 |
number = 4, |
|
250 |
pages = {873-886} |
|
242 | 251 |
} |
243 | 252 |
|
244 |
@article{edmondskarp72theoretical, |
|
245 |
author = {Jack Edmonds and Richard M. Karp}, |
|
246 |
title = {Theoretical improvements in algorithmic efficiency |
|
247 |
for network flow problems}, |
|
248 |
journal = {Journal of the ACM}, |
|
249 |
year = 1972, |
|
250 |
volume = 19, |
|
251 |
number = 2, |
|
252 |
pages = {248-264} |
|
253 |
} |
|
254 |
|
|
255 |
@inproceedings{goldberg87approximation, |
|
256 |
author = {Andrew V. Goldberg and Robert E. Tarjan}, |
|
257 |
title = {Solving minimum-cost flow problems by successive |
|
258 |
approximation}, |
|
259 |
booktitle = {STOC '87: Proceedings of the Nineteenth Annual ACM |
|
260 |
Symposium on Theory of Computing}, |
|
261 |
year = 1987, |
|
262 |
publisher = {ACM Press}, |
|
263 |
address = {New York, NY}, |
|
264 |
pages = {7-18} |
|
265 |
} |
|
266 |
|
|
267 |
@article{goldberg90finding, |
|
253 |
@article{goldberg90approximation, |
|
268 | 254 |
author = {Andrew V. Goldberg and Robert E. Tarjan}, |
269 | 255 |
title = {Finding Minimum-Cost Circulations by Successive |
270 | 256 |
Approximation}, |
271 | 257 |
journal = {Mathematics of Operations Research}, |
272 | 258 |
year = 1990, |
273 | 259 |
volume = 15, |
... | ... |
@@ -294,37 +280,22 @@ |
294 | 280 |
journal = {Optimization Methods and Software}, |
295 | 281 |
year = 1998, |
296 | 282 |
volume = 10, |
297 | 283 |
pages = {157-174} |
298 | 284 |
} |
299 | 285 |
|
286 |
@book{dantzig63linearprog, |
|
287 |
author = {George B. Dantzig}, |
|
288 |
title = {Linear Programming and Extensions}, |
|
289 |
publisher = {Princeton University Press}, |
|
290 |
year = 1963 |
|
291 |
} |
|
292 |
|
|
300 | 293 |
@mastersthesis{kellyoneill91netsimplex, |
301 | 294 |
author = {Damian J. Kelly and Garrett M. O'Neill}, |
302 | 295 |
title = {The Minimum Cost Flow Problem and The Network |
303 | 296 |
Simplex Method}, |
304 | 297 |
school = {University College}, |
305 | 298 |
address = {Dublin, Ireland}, |
306 | 299 |
year = 1991, |
307 | 300 |
month = sep, |
308 | 301 |
} |
309 |
|
|
310 |
@techreport{lobel96networksimplex, |
|
311 |
author = {Andreas L{\"o}bel}, |
|
312 |
title = {Solving large-scale real-world minimum-cost flow |
|
313 |
problems by a network simplex method}, |
|
314 |
institution = {Konrad-Zuse-Zentrum fur Informationstechnik Berlin |
|
315 |
({ZIB})}, |
|
316 |
address = {Berlin, Germany}, |
|
317 |
year = 1996, |
|
318 |
number = {SC 96-7} |
|
319 |
} |
|
320 |
|
|
321 |
@article{frangioni06computational, |
|
322 |
author = {Antonio Frangioni and Antonio Manca}, |
|
323 |
title = {A Computational Study of Cost Reoptimization for |
|
324 |
Min-Cost Flow Problems}, |
|
325 |
journal = {INFORMS Journal On Computing}, |
|
326 |
year = 2006, |
|
327 |
volume = 18, |
|
328 |
number = 1, |
|
329 |
pages = {61-70} |
|
330 |
} |
... | ... |
@@ -37,13 +37,15 @@ |
37 | 37 |
/// @{ |
38 | 38 |
|
39 | 39 |
/// \brief Implementation of the primal Network Simplex algorithm |
40 | 40 |
/// for finding a \ref min_cost_flow "minimum cost flow". |
41 | 41 |
/// |
42 | 42 |
/// \ref NetworkSimplex implements the primal Network Simplex algorithm |
43 |
/// for finding a \ref min_cost_flow "minimum cost flow" |
|
43 |
/// for finding a \ref min_cost_flow "minimum cost flow" |
|
44 |
/// \ref amo93networkflows, \ref dantzig63linearprog, |
|
45 |
/// \ref kellyoneill91netsimplex. |
|
44 | 46 |
/// This algorithm is a specialized version of the linear programming |
45 | 47 |
/// simplex method directly for the minimum cost flow problem. |
46 | 48 |
/// It is one of the most efficient solution methods. |
47 | 49 |
/// |
48 | 50 |
/// In general this class is the fastest implementation available |
49 | 51 |
/// in LEMON for the minimum cost flow problem. |
... | ... |
@@ -99,13 +99,14 @@ |
99 | 99 |
/// \ingroup max_flow |
100 | 100 |
/// |
101 | 101 |
/// \brief %Preflow algorithm class. |
102 | 102 |
/// |
103 | 103 |
/// This class provides an implementation of Goldberg-Tarjan's \e preflow |
104 | 104 |
/// \e push-relabel algorithm producing a \ref max_flow |
105 |
/// "flow of maximum value" in a digraph |
|
105 |
/// "flow of maximum value" in a digraph \ref clrs01algorithms, |
|
106 |
/// \ref amo93networkflows, \ref goldberg88newapproach. |
|
106 | 107 |
/// The preflow algorithms are the fastest known maximum |
107 | 108 |
/// flow algorithms. The current implementation uses a mixture of the |
108 | 109 |
/// \e "highest label" and the \e "bound decrease" heuristics. |
109 | 110 |
/// The worst case time complexity of the algorithm is \f$O(n^2\sqrt{e})\f$. |
110 | 111 |
/// |
111 | 112 |
/// The algorithm consists of two phases. After the first phase |
0 comments (0 inline)