Table of Contents

Class Route

Namespace
Geotab.Checkmate.ObjectModel
Assembly
Geotab.Checkmate.ObjectModel.dll

A connected sequence of zones which create a path for the vehicle to follow.

[ReportClass]
public class Route : NameEntityWithVersion, IEntity, IComparable, IIdentifiable, IVersion, IDeviceProvider, IDefaultable
Inheritance
Route
Implements
Inherited Members

Constructors

Route()

Initializes a new instance of the Route class.

public Route()

Route(Id?)

Initializes a new instance of the Route class.

public Route(Id? id)

Parameters

id Id

The Id.

Route(Id?, long?, string?, string?, IList<RoutePlanItem>?)

Initializes a new instance of the Route class.

public Route(Id? id, long? version, string? name, string? comment, IList<RoutePlanItem>? routePlanCollection)

Parameters

id Id

The Id.

version long?

The version.

name string

The route name.

comment string

The comment.

routePlanCollection IList<RoutePlanItem>

The route plan collection.

Route(Id?, long?, string?, string?, IList<RoutePlanItem>?, Device?, Schedule?, string?, bool?, DateTime?, DateTime?)

Initializes a new instance of the Route class.

public Route(Id? id, long? version, string? name, string? comment, IList<RoutePlanItem>? routePlanCollection, Device? device, Schedule? schedule, string? timezoneId, bool? isRepeatable, DateTime? resourceShiftStartTime, DateTime? resourceShiftEndTime)

Parameters

id Id

The Id.

version long?

The version.

name string

The route name.

comment string

The comment.

routePlanCollection IList<RoutePlanItem>

The route plan collection.

device Device

The route device.

schedule Schedule

The route schedule.

timezoneId string

The route timezone id.

isRepeatable bool?

The route is repeatable or not.

resourceShiftStartTime DateTime?

The Start time of the driver's shift time

resourceShiftEndTime DateTime?

The End time of the driver's shift time

Route(Id?, long?, string?, string?, IList<RoutePlanItem>?, DateTime?, DateTime?)

Initializes a new instance of the Route class.

public Route(Id? id, long? version, string? name, string? comment, IList<RoutePlanItem>? routePlanCollection, DateTime? resourceShiftStartTime, DateTime? resourceShiftEndTime)

Parameters

id Id

The Id.

version long?

The version.

name string

The route name.

comment string

The comment.

routePlanCollection IList<RoutePlanItem>

The route plan collection.

resourceShiftStartTime DateTime?

The Start time of the driver's shift time

resourceShiftEndTime DateTime?

The End time of the driver's shift time

Route(Id, string, string, IList<RoutePlanItem>)

Initializes a new instance of the Route class.

[Obsolete("Use constructor with version", false)]
public Route(Id id, string name, string comment, IList<RoutePlanItem> routePlanCollection)

Parameters

id Id

The Id.

name string

The route name.

comment string

The comment.

routePlanCollection IList<RoutePlanItem>

The route plan collection.

Properties

Comment

Gets or sets free text field where any user information can be stored and referenced for this entity. Default [""].

[ExcelColumnHeader(new ReportHeading[] { ReportHeading.RouteComment })]
public string? Comment { get; set; }

Property Value

string

string

Device

Gets or sets the Device linked to the route. Only applies to "Plan" type routes.

public Device? Device { get; set; }

Property Value

Device

Device

EndTime

Gets the end date and time of the route which is the arrival time of the last stop.

public DateTime? EndTime { get; }

Property Value

DateTime?

DateTime

Id

Gets or sets the unique identifier for this entity.

[ExcelColumnHeader(new ReportHeading[] { ReportHeading.RouteId })]
public override Id? Id { get; set; }

Property Value

Id

Id

IsRepeatable

Gets or sets a value indicating whether the route is repeatable or not.

public bool? IsRepeatable { get; set; }

Property Value

bool?

bool

Name

Gets or sets the name of this entity which identifies it and is used when displaying this entity. Maximum length [255].

[ExcelColumnHeader(new ReportHeading[] { ReportHeading.RouteName })]
public override string? Name { get; set; }

Property Value

string

string

ResourceShiftEndTime

Gets or sets the end of a driver's shift hours

public DateTime? ResourceShiftEndTime { get; set; }

Property Value

DateTime?

DateTime

ResourceShiftStartTime

Gets or sets the start of a driver's shift hours

public DateTime? ResourceShiftStartTime { get; set; }

Property Value

DateTime?

DateTime

RoutePlanItemCollection

Gets or sets the RoutePlanItem item collection (sequence of stops which make up the route).

public IList<RoutePlanItem>? RoutePlanItemCollection { get; set; }

Property Value

IList<RoutePlanItem>

IList<T>

RouteType

Gets or sets the RouteType. Default [Basic].

public RouteType? RouteType { get; set; }

Property Value

RouteType?

RouteType

Schedule

Gets or sets the Schedule.

public Schedule? Schedule { get; set; }

Property Value

Schedule

Schedule

StartTime

Gets the start date and time or the route which is the arrival time of the 1st stop.

public DateTime? StartTime { get; }

Property Value

DateTime?

DateTime

Status

Gets or sets the RouteStatus.

public RouteStatus? Status { get; set; }

Property Value

RouteStatus?

RouteStatus

TimezoneId

Gets or sets the timezone id.

public string? TimezoneId { get; set; }

Property Value

string

string

Methods

Clone()

Creates a new object that is a copy of the current instance.

public override IEntity Clone()

Returns

IEntity

A new object that is a copy of this instance.

CorrectStopsSequence()

Corrects the sequence of RoutePlanItems (stops) if they're incorrect.

public void CorrectStopsSequence()

PopulateDefaults()

Populate non-required empty (null) properties with default values.

public void PopulateDefaults()

SortStops(Comparison<RoutePlanItem>?)

Sorts the RoutePlanItems (stops) based on the provided comparer. By default the stops are sorted by their sequence.

public void SortStops(Comparison<RoutePlanItem>? comparer = null)

Parameters

comparer Comparison<RoutePlanItem>

Comparison<T> of type RoutePlanItem

ToString()

Returns a string that represents the current object.

public override string ToString()

Returns

string

A string that represents the current object.

UpdateStatus()

Update route status based on stop status values

public void UpdateStatus()