Question

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

Was it helpful?

Solution

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.

OTHER TIPS

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top