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

nonlinear_inst.h

00001 #ifndef NONLINEAR_INST_H
00002 #define NONLINEAR_INST_H
00003 
00004 #include<scil/scil.h>
00005 #include<scil/constraints/cut.h>
00006 #include<scil/core/monomial.h>
00007 #include<scil/core/qelement.h>
00008 #include<scil/core/qmonomial.h>
00009 #include<scil/core/qboolfunction.h>
00010 #include<scil/variable.h>
00011 #include<boost/graph/adjacency_list.hpp>
00012 #include<boost/graph/graph_traits.hpp>
00013 #include<boost/graph/iteration_macros.hpp>
00014 
00015 #include<vector>
00016 #include<list>
00017 #include<map>
00018 
00019 namespace SCIL{
00020 
00021   class nonlinear_inst : public sym_constraint {
00022     //  private:
00023      protected:
00024          typedef adjacency_list<vecS, vecS, undirectedS> Graph;
00025          typedef graph_traits<Graph> GraphTraits;
00026          typedef GraphTraits::vertex_descriptor vertex_descriptor;
00027          typedef GraphTraits::edge_descriptor edge_descriptor;
00028 
00029          std::list<qelement<Graph>*> qm; //the elementss comprising the quadratic instance
00030          Graph G; //the separation graph
00031          row_map<edge_descriptor> VM; //the mapping between edges and variables
00032          //assign nodes and edges to qelementss
00033          virtual void construct_separation_graph(ILP_Problem& IP);
00034          //output the edge of the separation graph defined by a and b
00035          //(if QUADINST_DEBUG)
00036          void printEdge(qelement<Graph>* a, qelement<Graph>* b);
00037          //output the quadratic decomposition (if QUADINST_DEBUG)
00038          void printDecomposition();
00039 
00040    //   protected:
00041          SCIL::CUT<Graph>* scc; //the symbolic cut constraint for separation
00042          //check if the values defined by mapping the fractional solution on the edges are valid
00043          bool checkBounds(subproblem& S);
00044 
00045       public:
00046          //trivial default constructor
00047          nonlinear_inst()
00048             : scc(NULL) {}
00049 
00050          //destructor
00051          ~nonlinear_inst();
00052 
00053          //initialization, derived from sym_constraint
00054          virtual void init(subproblem& S);
00055 
00056          //separation routine, derived from sym_constraint
00057          virtual status standard_separation(subproblem& S);
00058 
00059          //feasibility test, derived from sym_constraint
00060          virtual status feasible(solution& S){};
00061    };
00062 }
00063 #endif
Generated on Mon Mar 28 22:03:49 2011 for SCIL by  doxygen 1.6.3