public interface Environment
Modifier and Type | Method and Description |
---|---|
void |
addAgent(Agent agent)
Add an agent to the Environment.
|
void |
addEnvironmentObject(EnvironmentObject eo)
Add an EnvironmentObject to the Environment.
|
void |
addEnvironmentView(EnvironmentView ev)
Add a view on the Environment.
|
java.util.List<Agent> |
getAgents()
Returns the Agents belonging to this Environment.
|
java.util.List<EnvironmentObject> |
getEnvironmentObjects()
Returns the EnvironmentObjects that exist in this Environment.
|
double |
getPerformanceMeasure(Agent forAgent)
Retrieve the performance measure associated with an Agent.
|
boolean |
isDone()
Returns
true if the Environment is finished with its current
task(s). |
void |
notifyViews(java.lang.String msg)
Notify all registered EnvironmentViews of a message.
|
void |
removeAgent(Agent agent)
Remove an agent from the environment.
|
void |
removeEnvironmentObject(EnvironmentObject eo)
Remove an EnvironmentObject from the Environment.
|
void |
removeEnvironmentView(EnvironmentView ev)
Remove a view on the Environment.
|
void |
step()
Move the Environment one time step forward.
|
void |
step(int n)
Move the Environment n time steps forward.
|
void |
stepUntilDone()
Step through time steps until the Environment has no more tasks.
|
java.util.List<Agent> getAgents()
void addAgent(Agent agent)
agent
- the agent to be added.void removeAgent(Agent agent)
agent
- the agent to be removed.java.util.List<EnvironmentObject> getEnvironmentObjects()
void addEnvironmentObject(EnvironmentObject eo)
eo
- the EnvironmentObject to be added.void removeEnvironmentObject(EnvironmentObject eo)
eo
- the EnvironmentObject to be removed.void step()
void step(int n)
n
- the number of time steps to move the Environment forward.void stepUntilDone()
boolean isDone()
true
if the Environment is finished with its current
task(s).true
if the Environment is finished with its current
task(s).double getPerformanceMeasure(Agent forAgent)
forAgent
- the Agent for which a performance measure is to be retrieved.void addEnvironmentView(EnvironmentView ev)
ev
- the EnvironmentView to be added.void removeEnvironmentView(EnvironmentView ev)
ev
- the EnvironmentView to be removed.void notifyViews(java.lang.String msg)
msg
- the message to notify the registered EnvironmentViews with.