Main Page   Class Hierarchy   Compound List   File List   Contact   Download   Symbolic Constraints   Examples  

path.h

00001 #ifndef PATH_CONSTRAINT_H
00002 #define PATH_CONSTRAINT_H
00003 
00004 #include <scil/scil.h>
00005 #include <boost/graph/adjacency_list.hpp>
00006 #include <boost/graph/adjacency_matrix.hpp>
00007 #include <boost/graph/boykov_kolmogorov_max_flow.hpp>
00008 #include <boost/graph/depth_first_search.hpp>
00009 #include <boost/graph/iteration_macros.hpp>
00010 
00011 using namespace boost;
00012 
00013 namespace SCIL {
00014 
00032 template< typename Graph >
00033 class PATH : public sym_constraint { 
00034    private:
00035       typedef typename boost::graph_traits<Graph>::vertex_descriptor vertex; 
00036       typedef typename boost::graph_traits<Graph>::edge_descriptor edge_descriptor; 
00037 
00038       typedef adjacency_list_traits < vecS, vecS, bidirectionalS > Traits;
00039       typedef adjacency_list < vecS, vecS, bidirectionalS,
00040         property < vertex_name_t, std::string,
00041         property < vertex_index_t, long> >,
00042     
00043         property < edge_capacity_t, long,
00044         property < edge_residual_capacity_t, long,
00045         property < edge_reverse_t, Traits::edge_descriptor > > > > dGraph;
00046 
00047 
00048 
00049       typedef typename graph_traits<dGraph>::vertex_descriptor dvertex;
00050       typedef typename graph_traits<dGraph>::edge_descriptor dedge;
00051 
00052       dGraph H;         
00053       Graph& G;         
00054       vertex u, v;      
00055 
00056       std::map<edge_descriptor,dedge> GtoH;
00057 
00058       var_map<edge_descriptor>& VM;    
00059 
00060    class path_cutset_inequality;
00061 
00062    public:
00063 
00073      PATH(Graph& G, vertex u, vertex v, var_map<edge_descriptor>& X);
00074 
00078      status standard_separation(subproblem& S);
00079 
00082      status feasible(solution& S);
00083 
00086       void info();
00087 
00088     private:
00089      void dfs(dGraph& G, dvertex u, std::vector<bool>& R);
00090 
00091 };
00092 
00093 }
00094 
00095 // Load implementation
00096 #include <../src/constraints/path.cc>
00097 
00098 #endif
Generated on Mon Mar 28 22:03:49 2011 for SCIL by  doxygen 1.6.3