Enum vrp_core::construction::heuristics::MoveContext
source · pub enum MoveContext<'a> {
Route {
solution_ctx: &'a SolutionContext,
route_ctx: &'a RouteContext,
job: &'a Job,
},
Activity {
route_ctx: &'a RouteContext,
activity_ctx: &'a ActivityContext<'a>,
},
}
Expand description
A local move context.
Variants§
Route
Evaluation of job insertion into the given route.
Fields
§
solution_ctx: &'a SolutionContext
A solution context.
§
route_ctx: &'a RouteContext
A route context where job supposed to be inserted.
Activity
Evaluation of activity insertion into the given position.
Fields
§
route_ctx: &'a RouteContext
A route context where activity supposed to be inserted.
§
activity_ctx: &'a ActivityContext<'a>
An activity context.
Implementations§
source§impl<'a> MoveContext<'a>
impl<'a> MoveContext<'a>
sourcepub fn route(
solution_ctx: &'a SolutionContext,
route_ctx: &'a RouteContext,
job: &'a Job,
) -> MoveContext<'a>
pub fn route( solution_ctx: &'a SolutionContext, route_ctx: &'a RouteContext, job: &'a Job, ) -> MoveContext<'a>
Creates a route variant for MoveContext
.
sourcepub fn activity(
route_ctx: &'a RouteContext,
activity_ctx: &'a ActivityContext<'_>,
) -> MoveContext<'a>
pub fn activity( route_ctx: &'a RouteContext, activity_ctx: &'a ActivityContext<'_>, ) -> MoveContext<'a>
Creates a route variant for MoveContext
.
Auto Trait Implementations§
impl<'a> Freeze for MoveContext<'a>
impl<'a> !RefUnwindSafe for MoveContext<'a>
impl<'a> Send for MoveContext<'a>
impl<'a> Sync for MoveContext<'a>
impl<'a> Unpin for MoveContext<'a>
impl<'a> !UnwindSafe for MoveContext<'a>
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
source§impl<T> IntoEither for T
impl<T> IntoEither for T
source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moresource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more