|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object de.cesr.lara.template.MyAgent
public class MyAgent
As we do agent based modeling the agent makes up the heart of our model. The agent implements the interface LaraAgent - this is neceassary to provide an abstract view of the agent the LARA architecture can interact with.
Constructor Summary | |
---|---|
MyAgent(String id,
MyEnvironment environment)
creates an agent. requires a unique identifier string |
Method Summary | ||
---|---|---|
void |
decide(LaraDecisionConfiguration dBuilder)
this is called in the end of an decision process. the agent looks for the best decision and acts according to the decision he made. in our case he memorises his decision. |
|
void |
execute(LaraDecisionConfiguration dBuilder)
Do some actions based on the agents decision. |
|
String |
getAgentId()
Get the custom agent id. |
|
LaraAgentComponent<MyAgent,MyAbstractBehaviouralOption<MyAgent>> |
getLaraComp()
Returns the LaraAgentComponent of this agent. |
|
boolean |
isDecisionDeliberative()
Is called during the preProcess phase. |
|
|
onEvent(T event)
Will be called with an event as a parameter when an event the subscriber subscribed to occurs. |
|
void |
perceive(LaraDecisionConfiguration dBuilder)
perceive the two environmental properties |
|
void |
setLaraComp(LaraAgentComponent<MyAgent,MyAbstractBehaviouralOption<MyAgent>> component)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public MyAgent(String id, MyEnvironment environment)
id
- Method Detail |
---|
public void decide(LaraDecisionConfiguration dBuilder)
public void execute(LaraDecisionConfiguration dBuilder)
public String getAgentId()
LaraAgent
getAgentId
in interface LaraAgent<MyAgent,MyAbstractBehaviouralOption<MyAgent>>
LaraAgent.getAgentId()
public LaraAgentComponent<MyAgent,MyAbstractBehaviouralOption<MyAgent>> getLaraComp()
LaraAgent
LaraAgentComponent
of this agent.
getLaraComp
in interface LaraAgent<MyAgent,MyAbstractBehaviouralOption<MyAgent>>
LaraAgent.getLaraComp()
public boolean isDecisionDeliberative()
public <T extends LaraEvent> void onEvent(T event)
LaraEventSubscriber
onEvent
in interface LaraEventSubscriber
public void perceive(LaraDecisionConfiguration dBuilder)
public void setLaraComp(LaraAgentComponent<MyAgent,MyAbstractBehaviouralOption<MyAgent>> component)
component
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |