[][src]Struct vrp_core::construction::heuristics::SolutionContext

pub struct SolutionContext {
    pub required: Vec<Job>,
    pub ignored: Vec<Job>,
    pub unassigned: HashMap<Job, i32>,
    pub locked: HashSet<Job>,
    pub routes: Vec<RouteContext>,
    pub registry: RegistryContext,
    pub state: HashMap<i32, StateValue>,
}

Contains information regarding discovered solution.

Fields

required: Vec<Job>

List of jobs which require permanent assignment.

ignored: Vec<Job>

List of jobs which at the moment does not require assignment and might be ignored.

unassigned: HashMap<Job, i32>

Map of jobs which cannot be assigned and within reason code.

locked: HashSet<Job>

Specifies jobs which should not be affected by ruin.

routes: Vec<RouteContext>

Set of routes within their state.

registry: RegistryContext

Keeps track of used routes and resources.

state: HashMap<i32, StateValue>

A collection of data associated with solution.

Implementations

impl SolutionContext[src]

pub fn get_total_cost(&self) -> Cost[src]

Gets total cost of the solution.

pub fn get_max_cost(&self) -> Cost[src]

Gets the most expensive route cost.

pub fn to_solution(&self, extras: Arc<Extras>) -> Solution[src]

Converts given SolutionContext to Solution model.

pub fn deep_copy(&self) -> Self[src]

Creates a deep copy of SolutionContext.

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>,