From e57907c22e8a16d2a9b62b70dd04ffcfd0d96b6a Mon Sep 17 00:00:00 2001 From: Piotr Mardziel Date: Sun, 22 Feb 2015 22:58:30 -0500 Subject: added handling of general sparse constraints --- packages/glpk/examples/simplex2.hs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'packages/glpk/examples/simplex2.hs') diff --git a/packages/glpk/examples/simplex2.hs b/packages/glpk/examples/simplex2.hs index e9e8859..0d83ca9 100644 --- a/packages/glpk/examples/simplex2.hs +++ b/packages/glpk/examples/simplex2.hs @@ -10,9 +10,14 @@ constr2 = Dense [ [2,1,0] :<=: 10 , [0,1,5] :<=: 20 ] +constr3 = General [ [1#1, 1#1, 1#2] :<=: 10 + , [1#2, 5#3] :<=: 20 + ] + main = do print $ simplex prob constr1 [] print $ simplex prob constr2 [] + print $ simplex prob constr3 [] print $ simplex prob constr2 [ 2 :>=: 1, 3 :&: (2,7)] print $ simplex prob constr2 [ Free 2 ] -- cgit v1.2.3