Hello, On Tue, Nov 03, 2009 at 01:04:09PM +0100, Erik wrote: > I was looking for a simple tool to solve little problems. For example I > would like to give the following input: > > k * 160 + m * 30 + n * 15 = 700 > k + m + n ≤ 6 > > Then I would like to get the following output: > k = 4, m = 2, n = 0 > > ... > > I am not sure if this example is an assingnment problem, or if it should > rather be classified as an integer programming problem or constraint > satisfaction problem.
To solve that kind of problem, you can use either http://www.logilab.org/project/logilab-constraint/ http://code.google.com/p/pulp-or/ Look at the examples in both packages and you will find what you are looking for. http://hg.logilab.org/logilab/constraint/file/3d51e72774e6/examples http://code.google.com/p/pulp-or/wiki/OptimisationWithPuLP -- Nicolas Chauvat logilab.fr - services en informatique scientifique et gestion de connaissances _______________________________________________ Python-Projects mailing list Python-Projects@lists.logilab.org http://lists.logilab.org/mailman/listinfo/python-projects