[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-glpk] Is GLPK the software that I have been looking for?

From: Erik
Subject: [Help-glpk] Is GLPK the software that I have been looking for?
Date: Tue, 03 Nov 2009 19:10:44 +0100
User-agent: Thunderbird (X11/20091031)

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.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]