summaryrefslogtreecommitdiff
path: root/packages/glpk/examples/simplex2.hs
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@um.es>2010-02-23 09:23:06 +0000
committerAlberto Ruiz <aruiz@um.es>2010-02-23 09:23:06 +0000
commit5587a094afa3e24698cd38301c805e6ee5876c73 (patch)
tree9c240fc1a558e871928fe61b99a8cdccd649d3e4 /packages/glpk/examples/simplex2.hs
parentf38b4a3076cfae023559ce61cb2a443c809b7a6f (diff)
documentation for simplex
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