I have been searching around for a program to find solutions to little
problems like this: An item of meat costs 160. An item of fish costs
30.
An item of milk costs 15. Someone spent 700 and bought at most 6
items.
What did he buy?
What I want is to just input some constraints:
k * 160 + m * 30 + n * 15 = 700
k + m + n ≤ 6
and then get all solutions:
k = 4, m = 2, n = 0
Is GLPK the right tool for this kind of problem? I started to read
the documentation, but GLPK seems more about finding an optimal
solution than finding all solutions. That might be a problem.
First I looked at logilab-constraint and PuLP, that are supposed to be
able to solve it. But I read about them, and they seem to be Python
frontends for GLPK (or some other solver), and since I do not know
Python so well, I might just try to use GLPK directly.
_______________________________________________
Help-glpk mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/help-glpk