Class MultimodalRoute
Inheritance
MultimodalRoute
Assembly: Mars.Interfaces.dll
Syntax
public class MultimodalRoute : IEnumerable<RouteStop>, IEquatable<MultimodalRoute>
Constructors
MultimodalRoute()
Creates an empty route without any stops.
Declaration
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 |
IEnumerable<RouteStop> |
stops |
An ordered collection of stops with references to the environment. |
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 |
Fields
WalkingFilter
Declaration
protected static readonly Func<ISpatialEdge, bool> WalkingFilter
Field Value
Properties
Count
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
CurrentRoute
Declaration
public Route CurrentRoute { get; }
Property Value
Goal
Declaration
public Position Goal { get; }
Property Value
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
MainModalChoice
Declaration
public ModalChoice MainModalChoice { get; }
Property Value
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
Stops
The ordered path of all stops, planed by the routing component.
Declaration
public IList<RouteStop> Stops { get; }
Property Value
Methods
Add(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 |
|
GetEnumerator()
Returns an enumerator that iterates through the collection.
Declaration
public IEnumerator<RouteStop> GetEnumerator()
Returns
Type |
Description |
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. |
InsertFirst(Route, ModalChoice)
Declaration
public void InsertFirst(Route route, ModalChoice modalChoice)
Parameters
Next()
Sets the pointer to the next
RouteStop if it is not the last stop.
Declaration
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. |
Implements
IEquatable<>