pub struct Jobs { /* private fields */ }Expand description
Stores all jobs taking into account their neighborhood.
Implementations§
source§impl Jobs
impl Jobs
sourcepub fn new(
fleet: &Fleet,
jobs: Vec<Job>,
transport: &Arc<dyn TransportCost + Send + Sync>
) -> Jobs
pub fn new(
fleet: &Fleet,
jobs: Vec<Job>,
transport: &Arc<dyn TransportCost + Send + Sync>
) -> Jobs
Creates a new Jobs.
sourcepub fn neighbors(
&self,
profile: &Profile,
job: &Job,
_: Timestamp
) -> impl Iterator<Item = &(Job, Cost)>
pub fn neighbors(
&self,
profile: &Profile,
job: &Job,
_: Timestamp
) -> impl Iterator<Item = &(Job, Cost)>
Returns range of jobs “near” to given one. Near is defined by costs with relation transport profile and departure time.
sourcepub fn distance(
&self,
profile: &Profile,
from: &Job,
to: &Job,
_: Timestamp
) -> Cost
pub fn distance(
&self,
profile: &Profile,
from: &Job,
to: &Job,
_: Timestamp
) -> Cost
Returns cost distance between two jobs.