In this document, we introduce PyCSP$3$, a Python library that allows us to write models of combinatorial constrained problems in a declarative manner. Currently, with PyCSP$3$, you can write models of constraint satisfaction and optimization problems. More specifically, you can build CSP (Constraint Satisfaction Problem) and COP (Constraint Optimization Problem) models. Importantly, there is a complete separation between the modeling and solving phases: you write a model, you compile it (while providing some data) in order to generate an XCSP$3$ instance (file), and you solve that problem instance by means of a constraint solver. You can also directly pilot the solving procedure in PyCSP$3$, possibly conducting an incremental solving strategy. In this document, you will find all that you need to know about PyCSP$3$, with more than 50 illustrative models.
翻译:在此文件中,我们引入了PyCSP 3$, Python 图书馆, 允许我们以宣示方式写出组合约束问题模型。 目前, 使用 PyCSP 3$, 您可以写出制约满意度和优化问题模型。 更具体地说, 您可以建立 CSP( 限制满意度问题) 和 COP( 限制优化问题) 模型。 重要的是, 模型和解决阶段之间完全分离: 您要写一个模型, 您要编集它( 提供一些数据), 以便生成 XCSP 3$ 实例( 文件), 您要用制约解答器解决问题。 您也可以直接用 PyCSP 3$ 3$ 来试点解决问题程序, 可能进行渐进解决策略 。 在此文件中, 您会发现您需要知道的关于 PyCSP 3$的所有信息, 并有超过 50 个示例模型 。