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

# /Users/fpy/titan-1-5-MBARI/Mers/Estimation/Discrete/ModeEstimationPerformance/Monitor/MEPerformanceMonitor.h

    00001 //=============================================================================
    00002 // MEPerformanceMonitor.h: interface for the MEPerformanceMonitor class.
    00003 //
    00004 // Copyright (c) 2004           Model-based Embedded and Robotic Systems Group
    00005 // All Rights Reserved          Massachusetts Institute of Technology
    00006 //
    00007 // This software is provided as is. Model-based Embedded and Robotic Systems
    00008 // (MERS) group does not assume any responsibility.
    00009 //
    00010 // Author:                      Oliver B. Martin
    00011 // Organization:                Model-based Embedded and Robotic Systems Group
    00012 //                              Massachusetts Institute of Technology
    00013 //
    00014 // The MEPerformanceMonitor class was designed as a common class in which to
    00015 // collect and store mode estimation performace data. It is inhereted by the ME
    00016 // Debug classes and should never be used in a release version of ME.
    00017 //
    00018 //=============================================================================
    00019
    00020
    00021 #if !defined(_MEPERFORMANCEMONITOR_H_)
    00022 #define _MEPERFORMANCEMONITOR_H_
    00023
    00024 #if _MSC_VER > 1000
    00025 #pragma once
    00026 #endif // _MSC_VER > 1000
    00027
    00028 //#include <Mers/Estimation/Discrete/ModeEstimation/ModeEstimator.h>
    00029
    00030 #include <vector>
    00031 #include <map>
    00032
    00033 namespace Mers {
    00034         namespace Models {
    00035                 namespace CCA {
    00036                         class CCAModel;
    00037                 }
    00038         }
    00039         namespace Generators {
    00040                 namespace BFIG {
    00041                         class BFIGGenerator;
    00042                 }
    00043         }
    00044         namespace Solvers{
    00045                 namespace SAT {
    00046                         namespace GATSAT {
    00047                                 namespace OpSAT {
    00048                                         class Opsat;
    00049                                 }
    00050                         }
    00051                 }
    00052         }
    00053         namespace Estimation {
    00054                 namespace Discrete {
    00055                                 class Estimate;
    00056                                 class Trajectories;
    00057                                 class MEObjectiveFunction;
    00058
    00059                         namespace ModeEstimationPerformance {
    00060
    00066                                 class MEPerformanceMonitor
    00067                                 {
    00068
    00069                                 public:
    00070                                         //-----------------------------------------
    00071                                         // Constructors
    00072                                         //-----------------------------------------
    00073
    00077                                         MEPerformanceMonitor();
    00078
    00079
    00080                                         //-----------------------------------------
    00081                                         // Destructors
    00082                                         //-----------------------------------------
    00083
    00087                                         virtual ~MEPerformanceMonitor();
    00088
    00089
    00090                                         //-----------------------------------------
    00091                                         // Functions
    00092                                         //-----------------------------------------
    00093
    00098                                         void gatherEstimationCycleResults(std::vector<Mers::Generators::BFIG::BFIGGenerator *> & bfigs);
    00099
    00105                                         void gatherEstimationCycleResults(std::vector<Mers::Solvers::SAT::GATSAT::OpSAT::Opsat *> & opsats);
    00106
    00108                                         virtual unsigned int    getNumConflictsGenerated(void) const;
    00109
    00118                                         unsigned int    getNumberFaultTransitions( const Mers::Estimation::Discrete::Trajectories * nextTrajs,
    00119                                                                                 const Mers::Estimation::Discrete::Trajectories * currentTrajs,
    00120                                                                                 const Mers::Models::CCA::CCAModel & cca) const;
    00121
    00129                                         virtual unsigned int getNumberFaultTransitions(void) = 0;
    00130
    00141                                         unsigned int    getEstimateFaultTransitions( unsigned int estNum,
    00142                                                                                 const Mers::Estimation::Discrete::Trajectories * nextTrajs,
    00143                                                                                 const Mers::Estimation::Discrete::Trajectories * currentTrajs,
    00144                                                                                 const Mers::Models::CCA::CCAModel & cca ) const;
    00145
    00157                                         virtual unsigned int    getEstimateFaultTransitions(unsigned int estIndex) = 0;
    00158
    00159                                         virtual double                  getAccumulatedUncertainty(void) const = 0;
    00160
    00162                                         unsigned int                    getNumEstimatesGenerated(void) const;
    00163                                         unsigned int                    getNumElementsExpanded(void) const;
    00164                                         unsigned int                    getMaxQueueSize(void) const;
    00165                                         unsigned int                    getNumCandidatesGenerated(void) const;
    00166
    00167                                 protected:
    00168
    00178                                         void            adjustUncertaintyForNewEstimate(Mers::Estimation::Discrete::Estimate * anEst,
    00179                                                                                                                                 bool createNewCurrentTrajectories = false);
    00180
    00189                                         double          computeAccumulatedBeliefStateUncertainty(
    00190                                                                                                                 Mers::Estimation::Discrete::MEObjectiveFunction * objectiveFunction,
    00191                                                                                                                 const Trajectories * nextTrajectories ) const;
    00192
    00201                                         void            progressPriorCurrentStateProbs(
    00202                                                                                                                 Mers::Estimation::Discrete::MEObjectiveFunction * objectiveFunction,
    00203                                                                                                                 const Trajectories * nextTrajectories );
    00204
    00216                                         std::map<unsigned int, double>
    00217                                                                 getPriorNextStateProbs( Mers::Estimation::Discrete::MEObjectiveFunction * objectiveFunction,
    00218                                                                                                                 const Trajectories * nextTrajectories ) const;
    00219
    00220
    00221                                         //-----------------------------------------
    00222                                         // Data Members
    00223                                         //-----------------------------------------
    00224
    00226
    00228                                         unsigned int                            numConflictsGenerated;
    00229
    00231                                         unsigned int                            numEstimatesGenerated;
    00232
    00234                                         unsigned int                            maxQueueSizeInBFIG;
    00235
    00237                                         unsigned int                            numElementsExpanded;
    00238
    00240                                         unsigned int                            numElementsPreviouslyExpanded;
    00241
    00243                                         unsigned int                            numCandidatesGenerated;
    00244
    00246                                         std::map<unsigned int, double>          currentStateProbsWithoutNormalization;
    00247                                 };
    00248                         }
    00249                 }
    00250         }
    00251 }
    00252
    00253 #endif // !defined(_MEPERFORMANCEMONITOR_H_)