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 longnumCallsToClearprotected longnumCallsToDeltFcnprotected longnumCallsToExitprotected longnumCallsToGetClockprotected longnumCallsToGetTLprotected longnumCallsToGetTNprotected longnumCallsToInitializeprotected longnumCallsToLambdaprotected longnumCallsToSetTLprotected longnumCallsToSetTNprotected longnumCallsToTaprotected longtimeUsedByClearprotected longtimeUsedByDeltFcnprotected longtimeUsedByExitprotected longtimeUsedByGetClockprotected longtimeUsedByGetTLprotected longtimeUsedByGetTNprotected longtimeUsedByInitializeprotected longtimeUsedByLambdaprotected longtimeUsedBySetTLprotected longtimeUsedBySetTNprotected longtimeUsedByTa-
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 voidclear()Empties the event list at the ports of the associated model.voiddeltfcn()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.voidexit()This is a special function, out of the DEVS formalism, that allows to realize some actions when the simulation ends.SimulationClockgetClock()Gets the simulation clock of the simulator.doublegetTL()doublegetTN()Gets the time of the next event.voidinitialize()Initializes the simulator and the associated model.voidlambda()Executes the output function of the DEVS simulation.voidsetTL(double tL)Sets the time of the last event.voidsetTN(double tN)Sets the time of the next event.doubleta()Executes the time advance mechanism of the DEVS simulation.StringtoString()
-
-
-
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:AbstractSimulatorInitializes 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:
initializein classSimulator
-
exit
public void exit()
Description copied from class:AbstractSimulatorThis 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:AbstractSimulatorExecutes the time advance mechanism of the DEVS simulation.
-
deltfcn
public void deltfcn()
Description copied from class:AbstractSimulatorExecutes 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:AbstractSimulatorExecutes the output function of the DEVS simulation.
-
clear
public void clear()
Description copied from class:AbstractSimulatorEmpties the event list at the ports of the associated model.
-
getTL
public double getTL()
- Overrides:
getTLin classAbstractSimulator
-
setTL
public void setTL(double tL)
Description copied from class:AbstractSimulatorSets the time of the last event.- Overrides:
setTLin classAbstractSimulator- Parameters:
tL- the time of the last event.
-
getTN
public double getTN()
Description copied from class:AbstractSimulatorGets the time of the next event.- Overrides:
getTNin classAbstractSimulator- Returns:
- the time of the next event.
-
setTN
public void setTN(double tN)
Description copied from class:AbstractSimulatorSets the time of the next event.- Overrides:
setTNin classAbstractSimulator- Parameters:
tN- the time of the next event.
-
getClock
public SimulationClock getClock()
Description copied from class:AbstractSimulatorGets the simulation clock of the simulator.- Overrides:
getClockin classAbstractSimulator- Returns:
- the simulation clock of the simulator.
-
-