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

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

# Mers::Estimation::Discrete::ApproximateBeliefState::BFBSE::BFBSE Class Reference

`#include <BFBSE.h>`

Inheritance diagram for Mers::Estimation::Discrete::ApproximateBeliefState::BFBSE::BFBSE:

[legend]
Collaboration diagram for Mers::Estimation::Discrete::ApproximateBeliefState::BFBSE::BFBSE:

[legend]
List of all members.

## Public Member Functions
| BFBSE (const Mers::Models::CCA::CCAModel &cca, Mers::Estimation::Discrete::Trajectories *initialTrajectories=NULL)
virtual | ~BFBSE ()
## Protected Member Functions
virtual bool | generateTrajectories (void)
virtual bool | calculateEstimateProbability (double &estProbability, const Mers::Models::Base::BaseModelAssignmentArray *state, unsigned int generatorNum, const std::vector< double > &allProbs) const
virtual bool | addEstimate (Mers::Estimation::Discrete::Estimate *theEst, Mers::Estimation::Discrete::EstimateHeap *nextTrajsEstHeap=NULL)

## Detailed Description

The BFBSE is a HHM estimation engine that generates estimates that are consistent with the CCA model, commands, and observations. Estimates are generated in best-first order (highest posterior probability first) by using Opsat to find the most likely diagnoses. This implimentation of ModeEstimator tracks the k most likely estimates in an approximate belief state using the HMM belief state propagation equation in a single Non-MPI OPSAT.

Definition at line 58 of file BFBSE.h.

## Constructor & Destructor Documentation

BFBSE::BFBSE | ( | const Mers::Models::CCA::CCAModel & | cca,
|  | Mers::Estimation::Discrete::Trajectories * | initialTrajectories = `NULL` |
| ) |  |  |

Creates a new ModeEstimator. The core functionality is derived from the ModeEstimatorBase. The only major addition to the base class is the generateTrajectories method using OPSAT to enumerate estimates in best-first order.

Parameters:

  | cca | the complete CCAModel of the system including all variables, domains, transitions, and constraints
  | initialTrajectories | the initial probability distribution across states.

Definition at line 55 of file BFBSE.cpp.

References Mers::Estimation::Discrete::ModeEstimatorBase::decisionVariables, Mers::Utils::Containers::DynamicArray::getLength(), and Mers::Estimation::Discrete::ModeEstimatorBase::objectiveFunction.

Here is the call graph for this function:

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

Destroys the mode estimator

Definition at line 83 of file BFBSE.cpp.

References Mers::Estimation::Discrete::ModeEstimatorBase::objectiveFunction.

## Member Function Documentation

bool BFBSE::generateTrajectories | ( | void |  | ) | `[protected, virtual]`

Calculates the next trajectories using OPSAT

Returns:
  true if successfully generated new trajectories, false otherwise

Reimplemented from Mers::Estimation::Discrete::ModeEstimationPerformance::ModeEstimatorDebug.

Definition at line 102 of file BFBSE.cpp.

References Mers::Estimation::Discrete::ModeEstimatorBase::cleanAfterFailure(), Mers::Estimation::Discrete::ModeEstimatorBase::compiledObjectTrigger, Mers::Estimation::Discrete::ModeEstimatorBase::currentTrajectories, Mers::Estimation::Discrete::ModeEstimatorBase::debug, Mers::Estimation::Discrete::ModeEstimatorBase::decisionVariables, Mers::Estimation::Discrete::ModeEstimationPerformance::ModeEstimatorDebug::findNextBestStateAndPutInHeap(), Mers::Estimation::Discrete::Trajectories::getAccumulatedUncertainty(), Mers::Estimation::Discrete::Trigger::getCurrentCommandObservationValueUID(), Mers::Estimation::Discrete::Trajectories::getEstimate(), Mers::Utils::Containers::DynamicArray::getLength(), Mers::Estimation::Discrete::Trigger::getNormalizedEnabledTransitionProbabilities(), Mers::Estimation::Discrete::Trajectories::getNumberEstimates(), Mers::Estimation::Discrete::Estimate::getProbability(), Mers::Models::CCA::CCAModel::getVariables(), Mers::Estimation::Discrete::ModeEstimation::ModeEstimator::globalConstraints, Mers::Estimation::Discrete::ModeEstimatorBase::maxNumberEstimates, Mers::Estimation::Discrete::ModeEstimation::ModeEstimator::myCCAmodel, Mers::Estimation::Discrete::ModeEstimatorBase::nextTrajectories, Mers::Estimation::Discrete::ModeEstimationPerformance::MEPerformanceMonitor::numEstimatesGenerated, Mers::Estimation::Discrete::ModeEstimatorBase::objectiveFunction, Mers::Estimation::Discrete::ModeEstimation::ModeEstimator::observationVariables, Mers::Estimation::Discrete::ModeEstimation::ModeEstimator::opsats, Mers::Models::Base::BaseModelClauseArray::pushBack(), Mers::Models::Base::BaseModelAssignmentArray::pushBack(), Mers::Estimation::Discrete::ModeEstimationPerformance::ModeEstimatorDebug::releaseMemoryAndNormalize(), Mers::Estimation::Discrete::ModeEstimation::ModeEstimator::setDebug(), Mers::Estimation::Discrete::Trigger::UNDEFINED, and Mers::Estimation::Discrete::MEObjectiveFunction::updateProbabilities().

Here is the call graph for this function:

virtual bool Mers::Estimation::Discrete::ApproximateBeliefState::BFBSE::BFBSE::calculateEstimateProbability | ( | double & | estProbability,
|  | const Mers::Models::Base::BaseModelAssignmentArray * | state,
|  | unsigned int | generatorNum,
|  | const std::vector< double > & | allProbs |
| ) |  |  | const`[protected, virtual]`

This function was designed to only used by findNextBestStateAndPutInHeap. It simply calculates the estimate probability based on the HMM propagation equation. This implementation is only for BFTE and really belongs in a basic BFBSE class.

Parameters:

  | estProbability | the result of the estimate probability is passed back here
  | state | the state for which to calculate the probability for
  | generatorNum | the opsat index from which to generate the next most likely state allProbs the probabilities used to extract the next best state probability

Returns:
  false if there is a major error, true otherwise.

See also:
  findNextBestStateAndPutInHeap

Reimplemented from Mers::Estimation::Discrete::ModeEstimatorBase.

bool BFBSE::addEstimate | ( | Mers::Estimation::Discrete::Estimate * | theEst,
|  | Mers::Estimation::Discrete::EstimateHeap * | nextTrajsEstHeap = `NULL` |
| ) |  |  | `[protected, virtual]`

Simple function that is called by findNextBestStateAndPutInHeap to insert the estimate into the nextTrajectories. This function should really be placed in a general BFBSE class.

Parameters:

  | theEst | the estimate to add to the heap or trajectories
  | nextTrajsEstHeap | the Estimate Heap to add the estimate to. If NULL, the estimate will be placed in nextTrajectories.

Returns:
  true if successful, false otherwise

See also:
  findNextBestStateAndPutInHeap

Reimplemented from Mers::Estimation::Discrete::ModeEstimation::ModeEstimator.

Definition at line 204 of file BFBSE.cpp.

References Mers::Estimation::Discrete::Trajectories::addEstimate(), and Mers::Estimation::Discrete::ModeEstimatorBase::nextTrajectories.

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/ApproximateBeliefState/BFBSE/BFBSE.h
- /Users/fpy/titan-1-5-MBARI/Mers/Estimation/Discrete/ApproximateBeliefState/BFBSE/BFBSE.cpp