• MARS Website
  • Core API
  • SmartOpenHamburg API
  • Model Components API
  • Common API
Show / Hide Table of Contents
  • Mars.Components
    • DependencyRegistrationModelling
  • Mars.Components.Agents
    • AbstractAgent
    • AbstractEntity
    • Agent
  • Mars.Components.Environments
    • AbstractEnvironment
    • AbstractGraphElement
    • AlwaysPassingNodeGuard
    • EntityLane<TEntity>
    • GeoEnvironment
    • GeoHashEnvironment<T>
    • IEnvironmentMediator
    • IModalChoiceResolver
    • PathHeuristics
    • SpatialEdge
    • SpatialGraphEntityExtensions
    • SpatialGraphEnvironment
    • SpatialGraphHelper
    • SpatialHashEnvironment<TEntity>
    • SpatialLane
    • SpatialNode
    • WorldIndexExtensions
  • Mars.Components.Environments.Cartesian
    • CartesianEnvironment<TEntity>
    • CollisionEnvironment<TCharacter, TObstacle>
    • CollisionKind
    • ConeExplorationView
    • ExplorationView
    • GeometryFactory
    • ICartesianEnvironment<TEntity>
    • ICharacter
    • ICollidable
    • ICollisionEnvironment<TCharacter, TObstacle>
    • IObstacle
    • IVisible
    • RayExplorationView
    • TrapezoidExploration
    • VisibilityKind
  • Mars.Components.Environments.Cartesian.Routing
    • CartesianRoutingService<TObstacle>
    • GeometryCoordinatesRoutingPointsGenerator
    • HomogenousRoutingPointsGenerator
    • IRoutingPointsGenerator
    • RandomRoutingPointsGenerator
    • SectionalRandomRoutingPointsGenerator
  • Mars.Components.Layers
    • AbstractActiveLayer
    • AbstractEnvelopedLayer
    • AbstractLayer
    • AbstractVectorFeature
    • AgentSchedulerLayer<TAgent, TLayer>
    • QuerySourceLoader
    • RasterLayer
    • SchedulerEntry
    • SchedulerLayer
    • VectorFeature
    • VectorLayer
    • VectorLayer<T>
    • VectorLayerHelper
  • Mars.Components.Layers.Temporal
    • IQueryFieldProvider
    • ITemporalObjectCatalog
    • ITemporalObjectIterator
    • TemporalCatalogFeature<TKey>
    • TemporalFeatureKind
    • TemporalMetadataLoader
  • Mars.Components.Services
    • AgentManager
  • Mars.Components.Services.Explorations
    • BoltzmannExploration
    • EpsilonGreedyExploration
    • IExplorationPolicy
    • RouletteWheelExploration
    • TabuSearchExploration
  • Mars.Components.Services.Learning
    • InfiniteQLearning
    • QLearning
    • Sarsa
  • Mars.Components.Services.Planning
    • ActionPlanResult
    • GoapAction
    • GoapAgentStates
    • GoapGoal
    • GoapPlanner
    • GoapStateKey<T>
    • GoapStateProperty
    • GoapStateProperty<TElement>
    • IGoapAction
    • IGoapAgentStates
    • IGoapGoal
    • IGoapPlanner
    • IGoapStateKey
    • StatesCommons
  • Mars.Components.Services.Planning.ActionCommons
    • AllGoalsSatisfiedAction
    • NoGoalReachableAction
  • Mars.Components.Starter
    • Command
    • CommandArgumentContainer
    • CommandParser
    • CommandSet
    • HelpCommand
    • Option
    • OptionContext
    • OptionException
    • OptionSet
    • OptionValueCollection
    • OptionValueType
    • SimulationStarter
  • Mars.Components.Starter.Exceptions
    • SimulationStartupException
  • Mars.Interfaces
    • IModelObject
    • ISimulationContainer
    • ISimulationContext
    • ISimulationModule
    • ISimulationState
    • IStepExecutionContext
    • SimulationContext
    • SimulationContext.WorkflowStateType
    • StepExecutionContext
  • Mars.Interfaces.Agents
    • IAgent
    • IAgent<TLayer>
    • IEntity
    • IMarsDslAgent
    • IModalCapabilitiesAgent
    • ISpatialGraphEntity
    • ITickClient
  • Mars.Interfaces.Annotations
    • ActiveConstructor
    • PropertyDescription
  • Mars.Interfaces.Data
    • AbstractDomainData
    • GeometryData
    • IDomainData
    • IGeometryData
    • IIdentifiableData
    • IMarsFeature
    • IRasterBandData
    • ISource
    • IStringData
    • IStringStructuredData
    • IStructuredData
    • IStructuredDataGeometry
    • IValueData
    • LayerInitData
    • RasterBandData
    • StringDataDto
    • StructuredData
    • VectorStructuredData
  • Mars.Interfaces.Environments
    • BoundingBox
    • DirectionType
    • EdgeExploreResult
    • EdgeStop
    • ExploreDirection
    • GeoPositionExtension
    • HighwayType
    • IEdge<TEdge, TNode>
    • IEntityLane<TEntity>
    • IEnvironment
    • IEnvironment<TEntity>
    • IGeoGridEnvironment<T>
    • IGraphEntity
    • IGraphEnvironment<TEdge, TNode>
    • INode<TEdge, TNode>
    • INodeGuard
    • IPositionable
    • IRoutePlanner
    • ISpatialEdge
    • ISpatialGraphEnvironment
    • ISpatialLane
    • ISpatialNode
    • LaneExploreResult
    • ModalChoice
    • MultimodalRoute
    • NodeIntegrationKind
    • Position
    • Route
    • RouteStop
    • Size
    • SpatialGraphExploreResult
    • SpatialModalityType
    • TrafficLightPhase
  • Mars.Interfaces.Layers
    • FinallySimulationStep
    • IChangingLayer
    • IDataContainer
    • IDataLayer
    • IDataSet
    • IEnvelopDataLayer
    • ILayer
    • IMarsDslLayer
    • IModalChoiceConsumer
    • InitSimulationStep
    • INotifyChangedSource<T>
    • IRaster<TValue>
    • IRasterLayer
    • ISteppedActiveLayer
    • IVectorFeature
    • IVectorLayer
    • IVectorLayer<T>
    • IVectorNode<TEntity>
    • RegisterAgent
    • UnregisterAgent
  • Mars.Interfaces.Model
    • ActiveTypeMapping
    • AgentMapping
    • AgentType
    • ConstructorType
    • ContainsOperator
    • DataContainer
    • DataType
    • EntityMapping
    • EntityType
    • Execution
    • FeatureType
    • Globals
    • IdentifiableElement
    • IndividualMapping
    • Input
    • InputConfiguration
    • LayerMapping
    • LayerType
    • ModelDescription
    • ModelElement
    • ObjectType
    • Output
    • OutputConfiguration
    • OutputFilter
    • OutputKind
    • OutputTargetType
    • ParameterMapping
    • Processing
    • ProcessingConfiguration
    • ProcessingTargetType
    • PropertyType
    • SimulationConfig
    • TimeSpanUnit
    • TimeSpanUnitExtensions
    • TypeElement
    • TypeMapping
  • Mars.Interfaces.Model.Converters
    • CultureConverter
    • SerializationTypeConverter
    • TimeSpanUnitConverter
  • Mars.Interfaces.Model.Exceptions
    • InvalidTypeException
    • MissingTypeException
  • Mars.Interfaces.Model.Options
    • AbstractEndpointOptions
    • AbstractFileOptions
    • AbstractOptions
    • AscOptions
    • CsvOptions
    • GeoJsonOptions
    • MongoOptions
    • MqttOptions
    • PostgresSqlOptions
    • RedisOptions
    • RelationalEndpointOptions
    • SerializationType
    • SocketOutputOptions
    • SpatialGraphOptions
    • SqLiteOptions
    • TripsOptions

Interface IEnvironment<TEntity>

Common environment interface to store entity type within a spatial index.
Namespace: Mars.Interfaces.Environments
Assembly: Mars.Interfaces.dll
Syntax
public interface IEnvironment<TEntity> : IEnvironment, IModelObject where TEntity : IEntity, IPositionable
Type Parameters
Name Description
TEntity The type of the concrete entity implementing IEntity

Methods

| Improve this Doc View Source

Explore(Position, Double, Int32, Func<TEntity, Boolean>)

Queries the a set of nearest entities around the position with with optional specified radius and count for the positioning system of the IEnvironment.
Declaration
IEnumerable<TEntity> Explore(Position position = null, double radius = -1, int count = -1, Func<TEntity, bool> predicate = null)
Parameters
Type Name Description
Position position The Position from which the exploration shall be started.
System.Double radius The range of the exploration circle.
System.Int32 count The amount of entities to find.
System.Func<TEntity, System.Boolean> predicate A predicate to select only specific entities based on a condition.
Returns
Type Description
System.Collections.Generic.IEnumerable<TEntity> An distance based order from the nearest entity to tha farthest
| Improve this Doc View Source

Explore(Double, Double, Double, Int32, Func<TEntity, Boolean>)

Queries the environment for entities of type from a specified position in form of a 2D coordinate (x,y). The query can be restricted by optional passed query limit and the radius to lookup. Also the lookup in up-/downwards or in right/leftwards can be configured.
Declaration
IEnumerable<TEntity> Explore(double x, double y, double radius = -1, int count = -1, Func<TEntity, bool> predicate = null)
Parameters
Type Name Description
System.Double x The outgoing x coordinate.
System.Double y The outgoing y coordinate.
System.Double radius Optional radius interpreted as euclidean coordinate distance.
System.Int32 count Optional limit of entities to query.
System.Func<TEntity, System.Boolean> predicate Optional predicate which will be applied during query execution to filter out entities matching a specific condition.
Returns
Type Description
System.Collections.Generic.IEnumerable<TEntity> Returns a collection of distance-based ordered entities of type .
| Improve this Doc View Source

Explore(Double[], Double, Int32, Func<TEntity, Boolean>)

Queries the a set of nearest entities around the with with optional specified radius and count
Declaration
IEnumerable<TEntity> Explore(double[] position, double radius = -1, int count = -1, Func<TEntity, bool> predicate = null)
Parameters
Type Name Description
System.Double[] position The discrete position from which the exploration shall be calculated
System.Double radius The radius of exploration range
System.Int32 count The amount of entities to find
System.Func<TEntity, System.Boolean> predicate A predicate to filter specific entities
Returns
Type Description
System.Collections.Generic.IEnumerable<TEntity> An distance based order from the nearest entity to tha farthest
| Improve this Doc View Source

Insert(TEntity)

Inserts an positionable entity into the environment defined by their
Declaration
bool Insert(TEntity entity)
Parameters
Type Name Description
TEntity entity The entity to passionate.
Returns
Type Description
System.Boolean Returns True if the entity was successfully inserted
| Improve this Doc View Source

MoveTo(TEntity, Position, Double, Func<Double[], Boolean>)

Moves an entity to the destination of type Position along an optimal ray path with minimal costs. Note that his method does not guarantee to reach the destination.
Declaration
Position MoveTo(TEntity entity, Position position, double distance = 1.7976931348623157E+308, Func<double[], bool> predicate = null)
Parameters
Type Name Description
TEntity entity The entity to move.
Position position The target destination coordinate.
System.Double distance The distance to move
System.Func<System.Double[], System.Boolean> predicate The predicate along the movement which need to be valid or null
Returns
Type Description
Position Returns the new position of the entity> or null if no positioning happened.
| Improve this Doc View Source

MoveTo(TEntity, Double, Double, Double, Func<Double[], Boolean>)

Moves an entity to the destination along an optimal ray path with minimal costs. Note that his method does not guarantee to reach the destination.
Declaration
Position MoveTo(TEntity entity, double x, double y, double distance = 1.7976931348623157E+308, Func<double[], bool> predicate = null)
Parameters
Type Name Description
TEntity entity The entity to move
System.Double x The x coordinate of the destination.
System.Double y The y coordinate of the destination.
System.Double distance The distance to move
System.Func<System.Double[], System.Boolean> predicate The predicate along the movement which need to be valid or null
Returns
Type Description
Position Returns the new position of the entity> or null if no positioning happened.
| Improve this Doc View Source

MoveTo(TEntity, Double[], Double, Func<Double[], Boolean>)

Moves an entity to destination along an optimal path with minimal costs. Note that his method does not guarantee to reach the destination.
Declaration
Position MoveTo(TEntity entity, double[] position = null, double distanceInMeter = 1.7976931348623157E+308, Func<double[], bool> predicate = null)
Parameters
Type Name Description
TEntity entity
System.Double[] position The discrete position target
System.Double distanceInMeter The distance to move
System.Func<System.Double[], System.Boolean> predicate The predicate along the movement which need to be valid or null
Returns
Type Description
Position Returns the new position of the entity> or null if no positioning happened.
| Improve this Doc View Source

MoveTowards(TEntity, DirectionType, Double)

Moves an entity the travelling distance distanceToPass towards the direction with a fixed bearing.
Declaration
Position MoveTowards(TEntity entity, DirectionType direction, double distanceToPass = 1)
Parameters
Type Name Description
TEntity entity The entity to move
DirectionType direction One of the eight direction on a 2D plane, including diagonal
System.Double distanceToPass The distance units to pass.
Returns
Type Description
Position Returns the new position of the entity or null if no positioning happened.
| Improve this Doc View Source

MoveTowards(TEntity, Double, Double)

Moves an entity the travelling distance distanceToPass towards the bearing direction.
Declaration
Position MoveTowards(TEntity entity, double bearing, double distanceToPass = 0)
Parameters
Type Name Description
TEntity entity The entity to move
System.Double bearing The bearing in degree in value range 0-360
System.Double distanceToPass The distance units to pass.
Returns
Type Description
Position Returns the new position of the entity> or null if no positioning happened.
| Improve this Doc View Source

PosAt(TEntity, Double, Double)

Moves an entity to the desired destination.
Declaration
Position PosAt(TEntity entity, double x, double y)
Parameters
Type Name Description
TEntity entity the object to move
System.Double x The x coordinate of the destination.
System.Double y The y coordinate of the destination.
Returns
Type Description
Position Returns the new position of the entity> or null if no positioning happened.
| Improve this Doc View Source

PosAt(TEntity, Double[])

Set the entity exactly at the desired position without any movement actions.
Declaration
Position PosAt(TEntity entity, double[] position)
Parameters
Type Name Description
TEntity entity the object to move
System.Double[] position The coordinates of the position to position to
Returns
Type Description
Position Returns the new position of the entity> or null if no positioning happened.
| Improve this Doc View Source

Remove(TEntity)

Removes the entity item from the environment at the defined Position over the IPositionable implementation of entity.
Declaration
bool Remove(TEntity entity)
Parameters
Type Name Description
TEntity entity The entity and position to remove
Returns
Type Description
System.Boolean Returns True if the entity was successfully removed

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