|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.cesr.lara.components.model.impl.LAbstractModel
public abstract class LAbstractModel
Since this class does not deal with agents, certain methods regarding agents are abstract Features:
Field Summary | |
---|---|
protected Calendar |
calendar
Calendar that tracks simulation step |
protected LSimulationStage |
currentSimStage
The simulatsion's current stage |
protected LEventbus |
eventBus
|
protected NumberFormat |
floatPointFormat
NumberFormat to format floating point numbers |
protected NumberFormat |
integerFormat
NumberFormat to format integer numbers |
protected LaraRandom |
randomMan
The LaraRandom instance of this model |
protected int |
step
current time step |
Constructor Summary | |
---|---|
LAbstractModel()
Constructor. |
Method Summary | |
---|---|
void |
advanceCalender()
This method is called every time step. |
Date |
getCurrentDate()
Returns the Date object for the date that is associated with the
current tick. |
LSimulationStage |
getCurrentSimulationStage()
Returns the current simulation stage, no matter if agents are triggered synchronously or asynchronously. |
int |
getCurrentStep()
Retrieve the current overall time step. |
NumberFormat |
getFloatPointFormat()
Returns a NumberFormat to format decimal floating point numbers |
NumberFormat |
getIntegerFormat()
Returns a NumberFormat to format integer numbers |
LaraRandom |
getLRandom()
Return the random manager that is used for random processes in LARA. |
void |
init()
Methods that override this method must (except you know what you are doing) call super.init()! |
void |
onInternalEvent(LaraEvent event)
When overridden, needs to call super.onInternalEvent(event); ! |
void |
setCurrentStep(int step)
Set the current overall time step. |
void |
step()
Note: This method is alternative to step(int stepIncrease) |
void |
step(int stepIncrease)
Note: This method is alternative to step |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected LEventbus eventBus
protected Calendar calendar
protected LSimulationStage currentSimStage
protected NumberFormat floatPointFormat
NumberFormat
to format floating point numbers
protected NumberFormat integerFormat
NumberFormat
to format integer numbers
protected LaraRandom randomMan
LaraRandom
instance of this model
protected int step
Constructor Detail |
---|
public LAbstractModel()
Method Detail |
---|
public void advanceCalender()
public void init()
public void onInternalEvent(LaraEvent event)
super.onInternalEvent(event);
!
onInternalEvent
in interface LaraInternalEventSubscriber
LaraInternalEventSubscriber.onInternalEvent(de.cesr.lara.components.eventbus.events.LaraEvent)
public final void step()
step(int stepIncrease)
step
in interface LaraModel
LaraModel.step()
public final void step(int stepIncrease)
step
step
in interface LaraModel
stepIncrease
- the number of steps to increaseLaraModel.step(int)
public Date getCurrentDate()
LaraModel
Date
object for the date that is associated with the
current tick. Note that several ticks may be associated with the same
Date
.
getCurrentDate
in interface LaraModel
LaraModel.getCurrentDate()
public LSimulationStage getCurrentSimulationStage()
LaraModel
getCurrentSimulationStage
in interface LaraModel
LaraModel.getCurrentSimulationStage()
public int getCurrentStep()
LaraModel
getCurrentStep
in interface LaraModel
LaraModel.getCurrentStep()
public NumberFormat getFloatPointFormat()
LaraModel
NumberFormat
to format decimal floating point numbers
getFloatPointFormat
in interface LaraModel
LaraModel.getFloatPointFormat()
public NumberFormat getIntegerFormat()
LaraModel
NumberFormat
to format integer numbers
getIntegerFormat
in interface LaraModel
LaraModel.getIntegerFormat()
public LaraRandom getLRandom()
LaraModel
LaraRandom
class is instantiated only
once since creating an instance every time this method is called results
in starting the random sequence anew each time the method is called!
getLRandom
in interface LaraModel
LaraModel.getLRandom()
public void setCurrentStep(int step)
LaraModel
setCurrentStep
in interface LaraModel
step
- the current time step of the overall modelLaraModel.setCurrentStep(int)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |