Class MultimodalRoute
Inheritance
System.Object
MultimodalRoute
Implements
System.Collections.Generic.IEnumerable<RouteStop>
System.Collections.IEnumerable
System.IEquatable<MultimodalRoute>
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
Namespace: Mars.Interfaces.Environments
Assembly: Mars.Interfaces.dll
Syntax
public class MultimodalRoute : IEnumerable<RouteStop>, IEnumerable, IEquatable<MultimodalRoute>
Constructors
| Improve this Doc View SourceMultimodalRoute()
Creates an empty route without any stops.
Declaration
public MultimodalRoute()
MultimodalRoute(Route, ModalChoice)
Creates a multimodal route that contains given route with corresponding modal type.
Declaration
public MultimodalRoute(Route route, ModalChoice modalChoice)
Parameters
Type | Name | Description |
---|---|---|
Route | route | First element of the multimodal route. |
ModalChoice | modalChoice | First modal type of the multimodal route |
MultimodalRoute(IEnumerable<RouteStop>)
Creates a new planed route with an ordered collection of individual stops to take.
Declaration
public MultimodalRoute(IEnumerable<RouteStop> stops)
Parameters
Type | Name | Description |
---|---|---|
System.Collections.Generic.IEnumerable<RouteStop> | stops | An ordered collection of stops with references to the environment. |
Fields
| Improve this Doc View SourceWalkingFilter
Declaration
protected static readonly Func<ISpatialEdge, bool> WalkingFilter
Field Value
Type | Description |
---|---|
System.Func<ISpatialEdge, System.Boolean> |
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 |
CurrentModalChoice
Declaration
public ModalChoice CurrentModalChoice { get; }
Property Value
Type | Description |
---|---|
ModalChoice |
CurrentRoute
Declaration
public Route CurrentRoute { get; }
Property Value
Type | Description |
---|---|
Route |
Goal
Declaration
public Position Goal { get; }
Property Value
Type | Description |
---|---|
Position |
GoalReached
Gets the flag indicating whether the goal of all routes that belong to the multimodal route are reached.
Declaration
public bool GoalReached { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
Item[Int32]
Gets the RouteStop at the desired index.
When moving actions was already be performed this access
will give the current not passed stop.
Declaration
public RouteStop this[int index] { get; }
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | index | The index of the rest route. |
Property Value
Type | Description |
---|---|
RouteStop |
MainModalChoice
Declaration
public ModalChoice MainModalChoice { get; }
Property Value
Type | Description |
---|---|
ModalChoice |
PassedStops
Defines how many stops are already passed.
Declaration
public int PassedStops { get; }
Property Value
Type | Description |
---|---|
System.Int32 |
RouteLength
Declaration
public double RouteLength { get; }
Property Value
Type | Description |
---|---|
System.Double |
Start
Declaration
public Position Start { get; }
Property Value
Type | Description |
---|---|
Position |
Stops
The ordered path of all stops, planed by the routing component.
Declaration
public IList<RouteStop> Stops { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.IList<RouteStop> |
Methods
| Improve this Doc View SourceAdd(Route, ModalChoice)
Adds a new route stop to the multimodal route
Declaration
public void Add(Route route, ModalChoice modalChoice)
Parameters
Type | Name | Description |
---|---|---|
Route | route | A route part |
ModalChoice | modalChoice | The modal type that is used for given route |
AppendAndDeleteTail(MultimodalRoute)
Appends a following multimodal route to the current multimodal route
Declaration
public void AppendAndDeleteTail(MultimodalRoute multimodalRoute)
Parameters
Type | Name | Description |
---|---|---|
MultimodalRoute | multimodalRoute | Appending multimodal route, that finishes the track. |
Equals(Object)
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<RouteStop> GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.Generic.IEnumerator<RouteStop> | An enumerator that can be used to iterate through the collection of RouteStop. |
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(Route, ModalChoice)
Declaration
public void InsertFirst(Route route, ModalChoice modalChoice)
Parameters
Type | Name | Description |
---|---|---|
Route | route | |
ModalChoice | modalChoice |
Next()
Sets the pointer to the next RouteStop if it is not the last stop.
Declaration
public void Next()
ToString()
Converts this multimodal route into appropriate string representation.
Declaration
public override string ToString()
Returns
Type | Description |
---|---|
System.String | Returns the string representation of the multimodal route. |
Overrides
System.Object.ToString()
Explicit Interface Implementations
| Improve this Doc View SourceIEnumerable.GetEnumerator()
Declaration
IEnumerator IEnumerable.GetEnumerator()
Returns
Type | Description |
---|---|
System.Collections.IEnumerator |
IEquatable<MultimodalRoute>.Equals(MultimodalRoute)
Indicates whether the current object of type Route is
equal to another object of the same type.
Declaration
bool IEquatable<MultimodalRoute>.Equals(MultimodalRoute other)
Parameters
Type | Name | Description |
---|---|---|
MultimodalRoute | 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>