PyCSP3: 在Python中建模组合约束问题
PyCSP3: Modeling Combinatorial Constrained Problems in Python
AI总结:
本研究介绍Python库PyCSP3,它支持声明式建模CSP、COP等组合约束问题,实现建模与求解分离,支持直接操控求解及增量求解,附带50多个示例模型。
摘要:
本文介绍PyCSP3,这是一个支持以声明式方式编写组合约束问题模型的Python库。目前,通过PyCSP3可构建约束满足与优化问题的模型,具体来说,可搭建CSP(约束满足问题)和COP(约束优化问题)模型。其核心特点是建模与求解阶段完全分离:用户编写模型,(在提供部分数据的同时)编译模型以生成XCSP3实例(文件),再通过约束求解器求解该问题实例。用户还可在PyCSP3中直接操控求解流程,甚至执行增量求解策略。本文包含了PyCSP3的全部必要信息,附带50多个示例模型。
英文摘要:
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.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。