Struct vrp_core::models::solution::Tour

source ·
pub struct Tour { /* private fields */ }
Expand description

Represents a tour, a smart container for jobs with their associated activities.

Implementations§

Creates a new tour with start and optional end using actor properties.

Sets tour start.

Sets tour end.

Inserts activity within its job to the end of tour.

Inserts activity within its job at specified index.

Removes job within its activities from the tour.

Removes activity and its job from the tour.

Returns all activities in tour.

Returns activities slice in specific range (all inclusive).

Returns all activities in tour as mutable.

Returns all activities in tour for specific job.

Returns counted tour legs.

Returns all jobs.

Returns activity by its index in tour.

Returns mutable activity by its index in tour.

Returns start activity in tour.

Returns end activity in tour.

Checks whether job is present in tour

Returns index of first job occurrence in the tour.

Checks whether tour has jobs.

Returns total amount of job activities.

Returns amount of all activities in tour.

Returns amount of jobs.

Creates a copy of existing tour deeply copying all activities and jobs.

Trait Implementations§

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The alignment of pointer.
The type for initializers.
Initializes a with the given initializer. Read more
Dereferences the given pointer. Read more
Mutably dereferences the given pointer. Read more
Drops the object pointed to by the given pointer. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.