Class AgentManager
Contains methods to create
IEntity instances
from a given input and agent type
Inheritance
System.Object
AgentManager
Assembly: Mars.Components.dll
Syntax
public static class AgentManager : object
Methods
CreateAgents<T>(AgentMapping, RegisterAgent, UnregisterAgent, List<ILayer>, List<IEnvironment>, Int32)
Creates a set of agent with unique identifier according to the inputConfiguration
and optional input data within a
AgentMapping
Declaration
public static IDictionary<Guid, T> CreateAgents<T>(AgentMapping agentInitConfig, RegisterAgent registerAgentHandle, UnregisterAgent unregisterAgentHandle, List<ILayer> layerDependencies = null, List<IEnvironment> environments = null, int reducedCount = null)
where T : IEntity
Parameters
Type |
Name |
Description |
AgentMapping |
agentInitConfig |
Configuration for agent creation, contains the reference to the input data |
RegisterAgent |
registerAgentHandle |
Handle to register the agent entity within the execution system |
UnregisterAgent |
unregisterAgentHandle |
Handle to unregister the agent entity and remove it from the execution system |
List<ILayer> |
layerDependencies |
Optional layer dependencies of the agent type |
List<IEnvironment> |
environments |
Optional environment dependencies for spatial operation e.g. movement and exploration |
System.Int32 |
reducedCount |
Optional specified amount of agent instances to create according to
the available data within the AgentMapping
|
Returns
Type |
Description |
IDictionary<Guid, T> |
A unique identifiable agent entities |
Type Parameters
Name |
Description |
T |
The type from which instances shall be created |
Exceptions
GetAgentsByAgentInitConfig<T>(AgentMapping, RegisterAgent, UnregisterAgent, List<ILayer>, IEnvironment, Int32)
Declaration
public static ConcurrentDictionary<Guid, T> GetAgentsByAgentInitConfig<T>(AgentMapping agentInitConfig, RegisterAgent registerAgentHandle, UnregisterAgent unregisterAgentHandle, List<ILayer> layerDependencies = null, IEnvironment environment = null, int reducedCount = null)
where T : IEntity
Parameters
Returns
Type |
Description |
ConcurrentDictionary<Guid, T> |
|
Type Parameters
SpawnAgents(AgentMapping, RegisterAgent, UnregisterAgent, List<ILayer>, List<IEnvironment>, Int32)
Creates and register the agent set of the specified type within the
AgentMapping type with the
layer type out of the type description
Declaration
public static IDictionary<Guid, IAgent> SpawnAgents(AgentMapping agentInitConfig, RegisterAgent registerAgentHandle, UnregisterAgent unregisterAgentHandle, List<ILayer> layerDependencies = null, List<IEnvironment> environments = null, int reducedCount = null)
Parameters
Type |
Name |
Description |
AgentMapping |
agentInitConfig |
Configuration for agent creation, contains the reference to the input data |
RegisterAgent |
registerAgentHandle |
Handle to register the agent entity within the execution system |
UnregisterAgent |
unregisterAgentHandle |
Handle to unregister the agent entity and remove it from the execution system |
List<ILayer> |
layerDependencies |
Optional layer dependencies of the agent type |
List<IEnvironment> |
environments |
Optional environment dependencies for spatial operation e.g. movement and exploration |
System.Int32 |
reducedCount |
Optional specified amount of agent instances to create according to
the available data within the AgentMapping
|
Returns
Type |
Description |
IDictionary<Guid, IAgent> |
A unique identifiable agent entities |
Exceptions
SpawnAgents<T>(AgentMapping, RegisterAgent, UnregisterAgent, List<ILayer>, List<IEnvironment>, Int32)
Creates and register the agent set of the specified type with the
layer type out of the type description
Declaration
public static IDictionary<Guid, T> SpawnAgents<T>(AgentMapping agentInitConfig, RegisterAgent registerAgentHandle, UnregisterAgent unregisterAgentHandle, List<ILayer> layerDependencies = null, List<IEnvironment> environments = null, int reducedCount = null)
where T : IAgent
Parameters
Type |
Name |
Description |
AgentMapping |
agentInitConfig |
Configuration for agent creation, contains the reference to the input data |
RegisterAgent |
registerAgentHandle |
Handle to register the agent entity within the execution system |
UnregisterAgent |
unregisterAgentHandle |
Handle to unregister the agent entity and remove it from the execution system |
List<ILayer> |
layerDependencies |
Optional layer dependencies of the agent type |
List<IEnvironment> |
environments |
Optional environment dependencies for spatial operation e.g. movement and exploration |
System.Int32 |
reducedCount |
Optional specified amount of agent instances to create according to
the available data within the AgentMapping
|
Returns
Type |
Description |
IDictionary<Guid, T> |
A unique identifiable agent entities |
Type Parameters
Name |
Description |
T |
The type from which instances shall be created |
Exceptions