A process model that switches between modes: a Markov chain on a discrete mode space, and the process model each mode follows [switching-models].
More...
|
|
| SwitchingModel (ChainType chain, Models... models) |
| | The chain chain on the modes, and models, one per value of the axis Path_ (one shared by every mode if there is only one and Path_ is the mode space).
|
template<typename... Others>
requires ( sizeof...(Others) == sizeof...(Models) && !(std::is_same_v<Others, Models> && ...) && (std::is_convertible_v<Others
const &, Models> && ...) ) |
| | SwitchingModel (SwitchingModel< ModeSpace_, Scalar_, Path_, Others... > const &other) |
| | other with each of its models converted to this one's: how a filter binds a switching model of fixedStep() results to its state's space.
|
| ChainType const & | chain () const |
| ChainType & | chain () |
| ModeSpace_ const & | modeSpace () const |
| template<std::size_t I> |
| auto const & | model () const |
| template<std::size_t I> |
| auto & | model () |
| std::size_t | modelIndex (Eigen::Index mode) const |
| template<typename F> |
| decltype(auto) | visit (Eigen::Index mode, F &&f) const |
| template<typename Fallback, typename F> |
| decltype(auto) | visit (Eigen::Index mode, Fallback const &fallback, F &&f) const |
| template<typename Space> |
| bool | partitions (Space const &space) const |
template<DiscreteSpace ModeSpace_, RealScalar Scalar_, typename Path_, typename... Models>
class Emrys::SwitchingModel< ModeSpace_, Scalar_, Path_, Models >
A process model that switches between modes: a Markov chain on a discrete mode space, and the process model each mode follows [switching-models].
Each model is a process model over the whole state (see ProcessModel), and every mode shares the state space; a mode that doesn't use a block holds it. There are three ways to assign models to modes:
- one model per mode, in flat-index order: SwitchingModel{chain, cruise, turn};
- one model per value of one axis of the mode space, when the others (such as a sensor's inlier/outlier state) don't affect the dynamics: switchingModel<Maneuver>(chain, cruise, turn);
- one model shared by every mode, when only the measurements depend on the mode: SwitchingModel{chain, model}.
The chain moves the mode once per prediction, whatever its time step.
Each mode predicts by the filter's method, unless its model carries a method of its own: a model given to withMethod() does, so that a constant-velocity mode, affine and exact under Linearized, need not run through the sigma points a coordinated-turn mode beside it takes.
The models are all FixedStepModel over one step or none are. With fixed-step models the switching model is fixed-step too (isFixedStep), its filter's predict() takes no time step and no method, and each mode predicts by its own model's method, which may differ from mode to mode. Models made by fixedStep(model, dt), not yet bound to a space, are bound to the state's space by the filter given the switching model.
The Markovian switching of Blom and Bar-Shalom (1988): a jump Markov linear system whose mode selects the dynamics.
- Template Parameters
-
| ModeSpace_ | the discrete mode space (see Discrete spaces) |
| Scalar_ | scalar type of the chain's probabilities |
| Path_ | the mode axis that selects the model, as a tag or TagPath; the whole mode space when it is ModeSpace_ itself |
| Models | the process models, in the order of the axis's values, each of which may be a ModelWithMethod |
- See also
- ImmFilter, MarkovChain, processModel(), withMethod()
template<DiscreteSpace ModeSpace_, RealScalar Scalar_, typename Path_, typename... Models>
template<typename... Others>
requires ( sizeof...(Others) == sizeof...(Models) && !(std::is_same_v<Others, Models> && ...) && (std::is_convertible_v<Others
const &, Models> && ...) )
| Emrys::SwitchingModel< ModeSpace_, Scalar_, Path_, Models >::SwitchingModel |
( |
SwitchingModel< ModeSpace_, Scalar_, Path_, Others... > const & | other | ) |
|
|
inline |
other with each of its models converted to this one's: how a filter binds a switching model of fixedStep() results to its state's space.
Implicit, as FixedStepModel's is, so that a filter's constructor takes the switching model where its deduction guide names this type.