|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectde.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 LaraInternalEventSubscriberLaraInternalEventSubscriber.onInternalEvent(de.cesr.lara.components.eventbus.events.LaraEvent)public final void step()
step(int stepIncrease)
step in interface LaraModelLaraModel.step()public final void step(int stepIncrease)
step
step in interface LaraModelstepIncrease - the number of steps to increaseLaraModel.step(int)public Date getCurrentDate()
LaraModelDate 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 LaraModelLaraModel.getCurrentDate()public LSimulationStage getCurrentSimulationStage()
LaraModel
getCurrentSimulationStage in interface LaraModelLaraModel.getCurrentSimulationStage()public int getCurrentStep()
LaraModel
getCurrentStep in interface LaraModelLaraModel.getCurrentStep()public NumberFormat getFloatPointFormat()
LaraModelNumberFormat to format decimal floating point numbers
getFloatPointFormat in interface LaraModelLaraModel.getFloatPointFormat()public NumberFormat getIntegerFormat()
LaraModelNumberFormat to format integer numbers
getIntegerFormat in interface LaraModelLaraModel.getIntegerFormat()public LaraRandom getLRandom()
LaraModelLaraRandom 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 LaraModelLaraModel.getLRandom()public void setCurrentStep(int step)
LaraModel
setCurrentStep in interface LaraModelstep - 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 | ||||||||