• MARS Website
  • Core API
  • SmartOpenHamburg API
  • Model Components API
  • Common API
Show / Hide Table of Contents
  • Mars.Core
    • DependencyRegistrationCore
  • Mars.Core.Data
    • AbstractConfigLoader
    • AbstractEntityManager
    • AgentManagerImpl
    • DomainDataMediatorImpl
    • EntityManagerImpl
    • IAgentManager
    • IEntityManager
    • IEntityMapping
    • IGeneratedEntityLogger
    • IGeneratedLayerLogger
    • IGeneratedLogger<TModel>
    • IGeneratedTypeLogger
    • IModelCompiler
    • IOutputLogger
    • IPlatformSelector
    • ISchemaMigrationProvider
    • ISerializerManager
    • PlatformSelectorImpl
  • Mars.Core.Data.Compiler
    • AbstractEntityMapper
    • AbstractJitMapper
    • AbstractLayerMapper
    • AbstractMapper<TModel>
    • AbstractTypeMapper
    • RoslynCompilerUtils
  • Mars.Core.Data.Entities
    • CircleFilter
    • Condition
    • ConjunctiveWhere
    • DataFrame
    • DisjunctiveWhere
    • EqualityCondition
    • IntersectionFilter
    • ISelection
    • NearestFilter
    • Query
    • WindowFilter
    • WithinFilter
  • Mars.Core.Data.Exceptions
    • AgentInitializationException
  • Mars.Core.Data.Mapping
    • DefaultSourceProvider
    • ReflectiveMapping
  • Mars.Core.Data.Wrapper
    • AbstractOperationWrapper
    • AbstractWrapper
    • AbstractWrapper<TOptions>
    • GlobalRestrictions
    • ICircleQueryOperation
    • IIntersectionOperation
    • ILookupOperation
    • INearestOperation
    • IOperation
    • IPlatform
    • IQueryOperation
    • ISnapshot
    • IWindowQueryOperation
    • IWithinOperation
    • IWrapper
    • KnnGraphWrapper
    • PostGisWrapper
  • Mars.Core.Data.Wrapper.Document
    • IMongoConnection
    • IMongoWrapper
    • MongoDbIteratorHelper
    • MongoDbWrapper
  • Mars.Core.Data.Wrapper.File
    • AbstractFileWrapper<TOptions>
    • AscWrapper
    • GeoJsonWrapper
  • Mars.Core.Data.Wrapper.Memory
    • DataTableWrapper
    • GeoHashTrieWrapper
    • KdTreeWrapper
    • TripPosition
    • TripPositionCoordinateConverter
    • TripsCollection
    • TripsLineConverter
    • TripsTrajectoryWrapper
  • Mars.Core.Data.Wrapper.Relational
    • AbstractRelationalConnection
    • PostgresSqlDbConnection
    • PostgresSqlWrapper
    • RelationalMapperException
    • RelationalSqlWrapper<TOptions>
    • SqliteDbConnection
    • SqliteWrapper
  • Mars.Core.Data.Wrapper.Stream
    • MqttWrapper
    • SimulationTypeInfo
  • Mars.Core.Executor
    • IRuntimeModel
    • ISimulationProgress
    • IStepExecutor
  • Mars.Core.Executor.Entities
    • Parametrization
    • StepParam
  • Mars.Core.Executor.Implementation
    • RuntimeModelImpl
    • SimulationProgressImpl
    • StepExecutionUseCase
  • Mars.Core.Model
    • IConfigLoader
    • IModelContainer
    • IModelResolver
  • Mars.Core.Model.Entities
    • LayerInstanceContainer
  • Mars.Core.Model.Exceptions
    • InvalidMappingException
    • MissingConstructorException
    • ModelResolutionException
    • ValidationException
  • Mars.Core.Model.Implementation
    • DependencyBuilder
    • MappingHelper
    • ModelContainer
    • ValidationIssueLevel
    • ValidationResult
    • Validator
  • Mars.Core.Simulation
    • ISimulation
    • ISimulationControl
  • Mars.Core.Simulation.Entities
    • SimulationRestartArgs
    • SimulationWorkflowState

Class AgentManagerImpl

This class implements the entity management with construction, destruction query capabilities to interact with agent types.
Inheritance
System.Object
DomainDataMediatorImpl
AbstractEntityManager
AgentManagerImpl
Implements
IAgentManager
Inherited Members
AbstractEntityManager.MappingWorkflow
AbstractEntityManager.ConfigLoader
AbstractEntityManager.Mappings
AbstractEntityManager.Create<TEntity>(IReadOnlyCollection<IModelObject>, TypeMapping, TypeElement, IEnumerable<IDomainData>)
DomainDataMediatorImpl.Read<T>(IEnumerable<Input>)
DomainDataMediatorImpl.Read(TypeMapping)
DomainDataMediatorImpl.Read(IEnumerable<Input>)
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Mars.Core.Data
Assembly: Mars.Core.dll
Syntax
public class AgentManagerImpl : AbstractEntityManager, IAgentManager

Constructors

| Improve this Doc View Source

AgentManagerImpl(IConfigLoader, IRuntimeModel, IModelResolver, ISerializerManager)

Creates a new IAgentManager with a custom mapping implementation Mars.Core.Data.Mapping.AgentReflectiveMapping suitable for all agent specific properties such as layers and un-/registration handles.
Declaration
public AgentManagerImpl(IConfigLoader configLoader, IRuntimeModel runtimeModel, IModelResolver modelResolver, ISerializerManager serializerManager)
Parameters
Type Name Description
IConfigLoader configLoader The config loader holding all references to mappings and type descriptions.
IRuntimeModel runtimeModel The runtime model with all registered agents, layer and entity objects.
IModelResolver modelResolver The resolver to get all automatically created layer singleton instances.
ISerializerManager serializerManager The serializer to register/unregister entities for in-/output.

Methods

| Improve this Doc View Source

Create<TAgent>(List<IModelObject>)

This class implements the entity management with construction, destruction query capabilities to interact with agent types.
Declaration
public IEnumerable<TAgent> Create<TAgent>(List<IModelObject> dependencies = null)
    where TAgent : IAgent
Parameters
Type Name Description
System.Collections.Generic.List<IModelObject> dependencies
Returns
Type Description
System.Collections.Generic.IEnumerable<TAgent>
Type Parameters
Name Description
TAgent
| Improve this Doc View Source

Create<TAgent, TLayer>(IEnumerable<IDomainData>, List<IModelObject>, Action<TAgent>)

Creates concrete TAgent from the given set of data objects describing the entity.
Declaration
public IEnumerable<TAgent> Create<TAgent, TLayer>(IEnumerable<IDomainData> data, List<IModelObject> dependencies, Action<TAgent> assignment)
    where TAgent : IAgent<TLayer>, new()
    where TLayer : ILayer
Parameters
Type Name Description
System.Collections.Generic.IEnumerable<IDomainData> data The set of data object from which to construct the agent.
System.Collections.Generic.List<IModelObject> dependencies Required dependencies such as other layers or environments.
System.Action<TAgent> assignment An optional data assignment delegate, can be used before the Init(TLayer) method is called but after the construction has been done.
Returns
Type Description
System.Collections.Generic.IEnumerable<TAgent> Returns an iterator over a construction of TEntities's as long the data object provide new data or when no data is provided the user has limit the set by calling Take(nthElements)
Type Parameters
Name Description
TAgent The concrete agent type to create and return.
TLayer The concrete layer type to resolve for this agent.
Remarks
This construction is an infinite iterator based construction when no data objects are provided to this method. This means the call have to limit the set of returned objects.
| Improve this Doc View Source

Create<TAgent, TLayer>(List<IModelObject>, Action<TAgent>)

This class implements the entity management with construction, destruction query capabilities to interact with agent types.
Declaration
public IEnumerable<TAgent> Create<TAgent, TLayer>(List<IModelObject> dependencies = null, Action<TAgent> assignment = null)
    where TAgent : IAgent<TLayer>, new()
    where TLayer : ILayer
Parameters
Type Name Description
System.Collections.Generic.List<IModelObject> dependencies
System.Action<TAgent> assignment
Returns
Type Description
System.Collections.Generic.IEnumerable<TAgent>
Type Parameters
Name Description
TAgent
TLayer
| Improve this Doc View Source

Spawn<TAgent>(List<IModelObject>)

Creates concrete TAgent and registers the at the runtime system, The object is constructed with the given dependencies and data objects describing the entity.
Declaration
public IEnumerable<TAgent> Spawn<TAgent>(List<IModelObject> dependencies = null)
    where TAgent : IAgent
Parameters
Type Name Description
System.Collections.Generic.List<IModelObject> dependencies Required dependencies such as other layers or environments.
Returns
Type Description
System.Collections.Generic.IEnumerable<TAgent> Returns an iterator over a construction of TEntities's as long the data object provide new data or when no data is provided the user has limit the set by calling Take(nthElements)
Type Parameters
Name Description
TAgent The concrete agent type to create and return.
Remarks
This construction is an infinite iterator based construction when no data objects are provided to this method. This means the call have to limit the set of returned objects.
| Improve this Doc View Source

Spawn<TAgent, TLayer>(List<IModelObject>, Action<TAgent>)

Creates concrete TAgent and registers the at the runtime system, The object is constructed with the given dependencies and data objects describing the entity.
Declaration
public IEnumerable<TAgent> Spawn<TAgent, TLayer>(List<IModelObject> dependencies = null, Action<TAgent> assignment = null)
    where TAgent : IAgent<TLayer>, new()
    where TLayer : ILayer
Parameters
Type Name Description
System.Collections.Generic.List<IModelObject> dependencies Required dependencies such as other layers or environments.
System.Action<TAgent> assignment An optional data assignment delegate, can be used before the Init(TLayer) method is called but after the construction has been done.
Returns
Type Description
System.Collections.Generic.IEnumerable<TAgent> Returns an iterator over a construction of TEntities's as long the data object provide new data or when no data is provided the user has limit the set by calling Take(nthElements)
Type Parameters
Name Description
TAgent The concrete agent type to create and return.
TLayer The concrete layer type to resolve for this agent.
Remarks
This construction is an infinite iterator based construction when no data objects are provided to this method. This means the call have to limit the set of returned objects.

Implements

IAgentManager

Extension Methods

Serializer.Save<T>(T, out Byte[], SerializerCompression)
Serializer.Save<T>(T, Stream, SerializerCompression)
Serializer.Save<T>(T, BinaryFormatter, Stream, SerializerCompression)
Serializer.Save<T>(T, String, SerializerCompression)
Serializer.Save<T>(T, String)
Matrix.Concatenate<T>(T, T[])
Matrix.Replace<T>(T, Object, Object)
DomainDataImporter.Import(Object, InputConfiguration)
ObjectSerialize.Serialize(Object)
Matrix.IsEqual(Object, Object, Decimal, Decimal)
  • Improve this Doc
  • View Source
In This Article
Back to top Copyright © MARS GROUP. HAW Hamburg