diff options
author | Alberto Ruiz <aruiz@um.es> | 2010-02-23 09:23:06 +0000 |
---|---|---|
committer | Alberto Ruiz <aruiz@um.es> | 2010-02-23 09:23:06 +0000 |
commit | 5587a094afa3e24698cd38301c805e6ee5876c73 (patch) | |
tree | 9c240fc1a558e871928fe61b99a8cdccd649d3e4 /packages/glpk/examples/simplex2.hs | |
parent | f38b4a3076cfae023559ce61cb2a443c809b7a6f (diff) |
documentation for simplex
Diffstat (limited to 'packages/glpk/examples/simplex2.hs')
-rw-r--r-- | packages/glpk/examples/simplex2.hs | 5 |
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 @@ | |||
1 | import Numeric.LinearProgramming | 1 | import Numeric.LinearProgramming |
2 | 2 | ||
3 | prob = Maximize [1,2,3,4] | 3 | prob = Maximize [4, 3, -2, 7] |
4 | 4 | ||
5 | constr1 = Sparse [ [1#1, 1#2] :<: 10 | 5 | constr1 = 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 | ||
13 | main = do | 13 | main = 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 | ||