1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
//! Dispatching rules and rule engine for scheduling.
//!
//! Provides priority-based dispatching rules (SPT, EDD, ATC, etc.)
//! and a composable rule engine for multi-criteria task prioritization.
//!
//! # Usage
//!
//! ```
//! use u_schedule::dispatching::{RuleEngine, SchedulingContext};
//! use u_schedule::dispatching::rules;
//!
//! let engine = RuleEngine::new()
//! .with_rule(rules::Edd)
//! .with_tie_breaker(rules::Spt);
//!
//! let context = SchedulingContext::at_time(0);
//! // let sorted = engine.sort(&tasks, &context);
//! ```
//!
//! # References
//!
//! - Pinedo (2016), "Scheduling: Theory, Algorithms, and Systems", Ch. 4
//! - Haupt (1989), "A Survey of Priority Rule-Based Scheduling"
pub use SchedulingContext;
pub use ;
use crateTask;
use Debug;
/// Score returned by a dispatching rule.
///
/// Lower scores = higher priority (scheduled first).
/// This follows the academic convention where SPT = shortest processing time first.
pub type RuleScore = f64;
/// A dispatching rule that evaluates task priority.
///
/// # Score Convention
/// **Lower score = higher priority.** Rules should return smaller values
/// for tasks that should be scheduled first.
///
/// # Reference
/// Pinedo (2016), "Scheduling", Ch. 4: Priority Dispatching