ConSol-Lab / Pumpkin

A lazy clause generation constraint solver written in Rust.
Apache License 2.0
17 stars 4 forks source link

fix: do not print intermediate solution when flag is not set + solution callback for satisfaction problems #77

Closed ImkoMarijnissen closed 3 weeks ago

ImkoMarijnissen commented 1 month ago

Currently, when running an optimisation problem with the -a and -s flags, the statistics of the intermediate solutions are not printed while this could be desirable; additionally, the on-solution call-back is not called when a solution is found for a satisfaction problem.

This PR aims to alleviate these problems by changing the solution iterator to also call process_solution and creating a struct SolutionCallback which allows more fine-grained control of what occurs when a solution is found!