de.cesr.lara.components.model
Interface LaraModel

All Known Implementing Classes:
HouseplantModel, LAbstractModel, LAbstractRsModel, LAbstractStandaloneSynchronisedModel, MyModel, MyRsContextBuilder

public interface LaraModel

Classes that implement this interface need to provide basic simulation functionality for LARA like time stepping etc. For many cases, this represents an adapter to existing simulation frameworks.


Method Summary
 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 setCurrentStep(int step)
          Set the current overall time step.
 void step()
          This method id invoked by the model controller to trigger the model.
 void step(int stepIncrease)
          This method id invoked by the model controller to trigger the model.
 

Method Detail

getCurrentDate

Date getCurrentDate()
Returns the Date object for the date that is associated with the current tick. Note that several ticks may be associated with the same Date.

Returns:
date the current date

getCurrentSimulationStage

LSimulationStage getCurrentSimulationStage()
Returns the current simulation stage, no matter if agents are triggered synchronously or asynchronously.

Returns:
the current simulation stage

getCurrentStep

int getCurrentStep()
Retrieve the current overall time step.

Returns:
step the current time step of the overall model

getFloatPointFormat

NumberFormat getFloatPointFormat()
Returns a NumberFormat to format decimal floating point numbers

Returns:
A NumberFormat to format decimal floating point numbers

getIntegerFormat

NumberFormat getIntegerFormat()
Returns a NumberFormat to format integer numbers

Returns:
A NumberFormat to format integer numbers

getLRandom

LaraRandom getLRandom()
Return the random manager that is used for random processes in LARA. Either, the model author should implement (or assign to this.randomMan when extending AbstracLModel) the random number generator used in the custom model part, or reset the LRandomService by calling getLRandom.setSeed(seed) using the correct seed parameter. NOTE: Make sure that the 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!

Returns:
the random manager

setCurrentStep

void setCurrentStep(int step)
Set the current overall time step.

Parameters:
step - the current time step of the overall model

step

void step()
This method id invoked by the model controller to trigger the model. The last step number is increased by 1.


step

void step(int stepIncrease)
This method id invoked by the model controller to trigger the model. The last step number is increased by stepIncrease.

Parameters:
stepIncrease - the number of steps to increase