summaryrefslogtreecommitdiff
path: root/packages/glpk/examples/simplex2.hs
diff options
context:
space:
mode:
Diffstat (limited to 'packages/glpk/examples/simplex2.hs')
-rw-r--r--packages/glpk/examples/simplex2.hs5
1 files changed, 3 insertions, 2 deletions
diff --git a/packages/glpk/examples/simplex2.hs b/packages/glpk/examples/simplex2.hs
index 76a53df..40e4bbd 100644
--- a/packages/glpk/examples/simplex2.hs
+++ b/packages/glpk/examples/simplex2.hs
@@ -1,6 +1,6 @@
1import Numeric.LinearProgramming 1import Numeric.LinearProgramming
2 2
3prob = Maximize [1,2,3,4] 3prob = Maximize [4, 3, -2, 7]
4 4
5constr1 = Sparse [ [1#1, 1#2] :<: 10 5constr1 = Sparse [ [1#1, 1#2] :<: 10
6 , [1#3, 1#4] :<: 10 6 , [1#3, 1#4] :<: 10
@@ -12,5 +12,6 @@ constr2 = Dense [ [1,1,0,0] :<: 10
12 12
13main = do 13main = do
14 print $ simplex prob constr1 [] 14 print $ simplex prob constr1 []
15 print $ simplex prob constr2 [] 15 print $ simplex prob constr2 [ 2 :>: 1, 4 :&: (2,7)]
16 print $ simplex prob constr2 [ Free 3 ]
16 17