Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

2.1.0: string constraints and parallel solver#92

Discussion options

This release provides two exciting 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. In ProcessPool mode, string constraints must be used instead of functions or lambdas, as these can't be pickled. This Parallel 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.

For more details, see#91.
Full Changelog:2.0.3...2.1.0


This discussion was created from the release2.1.0: string constraints and parallel solver.
You must be logged in to vote

Replies: 0 comments

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Labels
None yet
1 participant
@fjwillemsen

[8]ページ先頭

©2009-2025 Movatter.jp