nl.tudelft.simulation.dsol.simulators
Interface SimulatorInterface

All Superinterfaces:
EventProducerInterface, Remote, Serializable
All Known Subinterfaces:
AnimatorInterface, DESSSimulatorInterface, DEVDESSSimulatorInterface, DEVSSimulatorInterface
All Known Implementing Classes:
Animator, AnimatorWithThread, DESSSimulator, DEVDESSSimulator, DEVSSimulator, RealTimeClock, Simulator

public interface SimulatorInterface
extends Remote, Serializable, 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: Lesser General Public License (LGPL) , no warranty.

Since:
1.0
Version:
$Revision: 1.1 $ $Date: 2007/01/06 13:21:27 $
Author:
Peter Jacobs

Field Summary
static EventType END_OF_REPLICATION_EVENT
          END_OF_REPLICATION_EVENT is fired when a replication is finished
static EventType START_EVENT
          START_EVENT is fired when the simulator is started
static EventType START_REPLICATION_EVENT
          START_EVENT is fired when the simulator is started
static EventType STEP_EVENT
          STEP_EVENT is fired when the simulator is stepped
static EventType STOP_EVENT
          STOP_EVENT is fired when the simulator is stopped
static EventType TIME_CHANGED_EVENT
          TIME_CHANGED_EVENT is fired when the simulatorTime is updated
static 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

static final EventType END_OF_REPLICATION_EVENT
END_OF_REPLICATION_EVENT is fired when a replication is finished


START_REPLICATION_EVENT

static final EventType START_REPLICATION_EVENT
START_EVENT is fired when the simulator is started


START_EVENT

static final EventType START_EVENT
START_EVENT is fired when the simulator is started


STEP_EVENT

static final EventType STEP_EVENT
STEP_EVENT is fired when the simulator is stepped


STOP_EVENT

static final EventType STOP_EVENT
STOP_EVENT is fired when the simulator is stopped


TIME_CHANGED_EVENT

static final EventType TIME_CHANGED_EVENT
TIME_CHANGED_EVENT is fired when the simulatorTime is updated


WARMUP_EVENT

static final EventType WARMUP_EVENT
WARMUP_EVENT is fired when the initialize method is invoked

Method Detail

getSimulatorTime

double getSimulatorTime()
                        throws RemoteException
returns the actual simulator time.

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

getReplication

Replication getReplication()
                           throws RemoteException
returns the currently executed replication.

Returns:
the current replication
Throws:
RemoteException - on network failure

initialize

void initialize(Replication replication)
                throws RemoteException,
                       SimRuntimeException
initializes the simulator with a specified replication.

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

isRunning

boolean isRunning()
                  throws RemoteException
is the simulator running.

Returns:
boolean
Throws:
RemoteException - on network failure

start

void start()
           throws RemoteException,
                  SimRuntimeException
starts the simulator

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

step

void step()
          throws RemoteException,
                 SimRuntimeException
steps the simulator.

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

stop

void stop()
          throws RemoteException,
                 SimRuntimeException
stops the simulator.

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


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