summaryrefslogtreecommitdiff
path: root/packages/glpk/examples/simplex1.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/simplex1.hs
parent80f6ea4a8b1c5fb0bcd68f8d934364fd9c9b4780 (diff)
corrected Bound constructors (thx Ozgur Akgun)
Diffstat (limited to 'packages/glpk/examples/simplex1.hs')
-rw-r--r--packages/glpk/examples/simplex1.hs14
1 files changed, 7 insertions, 7 deletions
diff --git a/packages/glpk/examples/simplex1.hs b/packages/glpk/examples/simplex1.hs
index ec72bdc..e7aeaa9 100644
--- a/packages/glpk/examples/simplex1.hs
+++ b/packages/glpk/examples/simplex1.hs
@@ -4,17 +4,17 @@ import Numeric.LinearProgramming
4 4
5objFun = Maximize [10, 6, 4] 5objFun = Maximize [10, 6, 4]
6 6
7constr = Dense [ [1,1,1] :<: 100 7constr = Dense [ [1,1,1] :<=: 100
8 , [10,4,5] :<: 600 8 , [10,4,5] :<=: 600
9 , [2,2,6] :<: 300 ] 9 , [2,2,6] :<=: 300 ]
10 10
11-- default bounds 11-- default bounds
12bnds = [ 1 :>: 0 12bnds = [ 1 :=>: 0
13 , 2 :>: 0 13 , 2 :=>: 0
14 , 3 :>: 0 ] 14 , 3 :=>: 0 ]
15 15
16main = do 16main = do
17 print $ simplex objFun constr [] 17 print $ simplex objFun constr []
18 print $ simplex objFun constr bnds 18 print $ simplex objFun constr bnds
19 print $ simplex objFun constr [Free 3] 19 print $ simplex objFun constr [Free 3]
20 print $ simplex objFun constr [ 2 :<: 50 ] 20 print $ simplex objFun constr [ 2 :<=: 50 ]