In this document, we introduce PYCSP$3$, a Python library that allows us to write models of combinatorial constrained problems in a simple and declarative way. 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 modeling and solving phases: you write a model, you compile it (while providing some data) in order to generate an XCSP3 instance (file), and you solve that problem instance by means of a constraint solver. In this document, you will find all that you need to know about PYCSP$3$, with more than 40 illustrative models.
翻译:在此文件中,我们引入了PYCSP$3$, Python 图书馆允许我们以简单和宣示的方式写出组合约束问题模型。 目前,用 PyCSP $3, 您可以写出制约满意度和优化问题模型。 更具体地说, 您可以建立 CSP( 限制满意度问题) 和 COP( 限制优化问题) 模型。 重要的是, 建模阶段和解决阶段之间存在完全的分离: 您要写一个模型, 您要编集它( 提供一些数据), 以便生成 XCSP3 实例( 文件), 而您要用制约解答器来解决问题。 在这份文件中, 您会发现所有您需要了解的 PYCSP 3$, 并有40多个示例模型。