massim.framework
Interface AgentProvider

All Known Implementing Classes:
AbstractAgentFilter, ArrayAgentProvider, TeamAgentFilter

public interface AgentProvider

This interface offers methods to retrieve a set of agents from the implementing object and to allocate agents from it. Those agents won't be available until they are removed via SimulationAgent.remove().


Method Summary
 void allocateAgent(UniqueSimulationAgent agent)
          Allocate an agent.
 void freeAgent(UniqueSimulationAgent agent)
          Free an agent
 UniqueSimulationAgent[] getAgents(AgentParameter agentparameter)
          Retrieve a list of available agents, fulfilling requirements as mentioned in agentparameter;
 

Method Detail

getAgents

UniqueSimulationAgent[] getAgents(AgentParameter agentparameter)
Retrieve a list of available agents, fulfilling requirements as mentioned in agentparameter;

Parameters:
p - requirements the returned agents should fulfill.
Returns:
an array of suitable agents

allocateAgent

void allocateAgent(UniqueSimulationAgent agent)
Allocate an agent. This means that it won't be offered anymore via getAgents until the agent is removed via it's remove method.

Parameters:
agent - to allocate.

freeAgent

void freeAgent(UniqueSimulationAgent agent)
Free an agent



Copyright © 2011. All Rights Reserved.