Class Route
Represents the common route object keeping all path information's of
an individual ISpatialGraphEnvironment entity.
Inheritance
System.Object
Route
Implements
System.Collections.Generic.IEnumerable<EdgeStop>
System.Collections.IEnumerable
System.IEquatable<Route>
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Mars.Interfaces.Environments
Assembly: Mars.Interfaces.dll
Syntax
public sealed class Route : IEnumerable<EdgeStop>, IEnumerable, IEquatable<Route>
Constructors
| Improve this Doc View SourceRoute(Route)
Declaration
public Route(Route route)
Parameters
Type | Name | Description |
---|---|---|
Route | route | The route from which to create new one. |
Route(Boolean)
Creates an empty route without any stops.
Declaration
public Route(bool useGabBuffer = true)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | useGabBuffer |
Properties
| Improve this Doc View SourceCount
Gets the amount of stops of this route.
Declaration
public int Count { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
Goal
The goal position of the route.
Declaration
public Position Goal { get; }
Property Value
Type | Description |
---|---|
Position |
GoalReached
Gets the flag indicating whether the goal on this route was reached when the corresponding
edge
, the desired lane
and the position
on this edge has been arrived.
Declaration
public bool GoalReached { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Item[Int32]
Gets the EdgeStop at the desired index.
When moving actions was already be performed this access
will give the current not passed stop.
Declaration
public EdgeStop this[int index] { get; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The index of the rest route. |
Property Value
Type | Description |
---|---|
EdgeStop |
PassedStops
Gets the rest amount of stops to pass to reach the goal.
Declaration
public int PassedStops { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
RemainingRouteDistanceToGoal
Gets the rest distance to pass until the goal is reached on the last EdgeStop.
Declaration
public double RemainingRouteDistanceToGoal { get; }
Property Value
Type | Description |
---|---|
System.Double |
RouteLength
Gets the whole length of this route from start to end.
Declaration
public double RouteLength { get; }
Property Value
Type | Description |
---|---|
System.Double |
Stops
The ordered path of all stops, planed by the routing component.
Declaration
public IList<EdgeStop> Stops { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IList<EdgeStop> |
Methods
| Improve this Doc View SourceAdd(ISpatialEdge, Int32)
Adds a new edge stop to the route
Declaration
public void Add(ISpatialEdge edge, int lane = -1)
Parameters
Type | Name | Description |
---|---|---|
ISpatialEdge | edge | The underlying road segment |
System.Int32 | lane | The lane which shall be used. |
Equals(Object)
Represents the common route object keeping all path information's of
an individual ISpatialGraphEnvironment entity.
Declaration
public override bool Equals(object obj)
Parameters
Type | Name | Description |
---|---|---|
System.Object | obj |
Returns
Type | Description |
---|---|
System.Boolean |
Overrides
System.Object.Equals(System.Object)
|
Improve this Doc
View Source
GetEnumerator()
Returns an enumerator that iterates through the collection.
Declaration
public IEnumerator<EdgeStop> GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerator<EdgeStop> | An enumerator that can be used to iterate through the collection of EdgeStop. |
GetHashCode()
Serves as the default hash function.
Declaration
public override int GetHashCode()
Returns
Type | Description |
---|---|
System.Int32 | A hash code for the current route. |
Overrides
System.Object.GetHashCode()
|
Improve this Doc
View Source
InsertFirst(ISpatialEdge, Int32, Nullable<DirectionType>)
Inserts a new edge to the beginning of the route.
Declaration
public void InsertFirst(ISpatialEdge edge, int lane = -1, DirectionType? directionType = null)
Parameters
Type | Name | Description |
---|---|---|
ISpatialEdge | edge | The underlying road segment |
System.Int32 | lane | The lane which shall be used. |
System.Nullable<DirectionType> | directionType | The direction to take (up, down, ...) |
JumpToGoal()
Directly finished the route and move to goal.
Declaration
public void JumpToGoal()
Explicit Interface Implementations
| Improve this Doc View SourceIEnumerable.GetEnumerator()
Represents the common route object keeping all path information's of
an individual ISpatialGraphEnvironment entity.
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.IEnumerator |
IEquatable<Route>.Equals(Route)
Indicates whether the current object of type Route is
equal to another object of the same type.
Declaration
bool IEquatable<Route>.Equals(Route other)
Parameters
Type | Name | Description |
---|---|---|
Route | other | An object to compare with this object. |
Returns
Type | Description |
---|---|
System.Boolean |
Implements
System.Collections.Generic.IEnumerable<T>
System.Collections.IEnumerable
System.IEquatable<T>