/Users/fpy/titan-1-5-MBARI/Mers/Solvers/SAT/AssignmentTesterInterface.h

00001 
00002 //
00003 // Copyright (c) 2004           Model-based Embedded and Robotic Systems Group
00004 // All Rights Reserved          Massachusetts Institute of Technology
00005 //
00006 // This software is provided as is. Model-based Embedded and Robotic Systems
00007 // (MERS) group does not assume any responsibility.
00008 //
00009 // Organization:        Model-based Embedded and Robotic Systems Group
00010 //                                      Massachusetts Institute of Technology
00011 //
00013 
00014 #if !defined(AFX_ASSIGNMENTTESTERINTERFACE_H__7250C254_3DF8_4319_80C7_C0578120E3A5__INCLUDED_)
00015 #define AFX_ASSIGNMENTTESTERINTERFACE_H__7250C254_3DF8_4319_80C7_C0578120E3A5__INCLUDED_
00016 
00017 #if _MSC_VER > 1000
00018 #pragma once
00019 #endif // _MSC_VER > 1000
00020 
00021 namespace Mers {
00022         namespace Models {
00023                 namespace Base {
00024                         class BaseModelAssignmentArray;
00025                         class BaseModelClause;
00026                 }
00027         }
00028 }
00029 
00030 namespace Mers {
00031         namespace Solvers {
00032                 namespace SAT {
00033 
00044                         class AssignmentTesterInterface  
00045                         {
00046                         public:
00049                                 enum SolutionType {Unsatisfiable, Satisfiable, Valid};
00050 
00052                                 // Constructors
00054 
00055                                 AssignmentTesterInterface()
00056                                 {
00057                                         debug = 0;
00058                                 }
00059 
00061                                 // Destructors
00063 
00064                                 virtual ~AssignmentTesterInterface()
00065                                 {
00066                                 }
00067 
00069                                 // Functions
00071 
00079                                 virtual void addConstraint(Mers::Models::Base::BaseModelClause const * constraint) = 0;
00080 
00088                                 virtual void addTemporaryConstraint(Mers::Models::Base::BaseModelClause const * constraint) = 0;
00089         
00098                                 virtual void setTemporaryConstraint(Mers::Models::Base::BaseModelClause const * constraint) = 0;
00099         
00103                                 virtual void clearTemporaryConstraint() = 0;
00104 
00130                                 virtual SolutionType tryAssignment(
00131                                         Mers::Models::Base::BaseModelAssignmentArray const * candidate, int group, bool satisfy, 
00132                                         Mers::Models::Base::BaseModelAssignmentArray &conflict) = 0;
00133 
00140                                 virtual void printStatistics(bool verbose = false) const = 0;
00141 
00146                                 virtual double getNumberOfSteps() const = 0;
00147 
00153                                 virtual void setDebug(unsigned int state)
00154                                 {
00155                                         debug = state;
00156                                 }
00157 
00158                         protected:
00159                                 unsigned int debug;
00160                         };
00161                 }
00162         }
00163 }
00164 
00165 #endif // !defined(AFX_ASSIGNMENTTESTERINTERFACE_H__7250C254_3DF8_4319_80C7_C0578120E3A5__INCLUDED_)

Generated on Mon Dec 4 14:16:57 2006 for Mers by  doxygen 1.5.0