diff options
author | Piotr Mardziel <piotrm@gmail.com> | 2015-02-22 22:58:30 -0500 |
---|---|---|
committer | Piotr Mardziel <piotrm@gmail.com> | 2015-02-22 22:58:30 -0500 |
commit | e57907c22e8a16d2a9b62b70dd04ffcfd0d96b6a (patch) | |
tree | cadcf9bd0c457943bbb18cdabb13842620906af9 /packages/glpk/examples | |
parent | 1a5cfd2c50600c60e23bcf44f6e9a45996c699a2 (diff) |
added handling of general sparse constraints
Diffstat (limited to 'packages/glpk/examples')
-rw-r--r-- | packages/glpk/examples/simplex2.hs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/packages/glpk/examples/simplex2.hs b/packages/glpk/examples/simplex2.hs index e9e8859..0d83ca9 100644 --- a/packages/glpk/examples/simplex2.hs +++ b/packages/glpk/examples/simplex2.hs | |||
@@ -10,9 +10,14 @@ constr2 = Dense [ [2,1,0] :<=: 10 | |||
10 | , [0,1,5] :<=: 20 | 10 | , [0,1,5] :<=: 20 |
11 | ] | 11 | ] |
12 | 12 | ||
13 | constr3 = General [ [1#1, 1#1, 1#2] :<=: 10 | ||
14 | , [1#2, 5#3] :<=: 20 | ||
15 | ] | ||
16 | |||
13 | main = do | 17 | main = do |
14 | print $ simplex prob constr1 [] | 18 | print $ simplex prob constr1 [] |
15 | print $ simplex prob constr2 [] | 19 | print $ simplex prob constr2 [] |
20 | print $ simplex prob constr3 [] | ||
16 | print $ simplex prob constr2 [ 2 :>=: 1, 3 :&: (2,7)] | 21 | print $ simplex prob constr2 [ 2 :>=: 1, 3 :&: (2,7)] |
17 | print $ simplex prob constr2 [ Free 2 ] | 22 | print $ simplex prob constr2 [ Free 2 ] |
18 | 23 | ||