Package xdevs.core.simulation.realtime
Class RTCentralCoordinator
- java.lang.Object
-
- xdevs.core.simulation.AbstractSimulator
-
- xdevs.core.simulation.Coordinator
-
- xdevs.core.simulation.parallel.CoordinatorParallel
-
- xdevs.core.simulation.realtime.RTCentralCoordinator
-
- All Implemented Interfaces:
Runnable
public class RTCentralCoordinator extends CoordinatorParallel implements Runnable
Real-time central coordinator This class implements a real-time central coordinator for DEVS models.
-
-
Field Summary
Fields Modifier and Type Field Description protected Thread
myThread
protected double
timeInterval
protected int
timeScale
-
Fields inherited from class xdevs.core.simulation.parallel.CoordinatorParallel
deltfcnTasks, executor, lambdaTasks, numberOfThreads
-
Fields inherited from class xdevs.core.simulation.Coordinator
model, simulators
-
Fields inherited from class xdevs.core.simulation.AbstractSimulator
clock, tL, tN
-
-
Constructor Summary
Constructors Constructor Description RTCentralCoordinator(Coupled model)
Constructor for the real-time central coordinator.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static void
main(String[] args)
void
run()
void
setTimeScale(double realTimeFactor)
Set the time scale factor.void
simulate(double timeInterval)
This function is used to simulate the model for a given time interval.-
Methods inherited from class xdevs.core.simulation.parallel.CoordinatorParallel
buildHierarchy, deltfcn, lambda, simulate
-
Methods inherited from class xdevs.core.simulation.Coordinator
clear, exit, getModel, getSimulators, initialize, propagateInput, propagateOutput, simInject, simInject, simInject, simInject, ta
-
-
-
-
Field Detail
-
timeInterval
protected double timeInterval
-
myThread
protected Thread myThread
-
timeScale
protected int timeScale
-
-
Constructor Detail
-
RTCentralCoordinator
public RTCentralCoordinator(Coupled model)
Constructor for the real-time central coordinator.- Parameters:
model
- Coupled model
-
-
Method Detail
-
simulate
public void simulate(double timeInterval)
Description copied from class:Coordinator
This function is used to simulate the model for a given time interval.- Overrides:
simulate
in classCoordinatorParallel
- Parameters:
timeInterval
- the time interval to simulate.
-
setTimeScale
public void setTimeScale(double realTimeFactor)
Set the time scale factor.- Parameters:
realTimeFactor
- Time scale factor
-
main
public static void main(String[] args)
-
-