Skip to main content

PackSolver

Trait PackSolver 

Source
pub trait PackSolver: Send + Sync {
    // Required methods
    fn id(&self) -> &'static str;
    fn solve(&self, spec: &ProblemSpec) -> GateResult<(Value, SolverReport)>;
    fn is_exact(&self) -> bool;
}
Expand description

A solver within a pack

Each pack can have multiple solvers (e.g., greedy, exact, heuristic).

Required Methods§

Source

fn id(&self) -> &'static str

Solver identifier (e.g., “greedy-v1”)

Source

fn solve(&self, spec: &ProblemSpec) -> GateResult<(Value, SolverReport)>

Solve and produce plan payload + report

Source

fn is_exact(&self) -> bool

Whether this solver guarantees optimality

Implementors§