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

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# Mers::Estimation::Discrete::ModeEstimationPerformance::MEPerformanceMonitor Class Reference

`#include <MEPerformanceMonitor.h>`

Inheritance diagram for Mers::Estimation::Discrete::ModeEstimationPerformance::MEPerformanceMonitor:

[legend]
List of all members.

## Public Member Functions
| MEPerformanceMonitor ()
virtual | ~MEPerformanceMonitor ()
void | gatherEstimationCycleResults (std::vector< Mers::Generators::BFIG::BFIGGenerator * > &bfigs)
void | gatherEstimationCycleResults (std::vector< Mers::Solvers::SAT::GATSAT::OpSAT::Opsat * > &opsats)
virtual unsigned int | getNumConflictsGenerated (void) const
| For time requirements testing.
unsigned int | getNumberFaultTransitions (const Mers::Estimation::Discrete::Trajectories *nextTrajs, const Mers::Estimation::Discrete::Trajectories *currentTrajs, const Mers::Models::CCA::CCAModel &cca) const
virtual unsigned int | getNumberFaultTransitions (void)=0
unsigned int | getEstimateFaultTransitions (unsigned int estNum, const Mers::Estimation::Discrete::Trajectories *nextTrajs, const Mers::Estimation::Discrete::Trajectories *currentTrajs, const Mers::Models::CCA::CCAModel &cca) const
virtual unsigned int | getEstimateFaultTransitions (unsigned int estIndex)=0
virtual double | getAccumulatedUncertainty (void) const =0
unsigned int | getNumEstimatesGenerated (void) const
| Data access functions.
unsigned int | getNumElementsExpanded (void) const
unsigned int | getMaxQueueSize (void) const
unsigned int | getNumCandidatesGenerated (void) const
## Protected Member Functions
void | adjustUncertaintyForNewEstimate (Mers::Estimation::Discrete::Estimate *anEst, bool createNewCurrentTrajectories=false)
double | computeAccumulatedBeliefStateUncertainty (Mers::Estimation::Discrete::MEObjectiveFunction *objectiveFunction, const Trajectories *nextTrajectories) const
void | progressPriorCurrentStateProbs (Mers::Estimation::Discrete::MEObjectiveFunction *objectiveFunction, const Trajectories *nextTrajectories)
std::map< unsigned int, double > | getPriorNextStateProbs (Mers::Estimation::Discrete::MEObjectiveFunction *objectiveFunction, const Trajectories *nextTrajectories) const
## Protected Attributes
unsigned int | numConflictsGenerated
| One value for each opsat instantiaion.
unsigned int | numEstimatesGenerated
| The total number of estimates generated to get the k trajectories.
unsigned int | maxQueueSizeInBFIG
| The max queue size of BFIG during the estimate generation process.
unsigned int | numElementsExpanded
| The total number of elements expanded by all the opsat bfigs.
unsigned int | numElementsPreviouslyExpanded
| The total number of elements expanded over time.
unsigned int | numCandidatesGenerated
| The number of candidates generated by BFIG for all opsat instances.
std::map< unsigned int, double > | currentStateProbsWithoutNormalization
| The current prior state probabilities without any normalization.

## Detailed Description

The MEPerformanceMonitor class was designed as a common class in which to collect and store mode estimation performace data. It is inhereted by the ME Debug classes and should never be used in a release version of ME.

Definition at line 66 of file MEPerformanceMonitor.h.

## Constructor & Destructor Documentation

MEPerformanceMonitor::MEPerformanceMonitor | ( |  | ) |

Creates a new ModeEstimator Performance Monitor. Used to gather data for performance testing.

Definition at line 46 of file MEPerformanceMonitor.cpp.

References maxQueueSizeInBFIG, numCandidatesGenerated, numConflictsGenerated, numElementsExpanded, numElementsPreviouslyExpanded, and numEstimatesGenerated.

MEPerformanceMonitor::~MEPerformanceMonitor | ( |  | ) | `[virtual]`

Destroys the mode estimator

Definition at line 62 of file MEPerformanceMonitor.cpp.

## Member Function Documentation

void Mers::Estimation::Discrete::ModeEstimationPerformance::MEPerformanceMonitor::gatherEstimationCycleResults | ( | std::vector< Mers::Generators::BFIG::BFIGGenerator * > & | bfigs | ) |

Used to gether the estimation performance results from the set of BFIGs

Parameters:

  | bfigs | a set of bfigs that were used to generate set of next most likely trajectories

Referenced by Mers::Estimation::Discrete::ModeEstimationPerformance::ModeEstimatorDebug::releaseMemoryAndNormalize(), and Mers::Estimation::Discrete::CompiledME::CompiledMEDebug::CBFTEDebug::releaseMemoryAndNormalize().

void Mers::Estimation::Discrete::ModeEstimationPerformance::MEPerformanceMonitor::gatherEstimationCycleResults | ( | std::vector< Mers::Solvers::SAT::GATSAT::OpSAT::Opsat * > & | opsats | ) |

Converts the vector of opsats to a vector of bfigs and passes it to gatherEstimationCycleResults

Parameters:

  | opsats | to be converted to bfigs

unsigned int MEPerformanceMonitor::getNumberFaultTransitions | ( | const Mers::Estimation::Discrete::Trajectories * | nextTrajs,
|  | const Mers::Estimation::Discrete::Trajectories * | currentTrajs,
|  | const Mers::Models::CCA::CCAModel & | cca |
| ) |  |  | const

Determines the total number of component fault transitions into all states in nextTrajs from currentTrajs. A fault transition is defined as a transition from a nominal mode to a fault mode.

Parameters:

  | nextTrajs | the next set of estimates
  | currentTrajs | the current set of estimates from which to count the number of fault transitions

Returns:
  the total number of fault transitions from currentTrajs into nextTrajs

See also:
  getEstimateFaultTransitions

Definition at line 155 of file MEPerformanceMonitor.cpp.

References getEstimateFaultTransitions(), and Mers::Estimation::Discrete::Trajectories::getNumberEstimates().

Here is the call graph for this function:

virtual unsigned int Mers::Estimation::Discrete::ModeEstimationPerformance::MEPerformanceMonitor::getNumberFaultTransitions | ( | void |  | ) | `[pure virtual]`

Interface function that calls MEPerformanceMonitor::getNumberFaultTransitions.

Returns:
  the number of component fault transitions from the current trajectories to the next trajectories.

Implemented in Mers::Estimation::Discrete::CompiledME::CompiledMEDebug::CBFTEDebug, and Mers::Estimation::Discrete::ModeEstimationPerformance::ModeEstimatorDebug.

Referenced by Mers::Estimation::Discrete::ModeEstimationPerformance::ModeEstimatorDebug::getNumberFaultTransitions().

unsigned int MEPerformanceMonitor::getEstimateFaultTransitions | ( | unsigned int | estNum,
|  | const Mers::Estimation::Discrete::Trajectories * | nextTrajs,
|  | const Mers::Estimation::Discrete::Trajectories * | currentTrajs,
|  | const Mers::Models::CCA::CCAModel & | cca |
| ) |  |  | const

Determines the number of component fault transitions into state estNum in nextTrajs from currentTrajs. A fault transition is defined as a transition from a nominal mode to a fault mode. NOTE: This function currently only works for the trajectories implementation (BFTE) and not approximate belief state (BFBSE).

Parameters:

  | estNum | the estimate index within nextTrajs to determine the number of fault transitions for.
  | nextTrajs | the next set of estimates
  | currentTrajs | the current set of estimates from which to count the number of fault transitions

Returns:
  the number of fault transitions into state estNum in nextTrajs

Definition at line 175 of file MEPerformanceMonitor.cpp.

References Mers::Models::CCA::CCAModel::automaton_p(), Mers::Estimation::Discrete::Estimate::getAssignment(), Mers::Estimation::Discrete::Estimate::getComponentAssignments(), Mers::Estimation::Discrete::Trajectories::getEstimate(), Mers::Utils::Containers::DynamicArray::getLength(), Mers::Estimation::Discrete::Trajectories::getNumberEstimates(), Mers::Estimation::Discrete::Estimate::getOriginatedTrajectoryNumber(), Mers::Models::Base::BaseModelAssignment::getValue(), Mers::Models::Base::BaseModelAssignment::getVariable(), Mers::Utils::Containers::IntegerArray::pushBack(), and Mers::Utils::Containers::DynamicArray::size().

Referenced by Mers::Estimation::Discrete::ModeEstimationPerformance::ModeEstimatorDebug::getEstimateFaultTransitions(), and getNumberFaultTransitions().

Here is the call graph for this function:

virtual unsigned int Mers::Estimation::Discrete::ModeEstimationPerformance::MEPerformanceMonitor::getEstimateFaultTransitions | ( | unsigned int | estIndex | ) | `[pure virtual]`

Interface function that calls MEPerformanceMonitor::getEstimateFaultTransitions.

Parameters:

  | estIndex | the estimate index number in nextTrajectories to determine the number of fault transitions for.

Returns:
  the number of component fault transitions when transitioning into estIndex.

Implemented in Mers::Estimation::Discrete::CompiledME::CompiledMEDebug::CBFTEDebug, and Mers::Estimation::Discrete::ModeEstimationPerformance::ModeEstimatorDebug.

void MEPerformanceMonitor::adjustUncertaintyForNewEstimate | ( | Mers::Estimation::Discrete::Estimate * | anEst,
|  | bool | createNewCurrentTrajectories = `false` |
| ) |  |  | `[protected]`

This function adjusts currentStateProbsWithoutNormalization based on a new estimate being provided. It's assumed that this function only gets called when a belief state is manually inserted and not estimated using ME. If createNewCurrentTrajectories is true, currentStateProbsWithoutNormalization is cleared and the first element is set to the state probability.

Parameters:

  | anEst | the estimate to add to the currentTrajectories
  | createNewCurrentTrajectories | clears currentStateProbsWithoutNormalization if true.

Definition at line 134 of file MEPerformanceMonitor.cpp.

References currentStateProbsWithoutNormalization, and Mers::Estimation::Discrete::Estimate::getProbability().

Referenced by Mers::Estimation::Discrete::ModeEstimationPerformance::ModeEstimatorDebug::addEstimateToCurrentTrajectories().

Here is the call graph for this function:

double MEPerformanceMonitor::computeAccumulatedBeliefStateUncertainty | ( | Mers::Estimation::Discrete::MEObjectiveFunction * | objectiveFunction,
|  | const Trajectories * | nextTrajectories |
| ) |  |  | const`[protected]`

This function simply calls getPriorNextStateProbs to determine the amount of enumerated probability space for the next set of estimates and then returns 1 minus that value

Parameters:

  | objectiveFunction | the objective function to use to compute the prior probabilities for the next states. It's assumed that all the transition probabilities are already set in the objective function.
  | nextTrajectories | the set of states for which to generate the prior probabilities for.

Definition at line 241 of file MEPerformanceMonitor.cpp.

References getPriorNextStateProbs(), and map< _Key, _Tp, _Compare, _Alloc >::size().

Referenced by Mers::Estimation::Discrete::ModeEstimationPerformance::ModeEstimatorDebug::getAccumulatedUncertainty().

Here is the call graph for this function:

void MEPerformanceMonitor::progressPriorCurrentStateProbs | ( | Mers::Estimation::Discrete::MEObjectiveFunction * | objectiveFunction,
|  | const Trajectories * | nextTrajectories |
| ) |  |  | `[protected]`

This function simply calls getPriorNextStateProbs and sets currentStateProbsWithoutNormalization to the value it returns

Parameters:

  | objectiveFunction | the objective function to use to compute the prior probabilities for the next states. It's assumed that all the transition probabilities are already set in the objective function.
  | nextTrajectories | the set of states for which to generate the prior probabilities for.

Definition at line 255 of file MEPerformanceMonitor.cpp.

References currentStateProbsWithoutNormalization, and getPriorNextStateProbs().

Referenced by Mers::Estimation::Discrete::ModeEstimationPerformance::ModeEstimatorDebug::progressToEstimate().

Here is the call graph for this function:

map< unsigned int, double > MEPerformanceMonitor::getPriorNextStateProbs | ( | Mers::Estimation::Discrete::MEObjectiveFunction * | objectiveFunction,
|  | const Trajectories * | nextTrajectories |
| ) |  |  | const`[protected]`

This function is used to compute the prior next belief state probabilities. This is done by inserting the prior current belief state probabilities into the objective function and then recomputing the probabilities for the generated states. This function is used to help keep track of the amount of unenumerated belief state probability space over time.

Parameters:

  | objectiveFunction | the objective function to use to compute the prior probabilities for the next states. It's assumed that all the transition probabilities are already set in the objective function.
  | nextTrajectories | the set of states for which to generate the prior probabilities for.

Returns:
  a mapping from state index to the prior probability for that state

Definition at line 264 of file MEPerformanceMonitor.cpp.

References Mers::Estimation::Discrete::MEObjectiveFunction::calculatePropagationUtility(), currentStateProbsWithoutNormalization, Mers::Estimation::Discrete::Estimate::getComponentAssignments(), Mers::Estimation::Discrete::Trajectories::getEstimate(), Mers::Estimation::Discrete::Trajectories::getNumberEstimates(), Mers::Estimation::Discrete::Estimate::getOriginatedTrajectoryNumber(), and Mers::Estimation::Discrete::MEObjectiveFunction::updateStateProbabilities().

Referenced by computeAccumulatedBeliefStateUncertainty(), and progressPriorCurrentStateProbs().

Here is the call graph for this function:

The documentation for this class was generated from the following files:

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