diff options
Diffstat (limited to 'packages/glpk/examples/simplex1.hs')
-rw-r--r-- | packages/glpk/examples/simplex1.hs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/packages/glpk/examples/simplex1.hs b/packages/glpk/examples/simplex1.hs index 9639f37..ec72bdc 100644 --- a/packages/glpk/examples/simplex1.hs +++ b/packages/glpk/examples/simplex1.hs | |||
@@ -5,17 +5,16 @@ import Numeric.LinearProgramming | |||
5 | objFun = Maximize [10, 6, 4] | 5 | objFun = Maximize [10, 6, 4] |
6 | 6 | ||
7 | constr = Dense [ [1,1,1] :<: 100 | 7 | constr = 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 |
12 | bnds = [ 1 :>: 0 | 12 | bnds = [ 1 :>: 0 |
13 | , 2 :>: 0 | 13 | , 2 :>: 0 |
14 | , 3 :>: 0 ] | 14 | , 3 :>: 0 ] |
15 | 15 | ||
16 | main = do | 16 | main = 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 ] |
21 | |||