COIN-OR::LEMON - Graph Library

Ticket #437: 437-f63ba40a60f4-16f55008c863.patch

File 437-f63ba40a60f4-16f55008c863.patch, 14.5 KB (added by Peter Kovacs, 13 years ago)
  • doc/groups.dox

    # HG changeset patch
    # User Peter Kovacs <kpeter@inf.elte.hu>
    # Date 1327962254 -3600
    # Node ID f63ba40a60f442278dc74a741050b29857a6daa9
    # Parent  48e17328c1551cb8196973d6056a04e40e5d624a
    Improve module docs and references (#437)
    
    diff --git a/doc/groups.dox b/doc/groups.dox
    a b  
    407407   strongly polynomial \ref klein67primal, \ref goldberg89cyclecanceling.
    408408
    409409In general, \ref NetworkSimplex and \ref CostScaling are the most efficient
    410 implementations, but the other two algorithms could be faster in special cases.
     410implementations, but the other algorithms could be faster in special cases.
    411411For example, if the total supply and/or capacities are rather small,
    412412\ref CapacityScaling is usually the fastest algorithm (without effective scaling).
     413
     414These classes are intended to be used with integer-valued input data
     415(capacities, supply values, and costs), except for \ref CapacityScaling,
     416which is capable of handling real-valued arc costs (other numerical
     417data are required to be integer).
    413418*/
    414419
    415420/**
     
    448453\brief Algorithms for finding minimum mean cycles.
    449454
    450455This group contains the algorithms for finding minimum mean cycles
    451 \ref clrs01algorithms, \ref amo93networkflows.
     456\ref amo93networkflows, \ref karp78characterization.
    452457
    453458The \e minimum \e mean \e cycle \e problem is to find a directed cycle
    454459of minimum mean length (cost) in a digraph.
     
    464469function.
    465470
    466471LEMON contains three algorithms for solving the minimum mean cycle problem:
    467 - \ref KarpMmc Karp's original algorithm \ref amo93networkflows,
    468   \ref dasdan98minmeancycle.
     472- \ref KarpMmc Karp's original algorithm \ref karp78characterization.
    469473- \ref HartmannOrlinMmc Hartmann-Orlin's algorithm, which is an improved
    470   version of Karp's algorithm \ref dasdan98minmeancycle.
     474  version of Karp's algorithm \ref hartmann93finding.
    471475- \ref HowardMmc Howard's policy iteration algorithm
    472   \ref dasdan98minmeancycle.
     476  \ref dasdan98minmeancycle, \ref dasdan04experimental.
    473477
    474478In practice, the \ref HowardMmc "Howard" algorithm turned out to be by far the
    475479most efficient one, though the best known theoretical bound on its running
  • doc/min_cost_flow.dox

    diff --git a/doc/min_cost_flow.dox b/doc/min_cost_flow.dox
    a b  
    101101    sup(u) \quad \forall u\in V \f]
    102102\f[ lower(uv) \leq f(uv) \leq upper(uv) \quad \forall uv\in A \f]
    103103
    104 However if the sum of the supply values is zero, then these two problems
     104However, if the sum of the supply values is zero, then these two problems
    105105are equivalent.
    106106The \ref min_cost_flow_algs "algorithms" in LEMON support the general
    107107form, so if you need the equality form, you have to ensure this additional
  • doc/references.bib

    diff --git a/doc/references.bib b/doc/references.bib
    a b  
    44  key =          {LEMON},
    55  title =        {{LEMON} -- {L}ibrary for {E}fficient {M}odeling and
    66                  {O}ptimization in {N}etworks},
    7   howpublished = {\url{http://lemon.cs.elte.hu/}},
    8   year =         2009
     7  howpublished = {\url{http://lemon.cs.elte.hu/}}
    98}
    109
    1110@misc{egres,
     
    213212  pages =        {309-311}
    214213}
    215214
     215@article{hartmann93finding,
     216  author =       {Mark Hartmann and James B. Orlin},
     217  title =        {Finding minimum cost to time ratio cycles with small
     218                  integral transit times},
     219  journal =      {Networks},
     220  year =         1993,
     221  volume =       23,
     222  pages =        {567-574}
     223}
     224
    216225@article{dasdan98minmeancycle,
    217226  author =       {Ali Dasdan and Rajesh K. Gupta},
    218227  title =        {Faster Maximum and Minimum Mean Cycle Alogrithms for
     
    225234  pages =        {889-899}
    226235}
    227236
     237@article{dasdan04experimental,
     238  author =       {Ali Dasdan},
     239  title =        {Experimental analysis of the fastest optimum cycle
     240                  ratio and mean algorithms},
     241  journal =      {ACM Trans. Des. Autom. Electron. Syst.},
     242  year =         2004,
     243  volume =       9,
     244  issue =        4,
     245  pages =        {385-418}
     246}
     247
    228248
    229249%%%%% Minimum cost flow algorithms %%%%%
    230250
  • lemon/hartmann_orlin_mmc.h

    diff --git a/lemon/hartmann_orlin_mmc.h b/lemon/hartmann_orlin_mmc.h
    a b  
    9898  ///
    9999  /// This class implements the Hartmann-Orlin algorithm for finding
    100100  /// a directed cycle of minimum mean cost in a digraph
    101   /// \ref amo93networkflows, \ref dasdan98minmeancycle.
     101  /// \ref hartmann93finding, \ref dasdan98minmeancycle.
    102102  /// It is an improved version of \ref KarpMmc "Karp"'s original algorithm,
    103103  /// it applies an efficient early termination scheme.
    104104  /// It runs in time O(ne) and uses space O(n<sup>2</sup>+e).
  • lemon/howard_mmc.h

    diff --git a/lemon/howard_mmc.h b/lemon/howard_mmc.h
    a b  
    9898  ///
    9999  /// This class implements Howard's policy iteration algorithm for finding
    100100  /// a directed cycle of minimum mean cost in a digraph
    101   /// \ref amo93networkflows, \ref dasdan98minmeancycle.
     101  /// \ref dasdan98minmeancycle, \ref dasdan04experimental.
    102102  /// This class provides the most efficient algorithm for the
    103103  /// minimum mean cycle problem, though the best known theoretical
    104104  /// bound on its running time is exponential.
  • lemon/karp_mmc.h

    diff --git a/lemon/karp_mmc.h b/lemon/karp_mmc.h
    a b  
    9898  ///
    9999  /// This class implements Karp's algorithm for finding a directed
    100100  /// cycle of minimum mean cost in a digraph
    101   /// \ref amo93networkflows, \ref dasdan98minmeancycle.
     101  /// \ref karp78characterization, \ref dasdan98minmeancycle.
    102102  /// It runs in time O(ne) and uses space O(n<sup>2</sup>+e).
    103103  ///
    104104  /// \tparam GR The type of the digraph the algorithm runs on.
  • doc/groups.dox

    # HG changeset patch
    # User Peter Kovacs <kpeter@inf.elte.hu>
    # Date 1327962280 -3600
    # Node ID 16f55008c8633f73db3183859734c6981a223cf4
    # Parent  f63ba40a60f442278dc74a741050b29857a6daa9
    Doc improvements for min cost flow algorithms (#437)
    
    diff --git a/doc/groups.dox b/doc/groups.dox
    a b  
    407407   strongly polynomial \ref klein67primal, \ref goldberg89cyclecanceling.
    408408
    409409In general, \ref NetworkSimplex and \ref CostScaling are the most efficient
    410 implementations, but the other algorithms could be faster in special cases.
     410implementations.
     411\ref NetworkSimplex is usually the fastest on relatively small graphs (up to
     412several thousands of nodes) and on dense graphs, while \ref CostScaling is
     413typically more efficient on large graphs (e.g. hundreds of thousands of
     414nodes or above), especially if they are sparse.
     415However, other algorithms could be faster in special cases.
    411416For example, if the total supply and/or capacities are rather small,
    412417\ref CapacityScaling is usually the fastest algorithm (without effective scaling).
    413418
  • lemon/capacity_scaling.h

    diff --git a/lemon/capacity_scaling.h b/lemon/capacity_scaling.h
    a b  
    7070  /// \ref edmondskarp72theoretical. It is an efficient dual
    7171  /// solution method.
    7272  ///
     73  /// This algorithm is typically slower than \ref CostScaling and
     74  /// \ref NetworkSimplex, but in special cases, it can be more
     75  /// efficient than them.
     76  /// (For more information, see \ref min_cost_flow_algs "the module page".)
     77  ///
    7378  /// Most of the parameters of the problem (except for the digraph)
    7479  /// can be given using separate functions, and the algorithm can be
    7580  /// executed using the \ref run() function. If some parameters are not
     
    676681      return _res_cap[_arc_idb[a]];
    677682    }
    678683
    679     /// \brief Return the flow map (the primal solution).
     684    /// \brief Copy the flow values (the primal solution) into the
     685    /// given map.
    680686    ///
    681687    /// This function copies the flow value on each arc into the given
    682688    /// map. The \c Value type of the algorithm must be convertible to
     
    700706      return _pi[_node_id[n]];
    701707    }
    702708
    703     /// \brief Return the potential map (the dual solution).
     709    /// \brief Copy the potential values (the dual solution) into the
     710    /// given map.
    704711    ///
    705712    /// This function copies the potential (dual value) of each node
    706713    /// into the given map.
  • lemon/cost_scaling.h

    diff --git a/lemon/cost_scaling.h b/lemon/cost_scaling.h
    a b  
    9898  /// "preflow push-relabel" algorithm for the maximum flow problem.
    9999  ///
    100100  /// In general, \ref NetworkSimplex and \ref CostScaling are the fastest
    101   /// implementations available in LEMON for this problem.
     101  /// implementations available in LEMON for solving this problem.
     102  /// (For more information, see \ref min_cost_flow_algs "the module page".)
    102103  ///
    103104  /// Most of the parameters of the problem (except for the digraph)
    104105  /// can be given using separate functions, and the algorithm can be
     
    704705      return _res_cap[_arc_idb[a]];
    705706    }
    706707
    707     /// \brief Return the flow map (the primal solution).
     708    /// \brief Copy the flow values (the primal solution) into the
     709    /// given map.
    708710    ///
    709711    /// This function copies the flow value on each arc into the given
    710712    /// map. The \c Value type of the algorithm must be convertible to
     
    728730      return static_cast<Cost>(_pi[_node_id[n]]);
    729731    }
    730732
    731     /// \brief Return the potential map (the dual solution).
     733    /// \brief Copy the potential values (the dual solution) into the
     734    /// given map.
    732735    ///
    733736    /// This function copies the potential (dual value) of each node
    734737    /// into the given map.
  • lemon/cycle_canceling.h

    diff --git a/lemon/cycle_canceling.h b/lemon/cycle_canceling.h
    a b  
    4848  /// algorithms for finding a \ref min_cost_flow "minimum cost flow"
    4949  /// \ref amo93networkflows, \ref klein67primal,
    5050  /// \ref goldberg89cyclecanceling.
    51   /// The most efficent one (both theoretically and practically)
    52   /// is the \ref CANCEL_AND_TIGHTEN "Cancel and Tighten" algorithm,
    53   /// thus it is the default method.
    54   /// It is strongly polynomial, but in practice, it is typically much
    55   /// slower than the scaling algorithms and NetworkSimplex.
     51  /// The most efficent one is the \ref CANCEL_AND_TIGHTEN
     52  /// "Cancel-and-Tighten" algorithm, thus it is the default method.
     53  /// It runs in strongly polynomial time, but in practice, it is typically
     54  /// orders of magnitude slower than the scaling algorithms and
     55  /// \ref NetworkSimplex.
     56  /// (For more information, see \ref min_cost_flow_algs "the module page".)
    5657  ///
    5758  /// Most of the parameters of the problem (except for the digraph)
    5859  /// can be given using separate functions, and the algorithm can be
     
    116117    /// for the \ref run() function.
    117118    ///
    118119    /// \ref CycleCanceling provides three different cycle-canceling
    119     /// methods. By default, \ref CANCEL_AND_TIGHTEN "Cancel and Tighten"
     120    /// methods. By default, \ref CANCEL_AND_TIGHTEN "Cancel-and-Tighten"
    120121    /// is used, which is by far the most efficient and the most robust.
    121122    /// However, the other methods can be selected using the \ref run()
    122123    /// function with the proper parameter.
    123124    enum Method {
    124125      /// A simple cycle-canceling method, which uses the
    125       /// \ref BellmanFord "Bellman-Ford" algorithm with limited iteration
    126       /// number for detecting negative cycles in the residual network.
     126      /// \ref BellmanFord "Bellman-Ford" algorithm for detecting negative
     127      /// cycles in the residual network.
     128      /// The number of Bellman-Ford iterations is bounded by a successively
     129      /// increased limit.
    127130      SIMPLE_CYCLE_CANCELING,
    128131      /// The "Minimum Mean Cycle-Canceling" algorithm, which is a
    129132      /// well-known strongly polynomial method
    130133      /// \ref goldberg89cyclecanceling. It improves along a
    131134      /// \ref min_mean_cycle "minimum mean cycle" in each iteration.
    132       /// Its running time complexity is O(n<sup>2</sup>m<sup>3</sup>log(n)).
     135      /// Its running time complexity is O(n<sup>2</sup>e<sup>3</sup>log(n)).
    133136      MINIMUM_MEAN_CYCLE_CANCELING,
    134       /// The "Cancel And Tighten" algorithm, which can be viewed as an
     137      /// The "Cancel-and-Tighten" algorithm, which can be viewed as an
    135138      /// improved version of the previous method
    136139      /// \ref goldberg89cyclecanceling.
    137140      /// It is faster both in theory and in practice, its running time
    138       /// complexity is O(n<sup>2</sup>m<sup>2</sup>log(n)).
     141      /// complexity is O(n<sup>2</sup>e<sup>2</sup>log(n)).
    139142      CANCEL_AND_TIGHTEN
    140143    };
    141144
     
    610613      return _res_cap[_arc_idb[a]];
    611614    }
    612615
    613     /// \brief Return the flow map (the primal solution).
     616    /// \brief Copy the flow values (the primal solution) into the
     617    /// given map.
    614618    ///
    615619    /// This function copies the flow value on each arc into the given
    616620    /// map. The \c Value type of the algorithm must be convertible to
     
    634638      return static_cast<Cost>(_pi[_node_id[n]]);
    635639    }
    636640
    637     /// \brief Return the potential map (the dual solution).
     641    /// \brief Copy the potential values (the dual solution) into the
     642    /// given map.
    638643    ///
    639644    /// This function copies the potential (dual value) of each node
    640645    /// into the given map.
     
    954959      }
    955960    }
    956961
    957     // Execute the "Cancel And Tighten" method
     962    // Execute the "Cancel-and-Tighten" method
    958963    void startCancelAndTighten() {
    959964      // Constants for the min mean cycle computations
    960965      const double LIMIT_FACTOR = 1.0;
  • lemon/network_simplex.h

    diff --git a/lemon/network_simplex.h b/lemon/network_simplex.h
    a b  
    4848  /// flow problem.
    4949  ///
    5050  /// In general, \ref NetworkSimplex and \ref CostScaling are the fastest
    51   /// implementations available in LEMON for this problem.
     51  /// implementations available in LEMON for solving this problem.
     52  /// (For more information, see \ref min_cost_flow_algs "the module page".)
    5253  /// Furthermore, this class supports both directions of the supply/demand
    5354  /// inequality constraints. For more information, see \ref SupplyType.
    5455  ///
     
    10061007      return _flow[_arc_id[a]];
    10071008    }
    10081009
    1009     /// \brief Return the flow map (the primal solution).
     1010    /// \brief Copy the flow values (the primal solution) into the
     1011    /// given map.
    10101012    ///
    10111013    /// This function copies the flow value on each arc into the given
    10121014    /// map. The \c Value type of the algorithm must be convertible to
     
    10301032      return _pi[_node_id[n]];
    10311033    }
    10321034
    1033     /// \brief Return the potential map (the dual solution).
     1035    /// \brief Copy the potential values (the dual solution) into the
     1036    /// given map.
    10341037    ///
    10351038    /// This function copies the potential (dual value) of each node
    10361039    /// into the given map.