Class SimulatorDistributed


  • public class SimulatorDistributed
    extends Simulator
    Simulator for distributed simulation. This class implements a simulator for distributed simulation. It contains a coupled parent and a boolean to indicate if the simulation has finished.
    • Field Detail

      • getOut

        protected boolean getOut
        Boolean to indicate if the simulation has finished.
    • Constructor Detail

      • SimulatorDistributed

        public SimulatorDistributed​(CoupledDistributed parent,
                                    String name)
        Constructor for the distributed simulator.
        Parameters:
        parent - Parent coupled model for the simulator.
        name - Name of the model to simulate, child of this parent.
    • Method Detail

      • isGetOut

        public boolean isGetOut()
        Gets the boolean to indicate if the simulation has finished.
        Returns:
        Boolean to indicate if the simulation has finished.
      • propagateOutput

        public void propagateOutput()
        Propagates the output of the model to the input of the connected models.
      • propagateOutputN2N

        public void propagateOutputN2N​(Collection valuesPort,
                                       String portName)
        Propagates the output of the model to the input of the connected models.
        Parameters:
        valuesPort - Collection of values for the message.
        portName - Name of the port for the message.
      • interpreter

        public MessageDistributed interpreter​(MessageDistributed md)
        This function interprets the message and executes the command.
        Parameters:
        md - Message to interpret.
        Returns:
        Message with the response.
      • run

        public void run()
        Run the simulator.