PHP 中的约束编程

发布于 2024-10-04 00:14:11 字数 133 浏览 0 评论 0原文

PHP 有约束编程库吗?能够处理这样的情况的东西。

Are there any constraint-programming libraries for PHP? Something that would be capable of handling a situation like this.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

晒暮凉 2024-10-11 00:14:11

出于速度原因,约束编程库往往用 C/C++ 编写,您可以很容易地创建解决起来成本非常高的问题。您最好的选择是:

或者从上面的示例中获取 Python 代码并从 PHP 调用它。

Constraint programming libraries tend to be written in C/C++ for speed reasons, you can very easily create problems that are very costly to solve. Your best bets are:

  • Find a C/C++ library that has an existing PHP wrapper (a quick Google doesn't turn up anything)
  • Create your own wrapper around any of the libraries mentioned here
  • Use a "black box" external program such as Minion which you interact with via the command line and text files

Alternatively take the Python code from the above example and call it from PHP.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文