nl.tudelft.simulation.dsol.simulators
Class RealTimeClock
java.lang.Object
nl.tudelft.simulation.event.EventProducer
nl.tudelft.simulation.dsol.simulators.Simulator
nl.tudelft.simulation.dsol.simulators.DEVSSimulator
nl.tudelft.simulation.dsol.simulators.DEVDESSSimulator
nl.tudelft.simulation.dsol.simulators.Animator
nl.tudelft.simulation.dsol.simulators.RealTimeClock
- All Implemented Interfaces:
- Serializable, Runnable, Remote, AnimatorInterface, DESSSimulatorInterface, DEVDESSSimulatorInterface, DEVSSimulatorInterface, SimulatorInterface, EventProducerInterface
public class RealTimeClock
- extends Animator
- implements DEVDESSSimulatorInterface
The reference implementation of the realTimeClock. The realTime clock is a
DEVDESS simulator which runs at a ratio of realTime. If the executionTime
exceeds the timeStep, a catchup mechanism is triggered to make up lost time
in consecutive steps.
(c) copyright 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.4
- Version:
- $Revision: 1.1 $ $Date: 2007/01/06 13:21:27 $
- Author:
- Peter
Jacobs
- See Also:
- Serialized Form
Constructor Summary |
RealTimeClock()
constructs a new RealTimeClock |
Method Summary |
long |
getAnimationDelay()
returns the animation delay between each consequtive timestep |
void |
run()
The run method defines the actual time step mechanism of the simulator. |
void |
setAnimationDelay(long animationDelay)
sets the animationDelay |
Methods inherited from class nl.tudelft.simulation.dsol.simulators.DEVSSimulator |
cancelEvent, endReplication, getEventList, initialize, scheduleEvent, scheduleEvent, scheduleEvent, scheduleEvent, scheduleEvent, setEventList, step, stop |
Methods inherited from class nl.tudelft.simulation.event.EventProducer |
addListener, addListener, addListener, addListener, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, getEventTypes, removeAllListeners, removeAllListeners, removeListener |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
BACKLOG_EVENT
public static final EventType BACKLOG_EVENT
- the backlog event
RealTimeClock
public RealTimeClock()
- constructs a new RealTimeClock
run
public void run()
- Description copied from class:
Simulator
- The run method defines the actual time step mechanism of the simulator.
The implementation of this method depends on the formalism. Where
discrete event formalisms loop over an eventlist continuous simulators
take pre-defined time steps.
- Specified by:
run
in interface Runnable
- Overrides:
run
in class Animator
- See Also:
DEVSSimulator.run()
getAnimationDelay
public long getAnimationDelay()
- Description copied from interface:
AnimatorInterface
- returns the animation delay between each consequtive timestep
- Specified by:
getAnimationDelay
in interface AnimatorInterface
- Overrides:
getAnimationDelay
in class Animator
- Returns:
- the animaiton delay in milliseconds wallclock
- See Also:
#getAnimationDelay()
setAnimationDelay
public void setAnimationDelay(long animationDelay)
- Description copied from interface:
AnimatorInterface
- sets the animationDelay
- Specified by:
setAnimationDelay
in interface AnimatorInterface
- Overrides:
setAnimationDelay
in class Animator
- Parameters:
animationDelay
- the animation delay- See Also:
#setAnimationDelay(long)
Copyright © 2002-2010 Delft University of Technology, the Netherlands. All Rights Reserved.