Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Constraint-programming in PHP

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

like image 977
Eric Pruitt Avatar asked Nov 22 '10 18:11

Eric Pruitt


1 Answers

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.

like image 71
Chris Avatar answered Sep 30 '22 09:09

Chris