pub struct ReloadFeatureFactory<T: LoadOps> { /* private fields */ }
Expand description
Provides a way to build reload feature with various parameters.
Implementations§
Source§impl<T: SharedResource> ReloadFeatureFactory<T>
impl<T: SharedResource> ReloadFeatureFactory<T>
Sourcepub fn set_resource_code(self, code: ViolationCode) -> Self
pub fn set_resource_code(self, code: ViolationCode) -> Self
Sets resource constraint violation code which is used to report back the reason of job’s unassignment.
Sets a shared resource capacity function.
Sets a shared resource demand function.
Sourcepub fn set_is_partial_solution<F>(self, func: F) -> Self
pub fn set_is_partial_solution<F>(self, func: F) -> Self
Sets a function which tells whether a given solution is partial.
Builds a shared reload flavor.
Source§impl<T: LoadOps> ReloadFeatureFactory<T>
impl<T: LoadOps> ReloadFeatureFactory<T>
Sourcepub fn new(name: &str) -> Self
pub fn new(name: &str) -> Self
Creates a new instance of ReloadFeatureFactory
with the given feature name
Sourcepub fn set_capacity_code(self, code: ViolationCode) -> Self
pub fn set_capacity_code(self, code: ViolationCode) -> Self
Sets capacity constraint violation code which is used to report back the reason of job’s unassignment.
Sourcepub fn set_is_reload_single<F>(self, func: F) -> Self
pub fn set_is_reload_single<F>(self, func: F) -> Self
Sets a function which specifies whether a given single job can be considered as a reload job.
Sourcepub fn set_belongs_to_route<F>(self, func: F) -> Self
pub fn set_belongs_to_route<F>(self, func: F) -> Self
Sets a function which specifies whether a given route can serve a given job. This function should return false, if the job is not reload.
Sourcepub fn set_load_schedule_threshold<F>(self, func: F) -> Self
pub fn set_load_schedule_threshold<F>(self, func: F) -> Self
Sets a function which is used to decide whether reload should be considered for assignment based on the left vehicle’s capacity.
Sourcepub fn build_simple(self) -> GenericResult<Feature>
pub fn build_simple(self) -> GenericResult<Feature>
Builds a simple reload flavor.
Auto Trait Implementations§
impl<T> Freeze for ReloadFeatureFactory<T>
impl<T> !RefUnwindSafe for ReloadFeatureFactory<T>
impl<T> Send for ReloadFeatureFactory<T>
impl<T> Sync for ReloadFeatureFactory<T>
impl<T> Unpin for ReloadFeatureFactory<T>
impl<T> !UnwindSafe for ReloadFeatureFactory<T>
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
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>
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>
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