pub trait JobContextTransition {
    // Required methods
    fn remove_from_required(
        &self,
        solution_ctx: &SolutionContext,
        route_index: Option<usize>,
        job: &Job
    ) -> bool;
    fn promote_to_required(
        &self,
        solution_ctx: &SolutionContext,
        route_index: Option<usize>,
        job: &Job
    ) -> bool;
    fn remove_from_locked(
        &self,
        solution_ctx: &SolutionContext,
        route_index: Option<usize>,
        job: &Job
    ) -> bool;
    fn promote_to_locked(
        &self,
        solution_ctx: &SolutionContext,
        route_index: Option<usize>,
        job: &Job
    ) -> bool;
}
Expand description

Defines how jobs are moved in solution context. Index of original affected route context is passed.

Required Methods§

source

fn remove_from_required( &self, solution_ctx: &SolutionContext, route_index: Option<usize>, job: &Job ) -> bool

Returns true if job is moved from required to ignored.

source

fn promote_to_required( &self, solution_ctx: &SolutionContext, route_index: Option<usize>, job: &Job ) -> bool

Returns true if job is moved from ignored to required.

source

fn remove_from_locked( &self, solution_ctx: &SolutionContext, route_index: Option<usize>, job: &Job ) -> bool

Returns true if job is removed from locked.

source

fn promote_to_locked( &self, solution_ctx: &SolutionContext, route_index: Option<usize>, job: &Job ) -> bool

Returns true if job is moved to locked.

Implementors§

source§

impl<FRemoveRequired, FPromoteRequired, FRemoveLocked, FPromoteLocked> JobContextTransition for ConcreteJobContextTransition<FRemoveRequired, FPromoteRequired, FRemoveLocked, FPromoteLocked>
where FRemoveRequired: Fn(&SolutionContext, Option<usize>, &Job) -> bool, FPromoteRequired: Fn(&SolutionContext, Option<usize>, &Job) -> bool, FRemoveLocked: Fn(&SolutionContext, Option<usize>, &Job) -> bool, FPromoteLocked: Fn(&SolutionContext, Option<usize>, &Job) -> bool,