Class HSMMGenerator

    • Field Detail

      • durationPriors

        public PortParameter durationPriors
        The user-provided initial guess on the prior probability distribution.
      • durationProbabilities

        public PortParameter durationProbabilities
        The user-provided initial guess on the prior probability distribution.
      • transitionMatrix

        public PortParameter transitionMatrix
        Transition Probability matrix estimate.
      • statePriors

        public PortParameter statePriors
        Prior state distribution.
      • trigger

        public TypedIOPort trigger
        Trigger generation.
      • observation

        public TypedIOPort observation
        Output port for observation array.
      • hiddenState

        public TypedIOPort hiddenState
        Output port for corresponding state sequence.
      • windowSize

        public Parameter windowSize
        Generation window size.
      • powerUpperBound

        public PortParameter powerUpperBound
        Power limit on generation window.
      • _durationPriors

        protected double[] _durationPriors
        Duration priors: an nStates-by-nDurations matrix.
      • D_new

        protected double[][] D_new
        new duration distribution.
      • _D0

        protected double[][] _D0
        initial duration distribution.
      • _D

        protected double[][] _D
        current duration distribution.
      • _x0

        protected double[] _x0
        maximum duration ( in time steps).
      • _A

        protected double[][] _A
        Cached transition matrix value.
      • _firstIteration

        protected boolean _firstIteration
        Boolean indicating the first iteration of the generator.
      • _nStates

        protected int _nStates
        Cardinality of state space.
      • _maxDuration

        protected int _maxDuration
        Cardinality of the support of duration distribution.
      • _dt

        protected int _dt
        Duration variable: d(t).
      • _xt

        protected int _xt
        State variable: x(t).
      • _windowSize

        protected int _windowSize
        Generation window size.
      • MAX_TRIALS

        protected static int MAX_TRIALS
        In the presence of window-based constraints, number of runs allowable until valid trace found.
    • Method Detail

      • preinitialize

        public void preinitialize()
                           throws IllegalActionException
        Description copied from class: AtomicActor
        Create receivers and declare delay dependencies. Derived classes can override this method to perform additional initialization functions, but they should call this base class methods or create the receivers themselves. This method gets executed exactly once prior to any other action methods. It cannot produce output data since type resolution is typically not yet done. It also gets invoked prior to any static scheduling that might occur in the domain, so it can change scheduling information.
        Specified by:
        preinitialize in interface Initializable
        Overrides:
        preinitialize in class AtomicActor<TypedIOPort>
        Throws:
        IllegalActionException - Not thrown in this base class.
      • attributeChanged

        public void attributeChanged​(Attribute attribute)
                              throws IllegalActionException
        Description copied from class: NamedObj
        React to a change in an attribute. This method is called by a contained attribute when its value changes. In this base class, the method does nothing. In derived classes, this method may throw an exception, indicating that the new attribute value is invalid. It is up to the caller to restore the attribute to a valid value if an exception is thrown.
        Overrides:
        attributeChanged in class NamedObj
        Parameters:
        attribute - The attribute that changed.
        Throws:
        IllegalActionException - If the change is not acceptable to this container (not thrown in this base class).
      • _sampleObservation

        protected abstract double[] _sampleObservation()
        Sample an observation value given current state.
        Returns:
        Observation
      • _sampleDurationForState

        protected abstract int _sampleDurationForState()
        Sample a duration value given current state.
        Returns:
        Duration
      • _sampleHiddenStateFromPrior

        protected abstract int _sampleHiddenStateFromPrior()
        Sample state at this iteration from the state prior.
        Returns:
        The hidden state at this iteration
      • _sampleDurationFromPrior

        protected abstract int _sampleDurationFromPrior()
        Sample duration value from prior duration distribution.
        Returns:
        sampled duration value