Trait vrp_core::construction::heuristics::JobSelector
source · pub trait JobSelector {
// Provided methods
fn prepare(&self, insertion_ctx: &mut InsertionContext) { ... }
fn select<'a>(
&'a self,
insertion_ctx: &'a InsertionContext,
) -> Box<dyn Iterator<Item = &'a Job> + 'a> { ... }
}
Expand description
On each insertion step, selects a list of jobs to be inserted. It is up to implementation to decide whether list consists of all jobs or just some subset.
Provided Methods§
sourcefn prepare(&self, insertion_ctx: &mut InsertionContext)
fn prepare(&self, insertion_ctx: &mut InsertionContext)
This method is called before select. It allows to apply some changes on mutable context before immutable borrowing could happen within select method. Default implementation simply shuffles jobs in required collection.