Limbo
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
limbo::solvers::lpmcf::Lgf< T > Class Template Reference

solve network flow graph with min-cost flow More...

#include <Lgf.h>

Inheritance diagram for limbo::solvers::lpmcf::Lgf< T >:
limbo::solvers::lpmcf::LpDualMcf< T >

Public Types

typedef T value_type
 
typedef value_type cost_type
 
typedef lemon::SmartDigraph graph_type
 
typedef graph_type::Node node_type
 
typedef graph_type::Arc arc_type
 
typedef graph_type::NodeMap
< value_type > 
node_value_map_type
 
typedef graph_type::NodeMap
< string > 
node_name_map_type
 
typedef graph_type::ArcMap
< value_type > 
arc_value_map_type
 
typedef graph_type::ArcMap
< value_type > 
arc_cost_map_type
 
typedef graph_type::ArcMap
< value_type > 
arc_flow_map_type
 
typedef graph_type::NodeMap
< value_type > 
node_pot_map_type
 
typedef lemon::NetworkSimplex
< graph_type, value_type,
cost_type > 
alg_network_simplex_type
 
typedef lemon::CostScaling
< graph_type, value_type,
cost_type > 
alg_cost_scaling_type
 
typedef alg_cost_scaling_type alg_type
 

Public Member Functions

 Lgf ()
 constructor
 
virtual ~Lgf ()
 destructor
 
alg_type::ProblemType operator() (string const &filename)
 API to run the algorithm. More...
 
virtual void print_graph (string const &filename) const
 print graph More...
 
virtual void print_solution (string const &filename) const
 print solution More...
 
void read_lgf (string const &lgfFile)
 read input file in .lgf format and initialize graph More...
 

Protected Member Functions

alg_type::ProblemType run ()
 run algorithm More...
 

Protected Attributes

graph_type m_graph
 input graph
 
arc_value_map_type m_hLower
 lower bound of flow, usually zero
 
arc_value_map_type m_hUpper
 upper bound of flow, arc capacity in mcf
 
arc_cost_map_type m_hCost
 arc cost in mcf
 
node_value_map_type m_hSupply
 node supply in mcf
 
node_name_map_type m_hName
 node name in mcf
 
cost_type m_totalcost
 total cost after solving
 
arc_flow_map_type m_hFlow
 solution of min-cost flow, which is the dual solution of LP
 
node_pot_map_type m_hPot
 dual solution of min-cost flow, which is the solution of LP
 

Detailed Description

template<typename T>
class limbo::solvers::lpmcf::Lgf< T >

solve network flow graph with min-cost flow

Template Parameters
Tdata type

Definition at line 54 of file Lgf.h.

Member Function Documentation

template<typename T>
alg_type::ProblemType limbo::solvers::lpmcf::Lgf< T >::operator() ( string const &  filename)
inline

API to run the algorithm.

Parameters
filenameinput file in .lgf format

Definition at line 99 of file Lgf.h.

template<typename T>
virtual void limbo::solvers::lpmcf::Lgf< T >::print_graph ( string const &  filename) const
inlinevirtual

print graph

Parameters
filenameoutput file in .lgf format

Definition at line 112 of file Lgf.h.

template<typename T>
virtual void limbo::solvers::lpmcf::Lgf< T >::print_solution ( string const &  filename) const
inlinevirtual

print solution

Parameters
filenameoutput file name

Reimplemented in limbo::solvers::lpmcf::LpDualMcf< T >.

Definition at line 170 of file Lgf.h.

template<typename T>
void limbo::solvers::lpmcf::Lgf< T >::read_lgf ( string const &  lgfFile)
inline

read input file in .lgf format and initialize graph

Parameters
lgfFileinput file name

Definition at line 197 of file Lgf.h.

template<typename T>
alg_type::ProblemType limbo::solvers::lpmcf::Lgf< T >::run ( )
inlineprotected

run algorithm

Returns
solving status: OPTIMAL, INFEASIBLE, or UNBOUNDED

Definition at line 210 of file Lgf.h.


The documentation for this class was generated from the following file: