Numeric.LinearProgramming - confusion in constructors for bounds

Hi everyone and Alberto, Numeric.LinearProgramming[1] provides a very nice interface for solving LP optimisation problems, and the well-known simplex algorithm itself. I must say I quite liked the interface it provides, simple yet sufficient. But, to my understanding, there is a confusion in the constructor name (symbols actually) for constraints. In LP, one needs to write constraints in the form of ==, <=, or >= only. You *cannot *write a constraint using strict inequalities. The algorithm has nothing wrong, but I guess it would be better to have constructor symbols right. See [2] If this is a design choice, I think it should explicitly be stated. Regards, [1] http://hackage.haskell.org/package/hmatrix-glpk [2] http://hackage.haskell.org/packages/archive/hmatrix-glpk/0.1.0/doc/html/Nume... -- Ozgur Akgun

Hi Ozgur, You are right, the operators are misleading. I will change them to ":<=:" and ":>=:". And perhaps the symbol ":&:" for the interval bound should also be improved... Thanks for your suggestion! Alberto Ozgur Akgun wrote:
Hi everyone and Alberto,
Numeric.LinearProgramming[1] provides a very nice interface for solving LP optimisation problems, and the well-known simplex algorithm itself. I must say I quite liked the interface it provides, simple yet sufficient.
But, to my understanding, there is a confusion in the constructor name (symbols actually) for constraints. In LP, one needs to write constraints in the form of ==, <=, or >= only. You /cannot /write a constraint using strict inequalities. The algorithm has nothing wrong, but I guess it would be better to have constructor symbols right. See [2]
If this is a design choice, I think it should explicitly be stated.
Regards,
[1] http://hackage.haskell.org/package/hmatrix-glpk [2] http://hackage.haskell.org/packages/archive/hmatrix-glpk/0.1.0/doc/html/Nume...
-- Ozgur Akgun

You are very welcome :)
What about not an operator but a regular constructor for the interval thing?
Something like: Between Double Double
Nevertheless, I think :&: is not bad at all. You can leave it as it is.
Best,
On 31 March 2010 14:57, Alberto Ruiz
Hi Ozgur,
You are right, the operators are misleading. I will change them to ":<=:" and ":>=:". And perhaps the symbol ":&:" for the interval bound should also be improved...
Thanks for your suggestion! Alberto
Ozgur Akgun wrote:
Hi everyone and Alberto,
Numeric.LinearProgramming[1] provides a very nice interface for solving LP optimisation problems, and the well-known simplex algorithm itself. I must say I quite liked the interface it provides, simple yet sufficient.
But, to my understanding, there is a confusion in the constructor name (symbols actually) for constraints. In LP, one needs to write constraints in the form of ==, <=, or >= only. You /cannot /write a constraint using strict inequalities. The algorithm has nothing wrong, but I guess it would be better to have constructor symbols right. See [2]
If this is a design choice, I think it should explicitly be stated.
Regards,
[1] http://hackage.haskell.org/package/hmatrix-glpk [2] http://hackage.haskell.org/packages/archive/hmatrix-glpk/0.1.0/doc/html/Nume...
-- Ozgur Akgun
-- Ozgur Akgun
participants (2)
-
Alberto Ruiz
-
Ozgur Akgun