Class Atomic

    • Field Detail

      • phase

        protected String phase
        The phase of the atomic model. The phase is used to determine the behavior of the model. Default values can be passive or active.
      • sigma

        protected double sigma
        The time until the next internal transition of the model. The time is used to determine when the model will change its state. The time is set to infinity if the model is passive.
    • Constructor Detail

      • Atomic

        public Atomic​(String name)
        Constructor of the atomic model.
        Parameters:
        name - The name of the atomic model.
      • Atomic

        public Atomic()
        Constructor of the atomic model.
    • Method Detail

      • ta

        public double ta()
        Method to get the time until the next internal transition of the model.
        Returns:
        The time until the next internal transition of the model.
      • deltint

        public abstract void deltint()
        Internal transition method of the atomic model. This method is called when the time until the next internal transition of the model is zero.
      • deltext

        public abstract void deltext​(double e)
        External transition method of the atomic model. This method is called when the model receives an input from another model.
        Parameters:
        e - The time elapsed since the last internal transition of the model.
      • deltcon

        public void deltcon​(double e)
      • lambda

        public abstract void lambda()
        Output function of the atomic model. This method is called when the model has an output to send to another model.
      • resume

        public void resume​(double e)
        Method to updated sigma in the external transition function.
        Parameters:
        e - The time elapsed since the last internal transition of the model.
      • holdIn

        public void holdIn​(String phase,
                           double sigma)
        Method to hold the model in a given phase for a given time.
        Parameters:
        phase - The phase to hold the model in.
        sigma - The time to hold the model in the phase.
      • activate

        public void activate()
        Method to activate the model with sigma 0.
      • passivate

        public void passivate()
        Method to passivate the model with sigma infinity.
      • passivate

        public void passivate​(String phase)
        Method to passivate the model in a given phase.
        Parameters:
        phase - The phase to passivate the model in.
      • passivateIn

        @Deprecated
        public void passivateIn​(String phase)
        Deprecated.
        This method is deprecated. Use passivate(String phase) instead.
        Parameters:
        phase - The phase to passivate the model in.
      • phaseIs

        public boolean phaseIs​(String phase)
        Method to check if the model is in a given phase.
        Parameters:
        phase - The phase to check.
        Returns:
        True if the model is in the given phase, false otherwise.
      • getPhase

        public String getPhase()
        Method to get the phase of the model.
        Returns:
        The phase of the model.
      • setPhase

        public final void setPhase​(String phase)
        Method to set the phase of the model.
        Parameters:
        phase - The phase to set the model to.
      • getSigma

        public double getSigma()
        Method to get the time until the next internal transition of the model.
        Returns:
        The time until the next internal transition of the model.
      • setSigma

        public final void setSigma​(double sigma)
        Method to set the time until the next internal transition of the model.
        Parameters:
        sigma - The time until the next internal transition of the model.
      • showState

        public String showState()
        Method to get the state of the model.
        Returns:
        The state of the model.
      • toXml

        public String toXml()
        Method to get the XML representation of the model.
        Specified by:
        toXml in class Component
        Returns:
        The XML representation of the model.