run_solver_with_channel

Function run_solver_with_channel 

Source
pub fn run_solver_with_channel<S, C>(
    solution: S,
    finalize_fn: fn(&mut S),
    constraints_fn: fn() -> C,
    get_variable: fn(&S, usize) -> Option<usize>,
    set_variable: fn(&mut S, usize, Option<usize>),
    value_count: fn(&S) -> usize,
    entity_count_fn: fn(&S) -> usize,
    terminate: Option<&AtomicBool>,
    sender: UnboundedSender<(S, S::Score)>,
) -> S
where S: PlanningSolution, S::Score: Score, C: ConstraintSet<S, S::Score>,
Expand description

Solves a basic variable problem with channel-based solution streaming.

Logs solver progress via tracing. Optionally accepts a termination flag. Solutions are sent through the channel as they improve.