pub trait SolutionPartitioner<S: PlanningSolution>:
Send
+ Sync
+ Debug {
// Required methods
fn partition(&self, solution: &S) -> Vec<S>;
fn merge(&self, original: &S, partitions: Vec<S>) -> S;
// Provided method
fn recommended_partition_count(&self) -> Option<usize> { ... }
}Expand description
Splits a solution into independent partitions for parallel solving.
Each partition should be solvable independently without affecting the correctness of other partitions. The partitioner must also be able to merge the solved partitions back into a complete solution.
§Type Parameters
S: The planning solution type
§Example
For a school timetabling problem, a natural partitioning might be by room or by time period, where each partition contains lessons that don’t interact with lessons in other partitions.