[][src]Trait vrp_core::construction::constraints::ConstraintModule

pub trait ConstraintModule {
    fn accept_insertion(
        &self,
        solution_ctx: &mut SolutionContext,
        route_ctx: &mut RouteContext,
        job: &Job
    );
fn accept_route_state(&self, ctx: &mut RouteContext);
fn accept_solution_state(&self, ctx: &mut SolutionContext);
fn state_keys(&self) -> Iter<i32>;
fn get_constraints(&self) -> Iter<ConstraintVariant>; }

Represents a constraint module which can be added to constraint pipeline.

Required methods

fn accept_insertion(
    &self,
    solution_ctx: &mut SolutionContext,
    route_ctx: &mut RouteContext,
    job: &Job
)

Accept insertion of specific job. Called once job has been inserted into solution represented via solution_ctx, target route is route_ctx, inserted job is job. This method should call accept_route_state internally.

fn accept_route_state(&self, ctx: &mut RouteContext)

Accept route and updates its state to allow more efficient constraint checks.

fn accept_solution_state(&self, ctx: &mut SolutionContext)

Accepts insertion solution context allowing to update job insertion data. This method called twice: before insertion of all jobs starts and when it ends.

fn state_keys(&self) -> Iter<i32>

Returns unique constraint state keys. Used to avoid state key interference.

fn get_constraints(&self) -> Iter<ConstraintVariant>

Returns list of constraints to be used.

Loading content...

Implementors

impl ConstraintModule for AreaModule[src]

impl ConstraintModule for ConditionalJobModule[src]

impl ConstraintModule for FleetUsageConstraintModule[src]

impl ConstraintModule for StrictLockingModule[src]

impl ConstraintModule for TransportConstraintModule[src]

impl<Capacity: Add<Output = Capacity> + Sub<Output = Capacity> + Ord + Copy + Default + Send + Sync + 'static> ConstraintModule for CapacityConstraintModule<Capacity>[src]

Loading content...