#[repr(C)]pub struct SchedulerScore {
pub score: f32,
pub deadline_urgency: f32,
pub novelty_boost: f32,
pub risk_penalty: f32,
}Expand description
Scheduler score combining multiple signals.
The final priority is computed from:
- Deadline urgency (inverse of time remaining)
- Novelty boost (for tasks processing new information)
- Risk penalty (for tasks that would lower coherence)
Fields§
§score: f32Combined score (higher = higher priority). Range: typically 0.0 to 10.0, but can exceed bounds.
deadline_urgency: f32Deadline urgency component (0.0 to 5.0).
novelty_boost: f32Novelty boost component (0.0 to 1.0).
risk_penalty: f32Risk penalty component (0.0 to 2.0, subtracted from score).
Implementations§
Source§impl SchedulerScore
impl SchedulerScore
Sourcepub const fn new(
deadline_urgency: f32,
novelty_boost: f32,
risk_penalty: f32,
) -> Self
pub const fn new( deadline_urgency: f32, novelty_boost: f32, risk_penalty: f32, ) -> Self
Creates a new scheduler score with explicit components.
Sourcepub fn is_higher_than(&self, other: &Self) -> bool
pub fn is_higher_than(&self, other: &Self) -> bool
Returns true if this score is higher than another.
Sourcepub fn with_novelty(self, boost: f32) -> Self
pub fn with_novelty(self, boost: f32) -> Self
Adds novelty boost to the score.
Trait Implementations§
Source§impl Clone for SchedulerScore
impl Clone for SchedulerScore
Source§fn clone(&self) -> SchedulerScore
fn clone(&self) -> SchedulerScore
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SchedulerScore
impl Debug for SchedulerScore
Source§impl Default for SchedulerScore
impl Default for SchedulerScore
Source§impl PartialEq for SchedulerScore
impl PartialEq for SchedulerScore
Source§impl PartialOrd for SchedulerScore
impl PartialOrd for SchedulerScore
impl Copy for SchedulerScore
impl StructuralPartialEq for SchedulerScore
Auto Trait Implementations§
impl Freeze for SchedulerScore
impl RefUnwindSafe for SchedulerScore
impl Send for SchedulerScore
impl Sync for SchedulerScore
impl Unpin for SchedulerScore
impl UnsafeUnpin for SchedulerScore
impl UnwindSafe for SchedulerScore
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
Mutably borrows from an owned value. Read more