Package jline.lang

Class Event

  • All Implemented Interfaces:
    java.io.Serializable

    
    public class Event
     implements Serializable
                        

    Class abstracting an event within a Network model

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      EventType getEvent() Gets the type of this event.
      void setEvent(EventType event) Sets the type of this event.
      double getJob() Gets the job identifier associated with this event.
      void setJob(double job) Sets the job identifier for this event.
      int getJobClass() Gets the job class index associated with this event.
      void setJobClass(int jobclass) Sets the job class index for this event.
      int getNode() Gets the node index where this event occurred.
      void setNode(int node) Sets the node index where this event occurred.
      double getProb(Pair<Map<Node, Matrix>, Map<Node, Matrix>> state) Computes the probability of this event using the probability function and current system state.
      double getProb() Gets the fixed probability value for this event.
      void setProb(double prob) Sets the fixed probability value for this event.
      SerializableFunction<Pair<Map<Node, Matrix>, Map<Node, Matrix>>, Double> getProbFun() Gets the probability function used to dynamically compute event probability.
      void setProbFun(SerializableFunction<Pair<Map<Node, Matrix>, Map<Node, Matrix>>, Double> probFun) Sets the probability function to dynamically compute event probability based on system state.
      Matrix getState() Gets the system state matrix when this event occurred.
      void setState(Matrix state) Sets the system state matrix for this event.
      double getT() Gets the time when this event occurred.
      void setT(double t) Sets the time when this event occurred.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • Event

        Event(EventType event, int node, int jobclass)
        Creates a new Event with basic parameters.
        Parameters:
        event - the type of event that occurred
        node - the node index where the event occurred
        jobclass - the job class index associated with the event
      • Event

        Event(EventType event, int node, int jobclass, double prob, Matrix state, double t, double job)
        Creates a new Event with all basic parameters specified.
        Parameters:
        event - the type of event that occurred
        node - the node index where the event occurred
        jobclass - the job class index associated with the event
        prob - the probability associated with this event
        state - the system state matrix when this event occurred
        t - the time when this event occurred
        job - the job identifier associated with this event
      • Event

        Event(EventType event, int node, int jobclass, SerializableFunction<Pair<Map<Node, Matrix>, Map<Node, Matrix>>, Double> probFun, Matrix state, double t, double job)
        Creates a new Event where probability is determined by a function of system state.
        Parameters:
        event - the type of event that occurred
        node - the node index where the event occurred
        jobclass - the job class index associated with the event
        probFun - function that computes probability based on current system state
        state - the system state matrix when this event occurred
        t - the time when this event occurred
        job - the job identifier associated with this event
    • Method Detail

      • setEvent

         void setEvent(EventType event)

        Sets the type of this event.

        Parameters:
        event - the new event type
      • getJob

         double getJob()

        Gets the job identifier associated with this event.

        Returns:

        the job identifier, or NaN if not set

      • setJob

         void setJob(double job)

        Sets the job identifier for this event.

        Parameters:
        job - the job identifier
      • getJobClass

         int getJobClass()

        Gets the job class index associated with this event.

        Returns:

        the job class index

      • setJobClass

         void setJobClass(int jobclass)

        Sets the job class index for this event.

        Parameters:
        jobclass - the job class index
      • getNode

         int getNode()

        Gets the node index where this event occurred.

        Returns:

        the node index

      • setNode

         void setNode(int node)

        Sets the node index where this event occurred.

        Parameters:
        node - the node index
      • getProb

         double getProb(Pair<Map<Node, Matrix>, Map<Node, Matrix>> state)

        Computes the probability of this event using the probability function and current system state. This method requires that a probability function was set during construction.

        Parameters:
        state - the current system state as a pair of node-to-matrix mappings
        Returns:

        the computed probability

      • getProb

         double getProb()

        Gets the fixed probability value for this event.

        Returns:

        the probability, or NaN if not set or if using a probability function

      • setProb

         void setProb(double prob)

        Sets the fixed probability value for this event.

        Parameters:
        prob - the probability value
      • getState

         Matrix getState()

        Gets the system state matrix when this event occurred.

        Returns:

        the state matrix, or empty matrix if not set

      • setState

         void setState(Matrix state)

        Sets the system state matrix for this event.

        Parameters:
        state - the system state matrix
      • getT

         double getT()

        Gets the time when this event occurred.

        Returns:

        the event time, or NaN if not set

      • setT

         void setT(double t)

        Sets the time when this event occurred.

        Parameters:
        t - the event time