Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@fjwillemsen
Copy link
Member

This pull request provides two major improvements: string constraints and a parallel solver.

Introducing string constraints, a new interface for addConstraint where users can simply write their constraint(s) as a list of Python-evaluable strings. Writing constraints in the new string format is preferable over functions and lambdas. These strings, even as compound statements, are automatically parsed to faster built-in constraints, are more concise, and do not require constraint solving familiarity by the user to be efficient.
For example, problem.addConstraint(["50 <= x * y < 100"]) is parsed to [MinProdConstraint(50, ["x", "y"]), MaxProdConstraint(100, ["x", "y"])].
This feature is in beta and subject to possible change, please provide feedback.

The new Parallel Solver is a solver that is able to parallelize solving for all solutions over the largest domain in both ProcessPool and ThreadPool mode. This solver is currently experimental and unlikely to provide an actual speedup - it is recommended to use the default OptimizedBacktrackingSolver for now.

In addition, Python 3.13 and 3.14 support has been added and dependencies updated.

@fjwillemsen fjwillemsen self-assigned this Feb 11, 2025
@fjwillemsen fjwillemsen merged commit 3ba7ba8 into main Feb 11, 2025
1 check passed
@coveralls
Copy link

Coverage Status

coverage: 84.68%. first build
when pulling 4880ad4 on algorithm_improvements
into ff3b966 on main.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants