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

Inherited Members
IEdge<ISpatialEdge, ISpatialNode>.From
IEdge<ISpatialEdge, ISpatialNode>.To
IGraphEntity.Index
IGraphEntity.Attributes
System.Collections.Generic.IEqualityComparer<Mars.Interfaces.Environments.IGraphEntity>.Equals(Mars.Interfaces.Environments.IGraphEntity, Mars.Interfaces.Environments.IGraphEntity)
System.Collections.Generic.IEqualityComparer<Mars.Interfaces.Environments.IGraphEntity>.GetHashCode(Mars.Interfaces.Environments.IGraphEntity)
Namespace: Mars.Interfaces.Environments
Assembly: Mars.Interfaces.dll
Syntax
public interface ISpatialEdge : IEdge<ISpatialEdge, ISpatialNode>, IGraphEntity, IEqualityComparer<IGraphEntity>

Properties

| Improve this Doc View Source

Entities

List of entities on this edge
Declaration
IReadOnlyCollection<ISpatialGraphEntity> Entities { get; }
Property Value
Type Description
System.Collections.Generic.IReadOnlyCollection<ISpatialGraphEntity>
| Improve this Doc View Source

Geometry

Gets or sets the geometry data which is represented by a sequence of geographic coordinates to represent e.g., curves on a road.
Declaration
Position[] Geometry { get; }
Property Value
Type Description
Position[]
| Improve this Doc View Source

GeometryLength

Gets the line with each element representing the length until this point. This collection is a helper collection for Geometry
Declaration
int[] GeometryLength { get; }
Property Value
Type Description
System.Int32[]
| Improve this Doc View Source

HighwayType

Gets or sets the highway kind of this road segment.
Declaration
HighwayType HighwayType { get; }
Property Value
Type Description
HighwayType
| Improve this Doc View Source

LaneCount

Gets or set the maximum amount of lanes on this segment. When the lane count is being set all remaining entities will be removed.
Declaration
int LaneCount { get; }
Property Value
Type Description
System.Int32
| Improve this Doc View Source

Lanes

Gets the lanes of this road edge.
Declaration
IEnumerable<ISpatialLane> Lanes { get; }
Property Value
Type Description
System.Collections.Generic.IEnumerable<ISpatialLane>
| Improve this Doc View Source

Length

Gets or sets the edge length When the length is being set all remaining entities will be removed.
Declaration
double Length { get; set; }
Property Value
Type Description
System.Double
| Improve this Doc View Source

MaxSpeed

Gets or sets the max speed to pass this edge in meter per seconds.
Declaration
double MaxSpeed { get; set; }
Property Value
Type Description
System.Double
Remarks
If the attribute value holds multiple max speeds, then the min value is chosen.
| Improve this Doc View Source

Modalities

Gets or sets the modalities, identified as string to distinguish imported multiple graphs.
Declaration
ISet<SpatialModalityType> Modalities { get; }
Property Value
Type Description
System.Collections.Generic.ISet<SpatialModalityType>
| Improve this Doc View Source

ModalityLaneRanges

Gets the mapping of each SpatialModalityType to their lane range on this edge e.g. CarDriving --> (0,1) Cycling --> (2,2)
Declaration
IDictionary<SpatialModalityType, (int, int)> ModalityLaneRanges { get; }
Property Value
Type Description
System.Collections.Generic.IDictionary<SpatialModalityType, System.ValueTuple<System.Int32, System.Int32>>
| Improve this Doc View Source

TravelTime

Gets the static travel time in seconds required to cross this edge when the max-speed restrictions and the length are considered.
Declaration
double TravelTime { get; }
Property Value
Type Description
System.Double

Methods

| Improve this Doc View Source

Clear()

Removes all entities on this edge.
Declaration
void Clear()
| Improve this Doc View Source

Explore(ISpatialGraphEntity, Double, ISpatialEdge)

Explore the entities surroundings
Declaration
EdgeExploreResult Explore(ISpatialGraphEntity entity, double distance = 10, ISpatialEdge nextEdge = null)
Parameters
Type Name Description
ISpatialGraphEntity entity the entity around the explore takes place
System.Double distance determines which objects the entity see's objects that are farer ahead than "distance" will not be returned
ISpatialEdge nextEdge the next edge the entity will move to after traversing the current edge
Returns
Type Description
EdgeExploreResult an edge explore result which contains the found entities
| Improve this Doc View Source

Explore(ISpatialGraphEntity, Double, Boolean, ExploreDirection, ISpatialEdge, Int32[])

Explore the entities surrounded entities for a specified distance in meters and a selected set of lanes or the whole ISpatialEdge if nothing was defined. Explored entities will be returned grouped by lane in the EdgeExploreResult and ordered by the distance to the outgoing source entity.
Declaration
EdgeExploreResult Explore(ISpatialGraphEntity entity, double distance, bool onlyNext, ExploreDirection direction = ExploreDirection.Forward, ISpatialEdge nextEdge = null, params int[] lanes)
Parameters
Type Name Description
ISpatialGraphEntity entity The outgoing entity specifying the source the exploration.
System.Double distance The exploration distance in meters.
System.Boolean onlyNext The flag indicating that no the entity behind another one with different position shall be explored. Default is false so that each entity also them behind the next one will be collected.
ExploreDirection direction The direction of the exploration. Default is forward same direction as the edge.
ISpatialEdge nextEdge The next edge the entity will move to after traversing the current edge.
System.Int32[] lanes The selected lanes to explore as indices, starting with 0. If no lane was passed each lane will be queried.
Returns
Type Description
EdgeExploreResult An EdgeExploreResult containing a grouping of explores by each lane. Each lane exploration is ordered by the distance of the object to the source.
| Improve this Doc View Source

Explore(Double, Double, Boolean, ExploreDirection, ISpatialEdge, Int32[])

Explore the entities surrounded entities for a specified distance in meters and a selected set of lanes or the whole ISpatialEdge if nothing was defined. Explored entities will be returned grouped by lane in the EdgeExploreResult and ordered by the distance to the outgoing source entity.
Declaration
EdgeExploreResult Explore(double position, double distance, bool onlyNext, ExploreDirection direction = ExploreDirection.Forward, ISpatialEdge nextEdge = null, params int[] lanes)
Parameters
Type Name Description
System.Double position The outgoing source position on the edge.
System.Double distance The exploration distance in meters.
System.Boolean onlyNext The flag indicating that no the entity behind another one with different position shall be explored. Default is false so that each entity also them behind the next one will be collected.
ExploreDirection direction The direction of the exploration. Default is forward same direction as the edge.
ISpatialEdge nextEdge The next edge the entity will move to after traversing the current edge.
System.Int32[] lanes The selected lanes to explore as indices, starting with 0. If no lane was passed each lane will be queried.
Returns
Type Description
EdgeExploreResult An EdgeExploreResult containing a grouping of explores by each lane. Each lane exploration is ordered by the distance of the object to the source.
| Improve this Doc View Source

ExploreInLaneOnEdge(ISpatialGraphEntity, Double)

Explore the entities surroundings
Declaration
int ExploreInLaneOnEdge(ISpatialGraphEntity entity, double distance = 15)
Parameters
Type Name Description
ISpatialGraphEntity entity the entity around the explore takes place
System.Double distance determines which objects the entity see's objects that are farer ahead than "distance" will not be returned
Returns
Type Description
System.Int32 Returns the count of Agents in front of given entity
| Improve this Doc View Source

Insert(ISpatialGraphEntity, Double, Int32)

Add an entity to the edge
Declaration
bool Insert(ISpatialGraphEntity entity, double position, int laneIndex)
Parameters
Type Name Description
ISpatialGraphEntity entity the respective entity to insert
System.Double position the position it should be inserted
System.Int32 laneIndex the lane it should be inserted
Returns
Type Description
System.Boolean true -> entity was inserted at desired position and lane false -> the entity was already on the edge or the desired position is already occupied or the desired position is ahead of another entity which would result in an unwanted overtaking maneuver
| Improve this Doc View Source

IsLaneFree(Int32)

Find out if a certain lane is free (no entities on)
Declaration
bool IsLaneFree(int lane)
Parameters
Type Name Description
System.Int32 lane the lane to be checked
Returns
Type Description
System.Boolean true or false, depending whether there is an entity or not
| Improve this Doc View Source

Move(ISpatialGraphEntity, Double, Int32)

Move an entity on the edge
Declaration
bool Move(ISpatialGraphEntity entity, double distance, int desiredLane)
Parameters
Type Name Description
ISpatialGraphEntity entity the entity to move
System.Double distance the distance the entity shall be moved forth
System.Int32 desiredLane the lane the entities wants to move on. This can either be his current lane which or another lane (overtaking maneuver)
Returns
Type Description
System.Boolean an edge move results which contains information about the movement like a success statement and the entities new position (if successfully)
| Improve this Doc View Source

PosAt(ISpatialGraphEntity, Double, Int32)

Position an entity on a specific spot on the edge. Check if there is enough space for the entity to fit there and only position him then. Otherwise (not enough space) the positioning fails
Declaration
bool PosAt(ISpatialGraphEntity entity, double position, int desiredLaneIndex)
Parameters
Type Name Description
ISpatialGraphEntity entity The entity to be put on the new position
System.Double position The position the entity wants to be put
System.Int32 desiredLaneIndex The lane in which the entity wants to be positioned
Returns
Type Description
System.Boolean Returns true if there was enough space available and the positioning was successful otherwise false.
| Improve this Doc View Source

Remove(ISpatialGraphEntity)

Remove an entity from the edge and from the respective lane
Declaration
bool Remove(ISpatialGraphEntity entity)
Parameters
Type Name Description
ISpatialGraphEntity entity The respective entity to remove.
Returns
Type Description
System.Boolean true -> entity was removed false -> entity wasn't on the edge or the remove failed

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.ToFeature(ISpatialEdge)
SpatialGraphHelper.ToGeometry(ISpatialEdge)
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