Package xdevs.core.simulation.profile
Class SimulatorProfile
- java.lang.Object
-
- xdevs.core.simulation.AbstractSimulator
-
- xdevs.core.simulation.Simulator
-
- xdevs.core.simulation.profile.SimulatorProfile
-
public class SimulatorProfile extends Simulator
Profiling simulation class. It implements a profiling simulation class for DEVS models.
-
-
Field Summary
Fields Modifier and Type Field Description protected long
numCallsToClear
protected long
numCallsToDeltFcn
protected long
numCallsToExit
protected long
numCallsToGetClock
protected long
numCallsToGetTL
protected long
numCallsToGetTN
protected long
numCallsToInitialize
protected long
numCallsToLambda
protected long
numCallsToSetTL
protected long
numCallsToSetTN
protected long
numCallsToTa
protected long
timeUsedByClear
protected long
timeUsedByDeltFcn
protected long
timeUsedByExit
protected long
timeUsedByGetClock
protected long
timeUsedByGetTL
protected long
timeUsedByGetTN
protected long
timeUsedByInitialize
protected long
timeUsedByLambda
protected long
timeUsedBySetTL
protected long
timeUsedBySetTN
protected long
timeUsedByTa
-
Fields inherited from class xdevs.core.simulation.AbstractSimulator
clock, tL, tN
-
-
Constructor Summary
Constructors Constructor Description SimulatorProfile(SimulationClock clock, Atomic model)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clear()
Empties the event list at the ports of the associated model.void
deltfcn()
Executes one of the transition functions of the DEVS simulation, depending on the current state of the model and whether there are new events or not.void
exit()
This is a special function, out of the DEVS formalism, that allows to realize some actions when the simulation ends.SimulationClock
getClock()
Gets the simulation clock of the simulator.double
getTL()
double
getTN()
Gets the time of the next event.void
initialize()
Initializes the simulator and the associated model.void
lambda()
Executes the output function of the DEVS simulation.void
setTL(double tL)
Sets the time of the last event.void
setTN(double tN)
Sets the time of the next event.double
ta()
Executes the time advance mechanism of the DEVS simulation.String
toString()
-
-
-
Field Detail
-
numCallsToInitialize
protected long numCallsToInitialize
-
timeUsedByInitialize
protected long timeUsedByInitialize
-
numCallsToExit
protected long numCallsToExit
-
timeUsedByExit
protected long timeUsedByExit
-
numCallsToTa
protected long numCallsToTa
-
timeUsedByTa
protected long timeUsedByTa
-
numCallsToDeltFcn
protected long numCallsToDeltFcn
-
timeUsedByDeltFcn
protected long timeUsedByDeltFcn
-
numCallsToLambda
protected long numCallsToLambda
-
timeUsedByLambda
protected long timeUsedByLambda
-
numCallsToClear
protected long numCallsToClear
-
timeUsedByClear
protected long timeUsedByClear
-
numCallsToGetTN
protected long numCallsToGetTN
-
timeUsedByGetTN
protected long timeUsedByGetTN
-
numCallsToGetTL
protected long numCallsToGetTL
-
timeUsedByGetTL
protected long timeUsedByGetTL
-
numCallsToSetTN
protected long numCallsToSetTN
-
timeUsedBySetTN
protected long timeUsedBySetTN
-
numCallsToSetTL
protected long numCallsToSetTL
-
timeUsedBySetTL
protected long timeUsedBySetTL
-
numCallsToGetClock
protected long numCallsToGetClock
-
timeUsedByGetClock
protected long timeUsedByGetClock
-
-
Constructor Detail
-
SimulatorProfile
public SimulatorProfile(SimulationClock clock, Atomic model)
-
-
Method Detail
-
initialize
public void initialize()
Description copied from class:AbstractSimulator
Initializes the simulator and the associated model. This is not part of the DEVS formalism, but it is a necessary step to prepare the simulator for the simulation.- Overrides:
initialize
in classSimulator
-
exit
public void exit()
Description copied from class:AbstractSimulator
This is a special function, out of the DEVS formalism, that allows to realize some actions when the simulation ends.
-
ta
public double ta()
Description copied from class:AbstractSimulator
Executes the time advance mechanism of the DEVS simulation.
-
deltfcn
public void deltfcn()
Description copied from class:AbstractSimulator
Executes one of the transition functions of the DEVS simulation, depending on the current state of the model and whether there are new events or not.
-
lambda
public void lambda()
Description copied from class:AbstractSimulator
Executes the output function of the DEVS simulation.
-
clear
public void clear()
Description copied from class:AbstractSimulator
Empties the event list at the ports of the associated model.
-
getTL
public double getTL()
- Overrides:
getTL
in classAbstractSimulator
-
setTL
public void setTL(double tL)
Description copied from class:AbstractSimulator
Sets the time of the last event.- Overrides:
setTL
in classAbstractSimulator
- Parameters:
tL
- the time of the last event.
-
getTN
public double getTN()
Description copied from class:AbstractSimulator
Gets the time of the next event.- Overrides:
getTN
in classAbstractSimulator
- Returns:
- the time of the next event.
-
setTN
public void setTN(double tN)
Description copied from class:AbstractSimulator
Sets the time of the next event.- Overrides:
setTN
in classAbstractSimulator
- Parameters:
tN
- the time of the next event.
-
getClock
public SimulationClock getClock()
Description copied from class:AbstractSimulator
Gets the simulation clock of the simulator.- Overrides:
getClock
in classAbstractSimulator
- Returns:
- the simulation clock of the simulator.
-
-