comparison scripts/optimization/glpk.m @ 6741:00116015904d

[project @ 2007-06-18 16:07:14 by jwe]
author jwe
date Mon, 18 Jun 2007 16:07:14 +0000
parents 4e81fe3bceff
children 8b0cfeb06365
comparison
equal deleted inserted replaced
6740:605ea655366d 6741:00116015904d
20 ## -*- texinfo -*- 20 ## -*- texinfo -*-
21 ## @deftypefn {Function File} {[@var{xopt}, @var{fmin}, @var{status}, @var{extra}] =} glpk (@var{c}, @var{a}, @var{b}, @var{lb}, @var{ub}, @var{ctype}, @var{vartype}, @var{sense}, @var{param}) 21 ## @deftypefn {Function File} {[@var{xopt}, @var{fmin}, @var{status}, @var{extra}] =} glpk (@var{c}, @var{a}, @var{b}, @var{lb}, @var{ub}, @var{ctype}, @var{vartype}, @var{sense}, @var{param})
22 ## Solve a linear program using the GNU GLPK library. Given three 22 ## Solve a linear program using the GNU GLPK library. Given three
23 ## arguments, @code{glpk} solves the following standard LP: 23 ## arguments, @code{glpk} solves the following standard LP:
24 ## 24 ##
25 ## @iftex
26 ## @tex
27 ## $$
28 ## \min_x C^T x
29 ## $$
30 ## @end tex
31 ## @end iftex
32 ## @ifnottex
25 ## @example 33 ## @example
26 ## min C'*x 34 ## min C'*x
27 ## @end example 35 ## @end example
36 ## @end ifnottex
28 ## 37 ##
29 ## subject to 38 ## subject to
30 ## 39 ##
40 ## @iftex
41 ## @tex
42 ## $$
43 ## Ax = b \qquad x \geq 0
44 ## $$
45 ## @end tex
46 ## @end iftex
47 ## @ifnottex
31 ## @example 48 ## @example
32 ## @group 49 ## @group
33 ## A*x = b 50 ## A*x = b
34 ## x >= 0 51 ## x >= 0
35 ## @end group 52 ## @end group
36 ## @end example 53 ## @end example
54 ## @end ifnottex
37 ## 55 ##
38 ## but may also solve problems of the form 56 ## but may also solve problems of the form
39 ## 57 ##
58 ## @iftex
59 ## @tex
60 ## $$
61 ## [ \min_x | \max_x ] C^T x
62 ## $$
63 ## @end tex
64 ## @end iftex
65 ## @ifnottex
40 ## @example 66 ## @example
41 ## [ min | max ] C'*x 67 ## [ min | max ] C'*x
42 ## @end example 68 ## @end example
69 ## @end ifnottex
43 ## 70 ##
44 ## subject to 71 ## subject to
45 ## 72 ##
73 ## @iftex
74 ## @tex
75 ## $$
76 ## Ax [ = | \leq | \geq ] b \qquad LB \leq x \leq UB
77 ## $$
78 ## @end tex
79 ## @end iftex
80 ## @ifnottex
46 ## @example 81 ## @example
47 ## @group 82 ## @group
48 ## A*x [ "=" | "<=" | ">=" ] b 83 ## A*x [ "=" | "<=" | ">=" ] b
49 ## x >= LB 84 ## x >= LB
50 ## x <= UB 85 ## x <= UB
51 ## @end group 86 ## @end group
52 ## @end example 87 ## @end example
88 ## @end ifnottex
53 ## 89 ##
54 ## Input arguments: 90 ## Input arguments:
55 ## 91 ##
56 ## @table @var 92 ## @table @var
57 ## @item c 93 ## @item c