pub struct TimeScheduler<'a> { /* private fields */ }Expand description
§A manager of constrained time variables.
A time scheduler maintains a set of time windows according to a set of constraints.
The set of constraints (i.e. the graph) could be shared by many schedulers which could differ by their chosen slots (of course, the constraint set is satisfied for any scheduler). It could be useful to explore many scheduler without duplicating the constraints.
Implementations§
Source§impl TimeScheduler<'_>
impl TimeScheduler<'_>
pub fn new(graph: &TimeGraph) -> TimeScheduler<'_>
pub fn constraints(&self) -> &TimeGraph
pub fn scheduling(&self, i: Instant) -> Option<&TimeSlots>
pub fn schedule(&self) -> &[TimeSlots] ⓘ
Sourcepub fn latest_beginning(&self) -> Timestamp
pub fn latest_beginning(&self) -> Timestamp
The minimum of the upper bounds of each scheduling
Sourcepub fn earliest_ending(&self) -> Timestamp
pub fn earliest_ending(&self) -> Timestamp
The maximum of the lower bounds of each scheduling
Sourcepub fn set_deadline(
&mut self,
deadline: Timestamp,
) -> Result<TimePropagation, TimeInconsistencyError>
pub fn set_deadline( &mut self, deadline: Timestamp, ) -> Result<TimePropagation, TimeInconsistencyError>
Add constraint in order to guarantee that all the instants is scheduled before the specified deadline.
Sourcepub fn set_startline(
&mut self,
startline: Timestamp,
) -> Result<TimePropagation, TimeInconsistencyError>
pub fn set_startline( &mut self, startline: Timestamp, ) -> Result<TimePropagation, TimeInconsistencyError>
Add constraint in order to guarantee that all the instants is scheduled after the specified startline.
Sourcepub fn retain<TW>(
&mut self,
i: u32,
tw: TW,
) -> Result<TimePropagation, TimeInconsistencyError>where
TW: TimeContaining<TimeSlots> + TimeOverlapping<TimeSlots> + TimeWindow<TimePoint = Timestamp>,
TimeSlots: BitAndAssign<TW>,
pub fn retain<TW>(
&mut self,
i: u32,
tw: TW,
) -> Result<TimePropagation, TimeInconsistencyError>where
TW: TimeContaining<TimeSlots> + TimeOverlapping<TimeSlots> + TimeWindow<TimePoint = Timestamp>,
TimeSlots: BitAndAssign<TW>,
Add a new constraint on one scheduler entry
Only the timestamps in the specified time window are retained
as possible values for instant i
pub fn remove<TW>(
&mut self,
i: u32,
tw: TW,
) -> Result<TimePropagation, TimeInconsistencyError>where
TW::Output: TimeContaining<TimeSlots> + TimeOverlapping<TimeSlots> + TimeWindow<TimePoint = Timestamp>,
TimeSlots: BitAndAssign<TW::Output>,
TW: Not,
Trait Implementations§
Source§impl<'a> Clone for TimeScheduler<'a>
impl<'a> Clone for TimeScheduler<'a>
Source§fn clone(&self) -> TimeScheduler<'a>
fn clone(&self) -> TimeScheduler<'a>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more