• Documentation
  • 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>
      • 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
    • 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 IGraphEnvironment<TEdge, TNode>

    Namespace: Mars.Interfaces.Environments
    Assembly: Mars.Interfaces.dll
    Syntax
    public interface IGraphEnvironment<TEdge, TNode> : IEnvironment, IModelObject
    Type Parameters
    Name Description
    TEdge
    TNode

    Properties

    Edges

    Set of all nodes in the graph
    Declaration
    IDictionary<int, TEdge> Edges { get; }
    Property Value
    Type Description
    IDictionary<System.Int32, TEdge>

    Nodes

    Set of all nodes in the graph
    Declaration
    ICollection<TNode> Nodes { get; }
    Property Value
    Type Description
    ICollection<TNode>

    NodesMap

    Gets the mapping of each node index to their concrete node instance.
    Declaration
    IDictionary<int, TNode> NodesMap { get; }
    Property Value
    Type Description
    IDictionary<System.Int32, TNode>

    Methods

    AddEdge(TNode, TNode, IDictionary<String, Object>)

    Create a new edge and add references in the affected nodes
    Declaration
    TEdge AddEdge(TNode origin, TNode destination, IDictionary<string, object> attributes = null)
    Parameters
    Type Name Description
    TNode origin the node where the edge starts
    TNode destination the node where the edge ends
    IDictionary<System.String, System.Object> attributes All associated data to this edge e.g., the amount of lanes the length or maximum speed constraints.
    Returns
    Type Description
    TEdge the newly created edge

    AddNode(IDictionary<String, Object>)

    Create a new node and add it to the set of nodes
    Declaration
    TNode AddNode(IDictionary<string, object> attributes = null)
    Parameters
    Type Name Description
    IDictionary<System.String, System.Object> attributes All associated data to this edge e.g., the amount of lanes the length or maximum speed constraints.
    Returns
    Type Description
    TNode the newly created node

    GetRandomNode()

    Returns a random selected nod of this environment. Often be helpful for testing purposes.
    Declaration
    TNode GetRandomNode()
    Returns
    Type Description
    TNode Returns a concrete

    NearestNodesByHops(TNode, Int32)

    Get all nodes within the range of x hops
    Declaration
    List<ISpatialNode> NearestNodesByHops(TNode node, int hops)
    Parameters
    Type Name Description
    TNode node node where the search starts
    System.Int32 hops number of hops
    Returns
    Type Description
    List<ISpatialNode> a set of found nodes

    RemoveEdge(TEdge)

    Remove an edge and all references to it from the affected nodes
    Declaration
    bool RemoveEdge(TEdge edge)
    Parameters
    Type Name Description
    TEdge edge the edge to be removed
    Returns
    Type Description
    System.Boolean true if the edge could be removed false if the removal failed

    RemoveNode(TNode)

    Remove a node and delete all edges which are affected by this change
    Declaration
    bool RemoveNode(TNode node)
    Parameters
    Type Name Description
    TNode node the node to be deleted
    Returns
    Type Description
    System.Boolean true if the node could be deleted false if the node couldn't be deleted
    Back to top Copyright © MARS GROUP.
    HAW Hamburg