summaryrefslogtreecommitdiff
path: root/packages/glpk/examples/simplex2.hs
diff options
context:
space:
mode:
authorAlberto Ruiz <aruiz@um.es>2010-03-31 19:52:46 +0000
committerAlberto Ruiz <aruiz@um.es>2010-03-31 19:52:46 +0000
commit261db58d71fbc378a5bb39f35a64d1c9fd4691e3 (patch)
tree1cd8257016408c27b5e9ad24338de4601a7fbfef /packages/glpk/examples/simplex2.hs
parent80f6ea4a8b1c5fb0bcd68f8d934364fd9c9b4780 (diff)
corrected Bound constructors (thx Ozgur Akgun)
Diffstat (limited to 'packages/glpk/examples/simplex2.hs')
-rw-r--r--packages/glpk/examples/simplex2.hs10
1 files changed, 5 insertions, 5 deletions
diff --git a/packages/glpk/examples/simplex2.hs b/packages/glpk/examples/simplex2.hs
index 0b865a6..f4e27fd 100644
--- a/packages/glpk/examples/simplex2.hs
+++ b/packages/glpk/examples/simplex2.hs
@@ -2,17 +2,17 @@ import Numeric.LinearProgramming
2 2
3prob = Maximize [4, -3, 2] 3prob = Maximize [4, -3, 2]
4 4
5constr1 = Sparse [ [2#1, 1#2] :<: 10 5constr1 = Sparse [ [2#1, 1#2] :<=: 10
6 , [1#2, 5#3] :<: 20 6 , [1#2, 5#3] :<=: 20
7 ] 7 ]
8 8
9constr2 = Dense [ [2,1,0] :<: 10 9constr2 = Dense [ [2,1,0] :<=: 10
10 , [0,1,5] :<: 20 10 , [0,1,5] :<=: 20
11 ] 11 ]
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 []
16 print $ simplex prob constr2 [ 2 :>: 1, 3 :&: (2,7)] 16 print $ simplex prob constr2 [ 2 :=>: 1, 3 :&: (2,7)]
17 print $ simplex prob constr2 [ Free 2 ] 17 print $ simplex prob constr2 [ Free 2 ]
18 18