Class CoordinatorProfile


  • public class CoordinatorProfile
    extends Coordinator
    Coordinator to perform a profiling of the simulation. This class implements a coordinator to perform a profiling of the simulation.
    • Field Detail

      • numCallsToInitialize

        protected long numCallsToInitialize
      • timeUsedByInitialize

        protected long timeUsedByInitialize
      • numCallsToExit

        protected long numCallsToExit
      • timeUsedByExit

        protected long timeUsedByExit
      • numCallsToTa

        protected long numCallsToTa
      • timeUsedByTa

        protected long timeUsedByTa
      • numCallsToDeltFcn

        protected long numCallsToDeltFcn
      • timeUsedByDeltFcn

        protected long timeUsedByDeltFcn
      • numCallsToLambda

        protected long numCallsToLambda
      • timeUsedByLambda

        protected long timeUsedByLambda
      • numCallsToClear

        protected long numCallsToClear
      • timeUsedByClear

        protected long timeUsedByClear
      • numCallsToGetTN

        protected long numCallsToGetTN
      • timeUsedByGetTN

        protected long timeUsedByGetTN
      • numCallsToGetTL

        protected long numCallsToGetTL
      • timeUsedByGetTL

        protected long timeUsedByGetTL
      • numCallsToSetTN

        protected long numCallsToSetTN
      • timeUsedBySetTN

        protected long timeUsedBySetTN
      • numCallsToSetTL

        protected long numCallsToSetTL
      • timeUsedBySetTL

        protected long timeUsedBySetTL
      • numCallsToGetClock

        protected long numCallsToGetClock
      • timeUsedByGetClock

        protected long timeUsedByGetClock
      • numCallsToGetSimulators

        protected long numCallsToGetSimulators
      • timeUsedByGetSimulators

        protected long timeUsedByGetSimulators
      • numCallsToPropagateOutput

        protected long numCallsToPropagateOutput
      • timeUsedByPropagateOutput

        protected long timeUsedByPropagateOutput
      • numCallsToPropagateInput

        protected long numCallsToPropagateInput
      • timeUsedByPropagateInput

        protected long timeUsedByPropagateInput
      • executionTime

        protected double executionTime
    • Constructor Detail

      • CoordinatorProfile

        public CoordinatorProfile​(SimulationClock clock,
                                  Coupled model)
        Constructor for the profile coordinator.
        Parameters:
        clock - Simulation clock
        model - Coupled model
      • CoordinatorProfile

        public CoordinatorProfile​(Coupled model)
        Constructor for the profile coordinator.
        Parameters:
        model - Coupled model
    • Method Detail

      • buildHierarchy

        protected void buildHierarchy()
        Description copied from class: Coordinator
        Builds the hierarchy of simulators for the model.
        Overrides:
        buildHierarchy in class Coordinator
      • initialize

        public void initialize()
        Description copied from class: AbstractSimulator
        Initializes the simulator and the associated model. This is not part of the DEVS formalism, but it is a necessary step to prepare the simulator for the simulation.
        Overrides:
        initialize in class Coordinator
      • exit

        public void exit()
        Description copied from class: AbstractSimulator
        This is a special function, out of the DEVS formalism, that allows to realize some actions when the simulation ends.
        Overrides:
        exit in class Coordinator
      • ta

        public double ta()
        Description copied from class: AbstractSimulator
        Executes the time advance mechanism of the DEVS simulation.
        Overrides:
        ta in class Coordinator
        Returns:
        the new DEVS sigma.
      • lambda

        public void lambda()
        Description copied from class: AbstractSimulator
        Executes the output function of the DEVS simulation.
        Overrides:
        lambda in class Coordinator
      • deltfcn

        public void deltfcn()
        Description copied from class: AbstractSimulator
        Executes one of the transition functions of the DEVS simulation, depending on the current state of the model and whether there are new events or not.
        Overrides:
        deltfcn in class Coordinator
      • clear

        public void clear()
        Description copied from class: AbstractSimulator
        Empties the event list at the ports of the associated model.
        Overrides:
        clear in class Coordinator
      • setTL

        public void setTL​(double tL)
        Description copied from class: AbstractSimulator
        Sets the time of the last event.
        Overrides:
        setTL in class AbstractSimulator
        Parameters:
        tL - the time of the last event.
      • getTN

        public double getTN()
        Description copied from class: AbstractSimulator
        Gets the time of the next event.
        Overrides:
        getTN in class AbstractSimulator
        Returns:
        the time of the next event.
      • setTN

        public void setTN​(double tN)
        Description copied from class: AbstractSimulator
        Sets the time of the next event.
        Overrides:
        setTN in class AbstractSimulator
        Parameters:
        tN - the time of the next event.
      • propagateOutput

        public void propagateOutput()
        Description copied from class: Coordinator
        Propagates the output of the model. This method is called after the lambda function of the simulators, and it propagates the output of the models to the input of the components connected to the previuous output ports.
        Overrides:
        propagateOutput in class Coordinator
      • propagateInput

        public void propagateInput()
        Description copied from class: Coordinator
        Propagates the input of the model. This method is called before the delta function of the simulators, and it propagates the input of the models to the input of the components connected to the previuous input ports.
        Overrides:
        propagateInput in class Coordinator
      • simulate

        public void simulate​(long numIterations)
        Description copied from class: Coordinator
        This function is used to simulate the model for a given number of iterations.
        Overrides:
        simulate in class Coordinator
        Parameters:
        numIterations - the number of iterations to simulate.
      • simulate

        public void simulate​(double timeInterval)
        Description copied from class: Coordinator
        This function is used to simulate the model for a given time interval.
        Overrides:
        simulate in class Coordinator
        Parameters:
        timeInterval - the time interval to simulate.
      • main

        public static void main​(String[] args)