Skip to main content

run_solver

Function run_solver 

Source
pub fn run_solver<S, C, Spec>(
    solution: S,
    finalize_fn: fn(&mut S),
    constraints_fn: fn() -> C,
    descriptor: fn() -> SolutionDescriptor,
    entity_count_by_descriptor: fn(&S, usize) -> usize,
    terminate: Option<&AtomicBool>,
    sender: UnboundedSender<(S, S::Score)>,
    spec: Spec,
) -> S
where S: PlanningSolution, S::Score: Score + ParseableScore, C: ConstraintSet<S, S::Score>, Spec: ProblemSpec<S, C>,
Expand description

Solves a problem using the given ProblemSpec for problem-specific logic.

This is the unified entry point for both basic variable and list variable problems. The shared logic (config loading, director creation, trivial-case handling, termination building, callback setup, final send) lives here. Problem-specific construction and local search are delegated to spec.