- Main Page
- Namespaces
- Classes
- Files
- Related Pages

# /Users/fpy/titan-1-5-MBARI/Mers/Solvers/SAT/GATSAT/VsatBfig/VsatBfig.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 //
    00010 //# CHECKED MJP 08-07-2002
    00011
    00012 #ifndef MERS_SOLVERS_SAT_GATSAT_VSATBFIG_VSATBFIG_HEADER_FILE
    00013 #define MERS_SOLVERS_SAT_GATSAT_VSATBFIG_VSATBFIG_HEADER_FILE
    00014
    00015 #include <cstdlib>
    00016 #include <iostream>
    00017
    00018 #include <Mers/Solvers/SAT/GATSAT/GATSAT.h>
    00019 #include <Mers/Utils/Containers/DynamicArrayTemplate.h>
    00020 #include <Mers/Models/CCA/CCATransition.h>
    00021
    00022 #include <vector>
    00023
    00024 namespace Mers {
    00025         namespace Models {
    00026                 namespace Base {
    00027                         class BaseModelVariableArray;
    00028                         class BaseModelSentence;
    00029                         class BaseModelClause;
    00030                 }
    00031                 namespace CCA {
    00032                         class CCAVariables;
    00033                         class CCAModel;
    00034                 }
    00035         }
    00036         namespace Utils {
    00037                 namespace Containers {
    00038                         class IntegerArray;
    00039                 }
    00040         }
    00041         namespace Solvers {
    00042                 namespace SAT {
    00043                         namespace GATSAT {
    00044                                 namespace VsatBfig {
    00045
    00054                                         class VsatBfig : public GATSAT
    00055                                         {
    00056                                         public:
    00057                                                 typedef Mers::Utils::Containers::DynamicArrayTemplate<Mers::Models::Base::BaseModelSentence const> GuardArray;
    00058
    00060                                                 //      CONSTRUCTOR
    00062
    00076                                                 VsatBfig(Mers::Models::CCA::CCAVariables const & designVariables,
    00077                                                                         Mers::Models::CCA::CCAModel const & model,
    00078                                                                         double cutoffCost);
    00079
    00093                                                 VsatBfig(Mers::Models::CCA::CCAVariables const & designVariables,
    00094                                                                         Mers::Models::CCA::CCAModel const & model);
    00095
    00114                                                 VsatBfig(Mers::Models::CCA::CCAVariables const & designVariables,
    00115                                                         Mers::Models::CCA::CCAModel const & model,
    00116                                                         Mers::Models::Base::BaseModelSentence const & constraintSet,
    00117                                                         double cutoffCost);
    00118
    00119
    00135                                                 VsatBfig(Mers::Models::CCA::CCAVariables const & designVariables,
    00136                                                         Mers::Models::CCA::CCAModel const & model,
    00137                                                         Mers::Models::Base::BaseModelSentence const & constraintSet);
    00138
    00146                                                 VsatBfig(Mers::Models::Base::BaseModelVariableArray const & designVariables,
    00147                                                                         Mers::Utils::Containers::IntegerArray const &valueMap,
    00148                                                                         std::vector<double> const & designVarProbs,
    00149                                                                         Mers::Models::Base::BaseModelVariableArray const & allVariables,
    00150                                                                         Mers::Models::Base::BaseModelSentence const & constraintSet,
    00151                                                                         double cutoffCost);
    00152
    00157                                                 VsatBfig(Mers::Models::Base::BaseModelVariableArray const & designVariables,
    00158                                                                         Mers::Utils::Containers::IntegerArray const &valueMap,
    00159                                                                         std::vector<double> const & designVarProbs,
    00160                                                                         Mers::Models::Base::BaseModelVariableArray const & allVariables,
    00161                                                                         Mers::Models::Base::BaseModelSentence const & constraintSet);
    00162
    00170                                                 VsatBfig(Mers::Models::Base::BaseModelVariableArray const & variableSet,
    00171                                                         Mers::Utils::Containers::IntegerArray const &valueMap,
    00172                                                         std::vector<double> const & designVarProbs,
    00173                                                         Mers::Models::Base::BaseModelSentence const & constraintSet,
    00174                                                         double cutoffCost);
    00175
    00180                                                 VsatBfig(Mers::Models::Base::BaseModelVariableArray const & variableSet,
    00181                                                         Mers::Utils::Containers::IntegerArray const &valueMap,
    00182                                                         std::vector<double> const & designVarProbs,
    00183                                                         Mers::Models::Base::BaseModelSentence const & constraintSet);
    00184
    00201                                                 VsatBfig(Mers::Generators::AssignmentGeneratorInterface * myGenerator,
    00202                                                                         Mers::Models::Base::BaseModelVariableArray const & searchVariables,
    00203                                                                         Mers::Models::Base::BaseModelVariableArray const & allVariables,
    00204                                                                         Mers::Models::Base::BaseModelSentence const & constraintSet);
    00205
    00206                                                 ~VsatBfig();
    00207
    00209                                                 //      PUBLIC FUNCTION METHODS
    00211
    00226                                                 void setTemporaryConstraint(Mers::Models::Base::BaseModelClause const * c);
    00227
    00242                                                 void constrainByReachability();
    00243
    00250                                                 void              constrainByNextState();
    00251
    00257                                                 void              clearTemporaryConstraint();
    00258
    00265                                                 void              addConstraint(Mers::Models::Base::BaseModelClause const * c);
    00266
    00267                                                 void              skipExpanding(bool doSkip);
    00268
    00269 #ifndef EMBEDDED
    00270
    00279                                                 friend std::ostream & operator <<(std::ostream &out, VsatBfig const &other);
    00280 #endif
    00281
    00282                                         protected:
    00286                                                 void testTheory();
    00287
    00288
    00289                                         private:
    00291                                                 //      Functions
    00293
    00309                                                 void createBFIG(Mers::Models::CCA::CCAVariables const & designVariables,
    00310                                                         Mers::Models::CCA::CCAModel const & model, double cutoffCost);
    00311
    00324                                                 void createBFIG(Mers::Models::CCA::CCAVariables const & designVariables,
    00325                                                         Mers::Models::CCA::CCAModel const & model);
    00326
    00352                                                 void createBFIG(Mers::Models::Base::BaseModelVariableArray const & designVariables,
    00353                                                         Mers::Models::Base::BaseModelVariableArray const &allVariables,
    00354                                                         Mers::Utils::Containers::IntegerArray const &valueMap,
    00355                                                         std::vector<double> const & probabilities,
    00356                                                         double cutoffCost);
    00357
    00380                                                 void createBFIG(Mers::Models::Base::BaseModelVariableArray const & designVariables,
    00381                                                         Mers::Models::Base::BaseModelVariableArray const &allVariables,
    00382                                                         Mers::Utils::Containers::IntegerArray const &valueMap,
    00383                                                         std::vector<double> const & probabilities);
    00384
    00386                                                 //      PRIVATE DATA MEMBERS
    00388
    00389                                                 bool                   noExpand;
    00390                                         };
    00391                                 }
    00392                         }
    00393                 }
    00394         }
    00395 }
    00396
    00397 #endif //ndef MERS_SOLVERS_SAT_GATSAT_VSATBFIG_VSATBFIG_HEADER_FILE
    00398