Class Transducer


  • public class Transducer
    extends Atomic
    Transducer The transducer collects statistics about the jobs. It also finishes the simulation when the observation time is reached.
    • Field Detail

      • iArrived

        public Port<Job> iArrived
        Input port for arrived jobs.
      • iSolved

        public Port<Job> iSolved
        Input port for solved jobs.
      • oOut

        public Port<Job> oOut
        Output port to finish the simulation.
      • jobsArrived

        protected LinkedList<Job> jobsArrived
        Jobs arrived.
      • jobsSolved

        protected LinkedList<Job> jobsSolved
        Jobs processed.
      • observationTime

        protected double observationTime
        Observation time before finishing the simulation.
      • totalTa

        protected double totalTa
        Total time consumed by the jobs.
      • clock

        protected double clock
        Internal clock.
    • Constructor Detail

      • Transducer

        public Transducer​(String name,
                          double observationTime)
        Constructor
        Parameters:
        name - Transducer name
        observationTime - Observation time
      • Transducer

        public Transducer​(Element xmlAtomic)
        Constructor from XML
        Parameters:
        xmlAtomic - XML element
    • Method Detail

      • initialize

        public void initialize()
        Description copied from class: Component
        Initialize the component. The initialize method is called when the simulation starts. The initialize method is used to initialize the component before the simulation starts.
        Specified by:
        initialize in class Component
      • exit

        public void exit()
        Description copied from class: Component
        Exit function. The exit function is called when the simulation ends. The exit function is used to release resources used by the component.
        Specified by:
        exit in class Component
      • deltint

        public void deltint()
        Description copied from class: Atomic
        Internal transition method of the atomic model. This method is called when the time until the next internal transition of the model is zero.
        Specified by:
        deltint in class Atomic
      • deltext

        public void deltext​(double e)
        Description copied from class: Atomic
        External transition method of the atomic model. This method is called when the model receives an input from another model.
        Specified by:
        deltext in class Atomic
        Parameters:
        e - The time elapsed since the last internal transition of the model.
      • lambda

        public void lambda()
        Description copied from class: Atomic
        Output function of the atomic model. This method is called when the model has an output to send to another model.
        Specified by:
        lambda in class Atomic