• 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 ISpatialGraphEnvironment

Inherited Members
IGraphEnvironment<ISpatialEdge, ISpatialNode>.Nodes
IGraphEnvironment<ISpatialEdge, ISpatialNode>.Edges
IGraphEnvironment<ISpatialEdge, ISpatialNode>.NodesMap
IGraphEnvironment<ISpatialEdge, ISpatialNode>.AddNode(IDictionary<String, Object>)
IGraphEnvironment<ISpatialEdge, ISpatialNode>.AddEdge(ISpatialNode, ISpatialNode, IDictionary<String, Object>)
IGraphEnvironment<ISpatialEdge, ISpatialNode>.RemoveEdge(ISpatialEdge)
IGraphEnvironment<ISpatialEdge, ISpatialNode>.RemoveNode(ISpatialNode)
IGraphEnvironment<ISpatialEdge, ISpatialNode>.NearestNodesByHops(ISpatialNode, Int32)
IGraphEnvironment<ISpatialEdge, ISpatialNode>.GetRandomNode()
IRoutePlanner.FindShortestHopRoute(ISpatialNode, ISpatialNode, Func<ISpatialEdge, Boolean>)
IRoutePlanner.FindFastestRoute(ISpatialNode, ISpatialNode, Func<ISpatialEdge, Boolean>)
IRoutePlanner.FindShortestRoute(ISpatialNode, ISpatialNode, Func<ISpatialEdge, Boolean>)
IRoutePlanner.FindRoute(ISpatialNode, ISpatialNode, Func<ISpatialNode, ISpatialEdge, ISpatialNode, Double>, Func<ISpatialEdge, Boolean>)
Namespace: Mars.Interfaces.Environments
Assembly: Mars.Interfaces.dll
Syntax
public interface ISpatialGraphEnvironment : IGraphEnvironment<ISpatialEdge, ISpatialNode>, IEnvironment, IModelObject, IRoutePlanner

Properties

| Improve this Doc View Source

BoundingBox

The calculated Bounding Box of the spatial environment based on the GeoCoordinates within the nodes
Declaration
BoundingBox BoundingBox { get; }
Property Value
Type Description
BoundingBox
| Improve this Doc View Source

Entities

Gets a Dictionary containing all agents.
Declaration
IDictionary<ISpatialGraphEntity, IGraphEntity> Entities { get; }
Property Value
Type Description
System.Collections.Generic.IDictionary<ISpatialGraphEntity, IGraphEntity> Mapping of all agent entities to graph entity.
| Improve this Doc View Source

Modalities

Holds all
SpatialModalityType
s that occur in the environments lanes.
Declaration
ISet<SpatialModalityType> Modalities { get; }
Property Value
Type Description
System.Collections.Generic.ISet<SpatialModalityType>
| Improve this Doc View Source

Options

Gets the used settings for this environment, with inputs, index configurations and modality restrictions.
Declaration
SpatialGraphOptions Options { get; }
Property Value
Type Description
SpatialGraphOptions

Methods

| Improve this Doc View Source

Explore(ISpatialGraphEntity, Route, Double, Boolean, ExploreDirection)

Explores multiple edges in front of an entity on forward, backward or both directions up to the requested distance.
Declaration
SpatialGraphExploreResult Explore(ISpatialGraphEntity entity, Route route, double distance, bool onlyNext = true, ExploreDirection direction = ExploreDirection.Forward)
Parameters
Type Name Description
ISpatialGraphEntity entity The already inserted entity in the environment from which to start the query.
Route route The route with edges that shall be explored along the path.
System.Double distance The distance in meter up to which the explore should go.
System.Boolean onlyNext The flag, when true, indicating that only the first explored entity of each edge and lane shall be returned an nothing more what could also behind the explored one.
ExploreDirection direction The direction whether forward, backward or in both shall be queried for other entities.
Returns
Type Description
SpatialGraphExploreResult Returns a full SpatialGraphExploreResult which includes all explored entities along the path separated by each lane in forward or backward direction.
| Improve this Doc View Source

ExploreLazy(ISpatialGraphEntity, Route, Double, ExploreDirection)

Performs a lazy exploration query on the network with the route given as the path where along all entities within the exploration distance in meter shall be returned. The exploration is started from the point the input entity and does not include it.
Declaration
IEnumerable<EdgeExploreResult> ExploreLazy(ISpatialGraphEntity entity, Route route, double distance, ExploreDirection direction = ExploreDirection.Forward)
Parameters
Type Name Description
ISpatialGraphEntity entity The entity from which to start the exploration.
Route route The route with edges and lanes along to explore
System.Double distance The distance in meter how far shall be looked.
ExploreDirection direction The direction whether forward, backward or in both shall be queried for other entities.
Returns
Type Description
System.Collections.Generic.IEnumerable<EdgeExploreResult> Returns an System.Collections.Generic.IEnumerable<T> of EdgeExploreResult which are collected lazy only when an access on the element is required.
| Improve this Doc View Source

Insert(ISpatialGraphEntity, ISpatialEdge, Double, Int32)

Insert an entity at the specified edge with the offset (Default is zero) in the environment and assign them the spatial position of this edge + offset.
Declaration
bool Insert(ISpatialGraphEntity entity, ISpatialEdge edge, double offset = 0, int lane = 0)
Parameters
Type Name Description
ISpatialGraphEntity entity The entity to insert into the environment.
ISpatialEdge edge The edge at which the agent shall be inserted.
System.Double offset The position offset in meter on the specified edge specifying at which distance to the source the entity shall be inserted.
System.Int32 lane The lane index on which lane the entity shall be inserted
Returns
Type Description
System.Boolean Returns true if the agent could be inserted or false otherwise (e.g., caused by collisions with other entities).
| Improve this Doc View Source

Insert(ISpatialGraphEntity, ISpatialNode)

Inserts an entity at the specified node in the environment and assign them the spatial position of this node and no edge and zero edge offset.
Declaration
bool Insert(ISpatialGraphEntity entity, ISpatialNode node)
Parameters
Type Name Description
ISpatialGraphEntity entity The entity to insert into the environment.
ISpatialNode node The node at which the agent shall be inserted in inherit the spatial position.
Returns
Type Description
System.Boolean Returns true if the agent was inserted or false otherwise.
| Improve this Doc View Source

Move(ISpatialGraphEntity, Route, Double)

Move an entity forward using the specified edges and lanes on them and updates the ISpatialGraphEntitys respective attributes.
Declaration
bool Move(ISpatialGraphEntity entity, Route route, double distance)
Parameters
Type Name Description
ISpatialGraphEntity entity The entity to be moved
Route route The entities route depicting the edge stops and lanes the instance desired.
System.Double distance The distance how fare the agents want to move.
Returns
Type Description
System.Boolean Returns true when a movement action was successfully and the entity has been updated.
| Improve this Doc View Source

NearestNode(Position, Nullable<SpatialModalityType>, Nullable<SpatialModalityType>, Double)

Resolve the passed position and returns the nearest ISpatialNode.
Declaration
ISpatialNode NearestNode(Position position, SpatialModalityType? incomingModality = null, SpatialModalityType? outgoingModality = null, double radiusInMeter = 1.7976931348623157E+308)
Parameters
Type Name Description
Position position The coordinate to resolve
System.Nullable<SpatialModalityType> incomingModality Filters nodes to only those that have given modality in incoming edges.
System.Nullable<SpatialModalityType> outgoingModality Filters nodes to only those that have given modality in outgoing edges.
System.Double radiusInMeter The radius to lookup in meter, Default is infinity
Returns
Type Description
ISpatialNode Returns the nearest ISpatialNode in the graph or null if nothing was found..
| Improve this Doc View Source

NearestNodes(Position, Double, Nullable<Int32>)

Resolve the passed coordinate and returns the nearest ISpatialNode.
Declaration
IEnumerable<ISpatialNode> NearestNodes(Position coordinate, double radiusInMeter = 1.7976931348623157E+308, int? limit = null)
Parameters
Type Name Description
Position coordinate The coordinate to resolve
System.Double radiusInMeter The radius to lookup in meter, Default is infinity
System.Nullable<System.Int32> limit The optional upper limit of element to retrieve from the network otherwise the maximum available element set will be returned.
Returns
Type Description
System.Collections.Generic.IEnumerable<ISpatialNode> Returns the nearest ISpatialNode in the graph or null if nothing was found..
| Improve this Doc View Source

Remove(ISpatialGraphEntity)

Remove an entity from the environment and updates their PositionOnCurrentEdge CurrentEdge attributes accordingly.
Declaration
bool Remove(ISpatialGraphEntity entity)
Parameters
Type Name Description
ISpatialGraphEntity entity The entity to remove.
Returns
Type Description
System.Boolean True if agent could be removed (was in the spatial graph environment false if the agent wasn't in the spatial graph environment.
| Improve this Doc View Source

Traverse(ISpatialNode, Action<ISpatialNode>, Int32)

Walks through the graph by applying the iterative deepening search in which the benefits of BFS by visiting all nodes ordered by their hop/edge count and DFS in which the maximum space consumption is O(n * t), than O(n^t+1)
Declaration
void Traverse(ISpatialNode start, Action<ISpatialNode> callback, int depth = -1)
Parameters
Type Name Description
ISpatialNode start The starting node.
System.Action<ISpatialNode> callback The callback function which is invoked when a new ISpatialNode is visited.
System.Int32 depth The optional amount of hops or rather depth traverse into. Default is -1 for no restriction.

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)
SpatialGraphHelper.ToGeoJson(ISpatialGraphEnvironment)
WorldIndexExtensions.CreateWorldIndex(ISpatialGraphEnvironment, SpatialGraphOptions)
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