de.cesr.lara.houseplant
Class HouseplantModel

java.lang.Object
  extended by de.cesr.lara.components.model.impl.LAbstractModel
      extended by de.cesr.lara.components.model.impl.LAbstractStandaloneSynchronisedModel
          extended by de.cesr.lara.houseplant.HouseplantModel
All Implemented Interfaces:
LaraAbstractEventSubscriber, LaraEventSubscriber, LaraInternalEventSubscriber, LaraModel

public class HouseplantModel
extends LAbstractStandaloneSynchronisedModel
implements LaraModel, LaraEventSubscriber

TODO organise classes in packages according to LARA_Base (SH) The model class glues together the single agents to one model. It extends the LARA component LAbstractStandaloneSynchronisedModel. The models cycle is triggered by MyModelControler through the eventbus. To make LARA able to interact with the model, the interface LaraModel has to be implemented.


Field Summary
 
Fields inherited from class de.cesr.lara.components.model.impl.LAbstractStandaloneSynchronisedModel
agents
 
Fields inherited from class de.cesr.lara.components.model.impl.LAbstractModel
calendar, currentSimStage, eventBus, floatPointFormat, integerFormat, randomMan, step
 
Constructor Summary
HouseplantModel(SimulationConfig simulationConfig)
          Constructor
 
Method Summary
 void createAgents(List<AgentInitialData> agentInitialData)
          Create the agents used in this model
 void createEnvironment(List<AgentInitialData> agentInitialData)
           
 void initDecisions(Set<Class<? extends LaraPreference>> goals)
           
<T extends LaraEvent>
void
onEvent(T event)
          Will be called with an event as a parameter when an event the subscriber subscribed to occurs.
 void processDecision(LaraDecisionConfiguration decisionConfiguration)
          processes a given decision by firing the corresponding events
 void processStep()
          simulates one tick. currently our agents decide about "decision one" and log the best behavioural option
 
Methods inherited from class de.cesr.lara.components.model.impl.LAbstractStandaloneSynchronisedModel
addAgent, init
 
Methods inherited from class de.cesr.lara.components.model.impl.LAbstractModel
advanceCalender, getCurrentDate, getCurrentSimulationStage, getCurrentStep, getFloatPointFormat, getIntegerFormat, getLRandom, onInternalEvent, setCurrentStep, step, step
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface de.cesr.lara.components.model.LaraModel
getCurrentDate, getCurrentSimulationStage, getCurrentStep, getFloatPointFormat, getIntegerFormat, getLRandom, setCurrentStep, step, step
 

Constructor Detail

HouseplantModel

public HouseplantModel(SimulationConfig simulationConfig)
Constructor

Method Detail

onEvent

public <T extends LaraEvent> void onEvent(T event)
Description copied from interface: LaraEventSubscriber
Will be called with an event as a parameter when an event the subscriber subscribed to occurs. Implement this to react on events. Typically you would start doing something like if (event instanceof VeryInterestingEvent) { //do something smart }

Specified by:
onEvent in interface LaraEventSubscriber
See Also:
LaraEventSubscriber.onEvent(de.cesr.lara.components.eventbus.events.LaraEvent)

createAgents

public void createAgents(List<AgentInitialData> agentInitialData)
Create the agents used in this model


initDecisions

public void initDecisions(Set<Class<? extends LaraPreference>> goals)

createEnvironment

public void createEnvironment(List<AgentInitialData> agentInitialData)
See Also:
de.cesr.lara.components.model.LaraModel#initEnvironment()

processStep

public void processStep()
simulates one tick. currently our agents decide about "decision one" and log the best behavioural option


processDecision

public void processDecision(LaraDecisionConfiguration decisionConfiguration)
processes a given decision by firing the corresponding events

Parameters:
decisionConfiguration -