Class CoordinatorDistributed


  • public class CoordinatorDistributed
    extends Coordinator
    Coordinator for distributed simulation This class implements the coordinator for a distributed simulation. It extends the Coordinator class and implements the methods to execute the simulation in a distributed way.
    • Constructor Detail

      • CoordinatorDistributed

        public CoordinatorDistributed​(SimulationClock clock,
                                      CoupledDistributed model)
        Constructor for the distributed coordinator.
        Parameters:
        clock - Simulation clock
        model - Coupled model
      • CoordinatorDistributed

        public CoordinatorDistributed​(CoupledDistributed model)
        Constructor for the distributed coordinator.
        Parameters:
        model - Coupled model
    • Method Detail

      • executeTasksList

        public LinkedList<DistributedTask> executeTasksList​(int command)
        Execute a list of tasks in the distributed simulation.
        Parameters:
        command - Command to execute
        Returns:
        List of distributed tasks
      • 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
      • 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
      • 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