PARAMS - MODULE - public interface IAgentDescriptor<PARAMS extends IAgentParameters,MODULE extends GuiceAgentModule>
It describes three things:
getAgentModule())getCount())getAgentParameters())
Used by implementors of IMultipleAgentRunner. It allows you to start different agents (of different classes)
at once.
Note that the getCount() does not need to match the getAgentParameters().length.
There are three scenarios (according to the relation between those two numbers) and the number of agents the IMultipleAgentRunner will instantiate:
getCount() > getAgentParameters().length - in this case, the IMultipleAgentRunner will instantiate specified number of agents with default parametersgetCount() == getAgentParameters().length - in this case, the IMultipleAgentRunner will instantiate the same number of agents as there are parametersgetCount() < getAgentParameters().length - the IMultipleAgentRunner will instantiate 'count' of agents and first 'number of parameters' will have custom params as specified, rest will have defaults| Modifier and Type | Method and Description |
|---|---|
MODULE |
getAgentModule()
Agent module that contains bindings for the classes, used by
GuiceAgentFactory (or concretely by the Guice)
to instantiate the agent. |
PARAMS[] |
getAgentParameters()
Respective parameters of the agents.
|
int |
getCount()
How many instances this object describes, i.e., how many agents should be instantiated using
getAgentModule(). |
MODULE getAgentModule()
GuiceAgentFactory (or concretely by the Guice)
to instantiate the agent.int getCount()
getAgentModule().PARAMS[] getAgentParameters()
getCount(), i.e.,
there must be a separate parameter instance for every agent).
Note that some parameters may be null as IMultipleAgentRunner implementation can provide
default parameters for agents (usually).
Copyright © 2012 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.