Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## nl.tudelft.simulation.dsol.simulators
Interface SimulatorInterface

All Superinterfaces:
  nl.tudelft.simulation.event.EventProducerInterface, java.rmi.Remote, java.io.Serializable

All Known Subinterfaces:
  AnimatorInterface, DESSSimulatorInterface, DEVDESSSimulatorInterface, DEVSSimulatorInterface

All Known Implementing Classes:
  Animator, DESSSimulator, DEVDESSSimulator, DEVSSimulator, RealTimeClock, Simulator

public interface SimulatorInterface
extends java.rmi.Remote, java.io.Serializable, nl.tudelft.simulation.event.EventProducerInterface

The SimulatorInterface defines the behavior of the simulators in the DSOL framework. The simulator is defined as the computational object capable of executing the model. The simulator is therefore an object which must can be stopped, paused, started, reset, etc.

(c) copyright 2002-2004 Delft University of Technology , the Netherlands.
See for project information www.simulation.tudelft.nl
License of use: General Public License (GPL) , no warranty

Since:
  1.0
Version:
  1.10 2004-03-18
Author:
  Peter Jacobs

Field Summary
`static nl.tudelft.simulation.event.EventType` | `END_OF_REPLICATION_EVENT` END_OF_REPLICATION_EVENT is fired when a replication is finished
`static nl.tudelft.simulation.event.EventType` | `START_EVENT` START_EVENT is fired when the simulator is started
`static nl.tudelft.simulation.event.EventType` | `START_REPLICATION_EVENT` START_EVENT is fired when the simulator is started
`static nl.tudelft.simulation.event.EventType` | `STEP_EVENT` STEP_EVENT is fired when the simulator is stepped
`static nl.tudelft.simulation.event.EventType` | `STOP_EVENT` STOP_EVENT is fired when the simulator is stopped
`static nl.tudelft.simulation.event.EventType` | `TIME_CHANGED_EVENT` TIME_CHANGED_EVENT is fired when the simulatorTime is updated
`static nl.tudelft.simulation.event.EventType` | `WARMUP_EVENT` WARMUP_EVENT is fired when the initialize method is invoked

Fields inherited from interface nl.tudelft.simulation.event.EventProducerInterface
`FIRST_POSITION, LAST_POSITION`

Method Summary
`Replication` | `getReplication()` returns the currently executed replication.
`double` | `getSimulatorTime()` returns the actual simulator time.
`void` | `initialize(Replication replication)` initializes the simulator with a specified replication.
`boolean` | `isRunning()` is the simulator running.
`void` | `start()` starts the simulator
`void` | `step()` steps the simulator.
`void` | `stop()` stops the simulator.

Methods inherited from interface nl.tudelft.simulation.event.EventProducerInterface
`addListener, addListener, addListener, addListener, getEventTypes, removeListener`

Field Detail

### END_OF_REPLICATION_EVENT

    public static final nl.tudelft.simulation.event.EventType END_OF_REPLICATION_EVENT

  END_OF_REPLICATION_EVENT is fired when a replication is finished

### START_REPLICATION_EVENT

    public static final nl.tudelft.simulation.event.EventType START_REPLICATION_EVENT

  START_EVENT is fired when the simulator is started

### START_EVENT

    public static final nl.tudelft.simulation.event.EventType START_EVENT

  START_EVENT is fired when the simulator is started

### STEP_EVENT

    public static final nl.tudelft.simulation.event.EventType STEP_EVENT

  STEP_EVENT is fired when the simulator is stepped

### STOP_EVENT

    public static final nl.tudelft.simulation.event.EventType STOP_EVENT

  STOP_EVENT is fired when the simulator is stopped

### TIME_CHANGED_EVENT

    public static final nl.tudelft.simulation.event.EventType TIME_CHANGED_EVENT

  TIME_CHANGED_EVENT is fired when the simulatorTime is updated

### WARMUP_EVENT

    public static final nl.tudelft.simulation.event.EventType WARMUP_EVENT

  WARMUP_EVENT is fired when the initialize method is invoked

Method Detail

### getSimulatorTime

    public double getSimulatorTime()
                            throws java.rmi.RemoteException

  returns the actual simulator time.

  Returns:
    the simulator time.
  Throws:
    `java.rmi.RemoteException` - on network failure.

### getReplication

    public Replication getReplication()
                               throws java.rmi.RemoteException

  returns the currently executed replication.

  Returns:
    the current replication
  Throws:
    `java.rmi.RemoteException` - on network failure

### initialize

    public void initialize(Replication replication)
                    throws java.rmi.RemoteException,
                           SimRuntimeException

  initializes the simulator with a specified replication.

  Parameters:
    `replication` - the replication
  Throws:
    `java.rmi.RemoteException` - on network failure
    `SimRuntimeException` - on simulator failure (simulator is running)

### isRunning

    public boolean isRunning()
                      throws java.rmi.RemoteException

  is the simulator running.

  Returns:
    boolean
  Throws:
    `java.rmi.RemoteException` - on network failure

### start

    public void start()
               throws java.rmi.RemoteException,
                      SimRuntimeException

  starts the simulator

  Throws:
    `java.rmi.RemoteException` - on network failure
    `SimRuntimeException` - whenever starting fails. Possible occasions include starting a started simulator

### step

    public void step()
              throws java.rmi.RemoteException,
                     SimRuntimeException

  steps the simulator.

  Throws:
    `java.rmi.RemoteException` - on network failure
    `SimRuntimeException` - whenever stepping fails. Possible occasions include stepping a stopped simulator

### stop

    public void stop()
              throws java.rmi.RemoteException,
                     SimRuntimeException

  stops the simulator.

  Throws:
    `java.rmi.RemoteException` - on network failure
    `SimRuntimeException` - whenever stopping fails. Possible occasions include stopping a stopped simulator

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2002-2004 Delft University of Technology, the Netherlands. All Rights Reserved.