annotate scripts/optimization/glpk.m @ 22225:42456fc9bf6c

glpk.m: Style fixes for cset 20e0c0b8820c. * glpk.m: Use space between function name and opening parenthesis.
author Rik <rik@octave.org>
date Mon, 08 Aug 2016 15:21:03 -0700
parents 20e0c0b8820c
children bac0d6f07a3e
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
19697
4197fc428c7d maint: Update copyright notices for 2015.
John W. Eaton <jwe@octave.org>
parents: 19040
diff changeset
1 ## Copyright (C) 2005-2015 Nicolo' Giorgetti
4197fc428c7d maint: Update copyright notices for 2015.
John W. Eaton <jwe@octave.org>
parents: 19040
diff changeset
2 ## Copyright (C) 2013-2015 Sébastien Villemot <sebastien@debian.org>
5233
bdf892d3b024 [project @ 2005-03-22 17:44:31 by jwe]
jwe
parents: 5232
diff changeset
3 ##
bdf892d3b024 [project @ 2005-03-22 17:44:31 by jwe]
jwe
parents: 5232
diff changeset
4 ## This file is part of Octave.
bdf892d3b024 [project @ 2005-03-22 17:44:31 by jwe]
jwe
parents: 5232
diff changeset
5 ##
bdf892d3b024 [project @ 2005-03-22 17:44:31 by jwe]
jwe
parents: 5232
diff changeset
6 ## Octave is free software; you can redistribute it and/or modify it
bdf892d3b024 [project @ 2005-03-22 17:44:31 by jwe]
jwe
parents: 5232
diff changeset
7 ## under the terms of the GNU General Public License as published by
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 7001
diff changeset
8 ## the Free Software Foundation; either version 3 of the License, or (at
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 7001
diff changeset
9 ## your option) any later version.
5233
bdf892d3b024 [project @ 2005-03-22 17:44:31 by jwe]
jwe
parents: 5232
diff changeset
10 ##
bdf892d3b024 [project @ 2005-03-22 17:44:31 by jwe]
jwe
parents: 5232
diff changeset
11 ## Octave is distributed in the hope that it will be useful, but
bdf892d3b024 [project @ 2005-03-22 17:44:31 by jwe]
jwe
parents: 5232
diff changeset
12 ## WITHOUT ANY WARRANTY; without even the implied warranty of
bdf892d3b024 [project @ 2005-03-22 17:44:31 by jwe]
jwe
parents: 5232
diff changeset
13 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
bdf892d3b024 [project @ 2005-03-22 17:44:31 by jwe]
jwe
parents: 5232
diff changeset
14 ## General Public License for more details.
bdf892d3b024 [project @ 2005-03-22 17:44:31 by jwe]
jwe
parents: 5232
diff changeset
15 ##
bdf892d3b024 [project @ 2005-03-22 17:44:31 by jwe]
jwe
parents: 5232
diff changeset
16 ## You should have received a copy of the GNU General Public License
7016
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 7001
diff changeset
17 ## along with Octave; see the file COPYING. If not, see
93c65f2a5668 [project @ 2007-10-12 06:40:56 by jwe]
jwe
parents: 7001
diff changeset
18 ## <http://www.gnu.org/licenses/>.
5233
bdf892d3b024 [project @ 2005-03-22 17:44:31 by jwe]
jwe
parents: 5232
diff changeset
19
5244
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
20 ## -*- texinfo -*-
20852
516bb87ea72e 2015 Code Sprint: remove class of function from docstring for all m-files.
Rik <rik@octave.org>
parents: 20165
diff changeset
21 ## @deftypefn {} {[@var{xopt}, @var{fmin}, @var{errnum}, @var{extra}] =} glpk (@var{c}, @var{A}, @var{b}, @var{lb}, @var{ub}, @var{ctype}, @var{vartype}, @var{sense}, @var{param})
20165
f1d0f506ee78 doc: Update more docstrings to have one sentence summary as first line.
Rik <rik@octave.org>
parents: 19697
diff changeset
22 ## Solve a linear program using the GNU @sc{glpk} library.
f1d0f506ee78 doc: Update more docstrings to have one sentence summary as first line.
Rik <rik@octave.org>
parents: 19697
diff changeset
23 ##
f1d0f506ee78 doc: Update more docstrings to have one sentence summary as first line.
Rik <rik@octave.org>
parents: 19697
diff changeset
24 ## Given three arguments, @code{glpk} solves the following standard LP:
6741
00116015904d [project @ 2007-06-18 16:07:14 by jwe]
jwe
parents: 6333
diff changeset
25 ## @tex
00116015904d [project @ 2007-06-18 16:07:14 by jwe]
jwe
parents: 6333
diff changeset
26 ## $$
00116015904d [project @ 2007-06-18 16:07:14 by jwe]
jwe
parents: 6333
diff changeset
27 ## \min_x C^T x
00116015904d [project @ 2007-06-18 16:07:14 by jwe]
jwe
parents: 6333
diff changeset
28 ## $$
00116015904d [project @ 2007-06-18 16:07:14 by jwe]
jwe
parents: 6333
diff changeset
29 ## @end tex
00116015904d [project @ 2007-06-18 16:07:14 by jwe]
jwe
parents: 6333
diff changeset
30 ## @ifnottex
10821
693e22af08ae Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents: 10793
diff changeset
31 ##
5244
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
32 ## @example
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
33 ## min C'*x
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
34 ## @end example
10821
693e22af08ae Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents: 10793
diff changeset
35 ##
6741
00116015904d [project @ 2007-06-18 16:07:14 by jwe]
jwe
parents: 6333
diff changeset
36 ## @end ifnottex
5237
652e8aa49fa7 [project @ 2005-03-23 21:28:45 by jwe]
jwe
parents: 5233
diff changeset
37 ## subject to
6741
00116015904d [project @ 2007-06-18 16:07:14 by jwe]
jwe
parents: 6333
diff changeset
38 ## @tex
00116015904d [project @ 2007-06-18 16:07:14 by jwe]
jwe
parents: 6333
diff changeset
39 ## $$
00116015904d [project @ 2007-06-18 16:07:14 by jwe]
jwe
parents: 6333
diff changeset
40 ## Ax = b \qquad x \geq 0
00116015904d [project @ 2007-06-18 16:07:14 by jwe]
jwe
parents: 6333
diff changeset
41 ## $$
00116015904d [project @ 2007-06-18 16:07:14 by jwe]
jwe
parents: 6333
diff changeset
42 ## @end tex
00116015904d [project @ 2007-06-18 16:07:14 by jwe]
jwe
parents: 6333
diff changeset
43 ## @ifnottex
10821
693e22af08ae Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents: 10793
diff changeset
44 ##
5244
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
45 ## @example
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
46 ## @group
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
47 ## A*x = b
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
48 ## x >= 0
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
49 ## @end group
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
50 ## @end example
10821
693e22af08ae Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents: 10793
diff changeset
51 ##
6741
00116015904d [project @ 2007-06-18 16:07:14 by jwe]
jwe
parents: 6333
diff changeset
52 ## @end ifnottex
5237
652e8aa49fa7 [project @ 2005-03-23 21:28:45 by jwe]
jwe
parents: 5233
diff changeset
53 ## but may also solve problems of the form
6741
00116015904d [project @ 2007-06-18 16:07:14 by jwe]
jwe
parents: 6333
diff changeset
54 ## @tex
00116015904d [project @ 2007-06-18 16:07:14 by jwe]
jwe
parents: 6333
diff changeset
55 ## $$
00116015904d [project @ 2007-06-18 16:07:14 by jwe]
jwe
parents: 6333
diff changeset
56 ## [ \min_x | \max_x ] C^T x
00116015904d [project @ 2007-06-18 16:07:14 by jwe]
jwe
parents: 6333
diff changeset
57 ## $$
00116015904d [project @ 2007-06-18 16:07:14 by jwe]
jwe
parents: 6333
diff changeset
58 ## @end tex
00116015904d [project @ 2007-06-18 16:07:14 by jwe]
jwe
parents: 6333
diff changeset
59 ## @ifnottex
10821
693e22af08ae Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents: 10793
diff changeset
60 ##
5244
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
61 ## @example
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
62 ## [ min | max ] C'*x
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
63 ## @end example
10821
693e22af08ae Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents: 10793
diff changeset
64 ##
6741
00116015904d [project @ 2007-06-18 16:07:14 by jwe]
jwe
parents: 6333
diff changeset
65 ## @end ifnottex
5237
652e8aa49fa7 [project @ 2005-03-23 21:28:45 by jwe]
jwe
parents: 5233
diff changeset
66 ## subject to
6741
00116015904d [project @ 2007-06-18 16:07:14 by jwe]
jwe
parents: 6333
diff changeset
67 ## @tex
00116015904d [project @ 2007-06-18 16:07:14 by jwe]
jwe
parents: 6333
diff changeset
68 ## $$
9051
1bf0ce0930be Grammar check TexInfo in all .m files
Rik <rdrider0-list@yahoo.com>
parents: 8920
diff changeset
69 ## Ax [ = | \leq | \geq ] b \qquad LB \leq x \leq UB
6741
00116015904d [project @ 2007-06-18 16:07:14 by jwe]
jwe
parents: 6333
diff changeset
70 ## $$
00116015904d [project @ 2007-06-18 16:07:14 by jwe]
jwe
parents: 6333
diff changeset
71 ## @end tex
00116015904d [project @ 2007-06-18 16:07:14 by jwe]
jwe
parents: 6333
diff changeset
72 ## @ifnottex
10821
693e22af08ae Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents: 10793
diff changeset
73 ##
5244
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
74 ## @example
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
75 ## @group
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
76 ## A*x [ "=" | "<=" | ">=" ] b
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
77 ## x >= LB
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
78 ## x <= UB
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
79 ## @end group
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
80 ## @end example
10821
693e22af08ae Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents: 10793
diff changeset
81 ##
6741
00116015904d [project @ 2007-06-18 16:07:14 by jwe]
jwe
parents: 6333
diff changeset
82 ## @end ifnottex
11587
c792872f8942 all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
83 ##
5244
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
84 ## Input arguments:
11587
c792872f8942 all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
85 ##
5244
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
86 ## @table @var
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
87 ## @item c
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
88 ## A column array containing the objective function coefficients.
11587
c792872f8942 all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
89 ##
11471
994e2a93a8e2 Use uppercase 'A' to refer to matrix inputs in m-files.
Rik <octave@nomad.inbox5.com>
parents: 10821
diff changeset
90 ## @item A
5244
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
91 ## A matrix containing the constraints coefficients.
11587
c792872f8942 all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
92 ##
5244
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
93 ## @item b
20165
f1d0f506ee78 doc: Update more docstrings to have one sentence summary as first line.
Rik <rik@octave.org>
parents: 19697
diff changeset
94 ## A column array containing the right-hand side value for each constraint in
f1d0f506ee78 doc: Update more docstrings to have one sentence summary as first line.
Rik <rik@octave.org>
parents: 19697
diff changeset
95 ## the constraint matrix.
11587
c792872f8942 all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
96 ##
5244
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
97 ## @item lb
20165
f1d0f506ee78 doc: Update more docstrings to have one sentence summary as first line.
Rik <rik@octave.org>
parents: 19697
diff changeset
98 ## An array containing the lower bound on each of the variables. If @var{lb}
f1d0f506ee78 doc: Update more docstrings to have one sentence summary as first line.
Rik <rik@octave.org>
parents: 19697
diff changeset
99 ## is not supplied, the default lower bound for the variables is zero.
11587
c792872f8942 all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
100 ##
5244
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
101 ## @item ub
20165
f1d0f506ee78 doc: Update more docstrings to have one sentence summary as first line.
Rik <rik@octave.org>
parents: 19697
diff changeset
102 ## An array containing the upper bound on each of the variables. If @var{ub}
f1d0f506ee78 doc: Update more docstrings to have one sentence summary as first line.
Rik <rik@octave.org>
parents: 19697
diff changeset
103 ## is not supplied, the default upper bound is assumed to be infinite.
11587
c792872f8942 all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
104 ##
5244
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
105 ## @item ctype
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
106 ## An array of characters containing the sense of each constraint in the
20165
f1d0f506ee78 doc: Update more docstrings to have one sentence summary as first line.
Rik <rik@octave.org>
parents: 19697
diff changeset
107 ## constraint matrix. Each element of the array may be one of the following
f1d0f506ee78 doc: Update more docstrings to have one sentence summary as first line.
Rik <rik@octave.org>
parents: 19697
diff changeset
108 ## values
14366
b76f0740940e doc: Periodic grammar check of documentation.
Rik <octave@nomad.inbox5.com>
parents: 14138
diff changeset
109 ##
11595
5ec6aa05638d Prevent doubled quotes around @table items in Info.
Rik <octave@nomad.inbox5.com>
parents: 11587
diff changeset
110 ## @table @asis
17281
bc924baa2c4e doc: Add new @qcode macro for code samples which are quoted.
Rik <rik@octave.org>
parents: 17180
diff changeset
111 ## @item @qcode{"F"}
7096
81bed50b9feb [project @ 2007-11-02 16:13:43 by jwe]
jwe
parents: 7017
diff changeset
112 ## A free (unbounded) constraint (the constraint is ignored).
10821
693e22af08ae Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents: 10793
diff changeset
113 ##
17281
bc924baa2c4e doc: Add new @qcode macro for code samples which are quoted.
Rik <rik@octave.org>
parents: 17180
diff changeset
114 ## @item @qcode{"U"}
7096
81bed50b9feb [project @ 2007-11-02 16:13:43 by jwe]
jwe
parents: 7017
diff changeset
115 ## An inequality constraint with an upper bound (@code{A(i,:)*x <= b(i)}).
10821
693e22af08ae Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents: 10793
diff changeset
116 ##
17281
bc924baa2c4e doc: Add new @qcode macro for code samples which are quoted.
Rik <rik@octave.org>
parents: 17180
diff changeset
117 ## @item @qcode{"S"}
7096
81bed50b9feb [project @ 2007-11-02 16:13:43 by jwe]
jwe
parents: 7017
diff changeset
118 ## An equality constraint (@code{A(i,:)*x = b(i)}).
10821
693e22af08ae Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents: 10793
diff changeset
119 ##
17281
bc924baa2c4e doc: Add new @qcode macro for code samples which are quoted.
Rik <rik@octave.org>
parents: 17180
diff changeset
120 ## @item @qcode{"L"}
7096
81bed50b9feb [project @ 2007-11-02 16:13:43 by jwe]
jwe
parents: 7017
diff changeset
121 ## An inequality with a lower bound (@code{A(i,:)*x >= b(i)}).
10821
693e22af08ae Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents: 10793
diff changeset
122 ##
17281
bc924baa2c4e doc: Add new @qcode macro for code samples which are quoted.
Rik <rik@octave.org>
parents: 17180
diff changeset
123 ## @item @qcode{"D"}
7096
81bed50b9feb [project @ 2007-11-02 16:13:43 by jwe]
jwe
parents: 7017
diff changeset
124 ## An inequality constraint with both upper and lower bounds
18679
a142f35f3cb6 doc: Fix unbalanced parentheses in documentation.
Rik <rik@octave.org>
parents: 17744
diff changeset
125 ## (@code{A(i,:)*x >= -b(i)}) @emph{and} (@code{A(i,:)*x <= b(i)}).
5244
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
126 ## @end table
11587
c792872f8942 all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
127 ##
5244
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
128 ## @item vartype
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
129 ## A column array containing the types of the variables.
14366
b76f0740940e doc: Periodic grammar check of documentation.
Rik <octave@nomad.inbox5.com>
parents: 14138
diff changeset
130 ##
11595
5ec6aa05638d Prevent doubled quotes around @table items in Info.
Rik <octave@nomad.inbox5.com>
parents: 11587
diff changeset
131 ## @table @asis
17281
bc924baa2c4e doc: Add new @qcode macro for code samples which are quoted.
Rik <rik@octave.org>
parents: 17180
diff changeset
132 ## @item @qcode{"C"}
7096
81bed50b9feb [project @ 2007-11-02 16:13:43 by jwe]
jwe
parents: 7017
diff changeset
133 ## A continuous variable.
10821
693e22af08ae Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents: 10793
diff changeset
134 ##
17281
bc924baa2c4e doc: Add new @qcode macro for code samples which are quoted.
Rik <rik@octave.org>
parents: 17180
diff changeset
135 ## @item @qcode{"I"}
7096
81bed50b9feb [project @ 2007-11-02 16:13:43 by jwe]
jwe
parents: 7017
diff changeset
136 ## An integer variable.
5244
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
137 ## @end table
11587
c792872f8942 all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
138 ##
5244
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
139 ## @item sense
20165
f1d0f506ee78 doc: Update more docstrings to have one sentence summary as first line.
Rik <rik@octave.org>
parents: 19697
diff changeset
140 ## If @var{sense} is 1, the problem is a minimization. If @var{sense} is -1,
f1d0f506ee78 doc: Update more docstrings to have one sentence summary as first line.
Rik <rik@octave.org>
parents: 19697
diff changeset
141 ## the problem is a maximization. The default value is 1.
11587
c792872f8942 all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
142 ##
5244
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
143 ## @item param
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
144 ## A structure containing the following parameters used to define the
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
145 ## behavior of solver. Missing elements in the structure take on default
20165
f1d0f506ee78 doc: Update more docstrings to have one sentence summary as first line.
Rik <rik@octave.org>
parents: 19697
diff changeset
146 ## values, so you only need to set the elements that you wish to change from
f1d0f506ee78 doc: Update more docstrings to have one sentence summary as first line.
Rik <rik@octave.org>
parents: 19697
diff changeset
147 ## the default.
11587
c792872f8942 all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
148 ##
5244
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
149 ## Integer parameters:
11587
c792872f8942 all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
150 ##
5244
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
151 ## @table @code
17180
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
152 ## @item msglev (default: 1)
5244
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
153 ## Level of messages output by solver routines:
14366
b76f0740940e doc: Periodic grammar check of documentation.
Rik <octave@nomad.inbox5.com>
parents: 14138
diff changeset
154 ##
5244
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
155 ## @table @asis
17180
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
156 ## @item 0 (@w{@code{GLP_MSG_OFF}})
5244
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
157 ## No output.
10821
693e22af08ae Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents: 10793
diff changeset
158 ##
17180
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
159 ## @item 1 (@w{@code{GLP_MSG_ERR}})
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
160 ## Error and warning messages only.
10821
693e22af08ae Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents: 10793
diff changeset
161 ##
17180
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
162 ## @item 2 (@w{@code{GLP_MSG_ON}})
10821
693e22af08ae Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents: 10793
diff changeset
163 ## Normal output.
693e22af08ae Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents: 10793
diff changeset
164 ##
17180
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
165 ## @item 3 (@w{@code{GLP_MSG_ALL}})
5244
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
166 ## Full output (includes informational messages).
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
167 ## @end table
11587
c792872f8942 all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
168 ##
17180
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
169 ## @item scale (default: 16)
17281
bc924baa2c4e doc: Add new @qcode macro for code samples which are quoted.
Rik <rik@octave.org>
parents: 17180
diff changeset
170 ## Scaling option. The values can be combined with the bitwise OR operator and
17180
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
171 ## may be the following:
14366
b76f0740940e doc: Periodic grammar check of documentation.
Rik <octave@nomad.inbox5.com>
parents: 14138
diff changeset
172 ##
5244
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
173 ## @table @asis
17180
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
174 ## @item 1 (@w{@code{GLP_SF_GM}})
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
175 ## Geometric mean scaling.
10821
693e22af08ae Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents: 10793
diff changeset
176 ##
17180
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
177 ## @item 16 (@w{@code{GLP_SF_EQ}})
7001
8b0cfeb06365 [project @ 2007-10-10 18:02:59 by jwe]
jwe
parents: 6741
diff changeset
178 ## Equilibration scaling.
10821
693e22af08ae Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents: 10793
diff changeset
179 ##
17180
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
180 ## @item 32 (@w{@code{GLP_SF_2N}})
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
181 ## Round scale factors to power of two.
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
182 ##
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
183 ## @item 64 (@w{@code{GLP_SF_SKIP}})
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
184 ## Skip if problem is well scaled.
5244
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
185 ## @end table
11587
c792872f8942 all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
186 ##
17281
bc924baa2c4e doc: Add new @qcode macro for code samples which are quoted.
Rik <rik@octave.org>
parents: 17180
diff changeset
187 ## Alternatively, a value of 128 (@w{@env{GLP_SF_AUTO}}) may be also
bc924baa2c4e doc: Add new @qcode macro for code samples which are quoted.
Rik <rik@octave.org>
parents: 17180
diff changeset
188 ## specified, in which case the routine chooses the scaling options
bc924baa2c4e doc: Add new @qcode macro for code samples which are quoted.
Rik <rik@octave.org>
parents: 17180
diff changeset
189 ## automatically.
17180
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
190 ##
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
191 ## @item dual (default: 1)
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
192 ## Simplex method option:
14366
b76f0740940e doc: Periodic grammar check of documentation.
Rik <octave@nomad.inbox5.com>
parents: 14138
diff changeset
193 ##
5244
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
194 ## @table @asis
17180
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
195 ## @item 1 (@w{@code{GLP_PRIMAL}})
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
196 ## Use two-phase primal simplex.
10821
693e22af08ae Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents: 10793
diff changeset
197 ##
17180
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
198 ## @item 2 (@w{@code{GLP_DUALP}})
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
199 ## Use two-phase dual simplex, and if it fails, switch to the primal simplex.
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
200 ##
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
201 ## @item 3 (@w{@code{GLP_DUAL}})
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
202 ## Use two-phase dual simplex.
5244
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
203 ## @end table
11587
c792872f8942 all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
204 ##
17180
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
205 ## @item price (default: 34)
5244
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
206 ## Pricing option (for both primal and dual simplex):
14366
b76f0740940e doc: Periodic grammar check of documentation.
Rik <octave@nomad.inbox5.com>
parents: 14138
diff changeset
207 ##
5244
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
208 ## @table @asis
17180
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
209 ## @item 17 (@w{@code{GLP_PT_STD}})
5244
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
210 ## Textbook pricing.
10821
693e22af08ae Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents: 10793
diff changeset
211 ##
17180
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
212 ## @item 34 (@w{@code{GLP_PT_PSE}})
5244
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
213 ## Steepest edge pricing.
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
214 ## @end table
11587
c792872f8942 all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
215 ##
17180
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
216 ## @item itlim (default: intmax)
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
217 ## Simplex iterations limit. It is decreased by one each time when one simplex
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
218 ## iteration has been performed, and reaching zero value signals the solver to
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
219 ## stop the search.
10821
693e22af08ae Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents: 10793
diff changeset
220 ##
17180
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
221 ## @item outfrq (default: 200)
20165
f1d0f506ee78 doc: Update more docstrings to have one sentence summary as first line.
Rik <rik@octave.org>
parents: 19697
diff changeset
222 ## Output frequency, in iterations. This parameter specifies how frequently
f1d0f506ee78 doc: Update more docstrings to have one sentence summary as first line.
Rik <rik@octave.org>
parents: 19697
diff changeset
223 ## the solver sends information about the solution to the standard output.
11587
c792872f8942 all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
224 ##
17180
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
225 ## @item branch (default: 4)
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
226 ## Branching technique option (for MIP only):
14366
b76f0740940e doc: Periodic grammar check of documentation.
Rik <octave@nomad.inbox5.com>
parents: 14138
diff changeset
227 ##
5244
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
228 ## @table @asis
17180
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
229 ## @item 1 (@w{@code{GLP_BR_FFV}})
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
230 ## First fractional variable.
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
231 ##
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
232 ## @item 2 (@w{@code{GLP_BR_LFV}})
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
233 ## Last fractional variable.
10821
693e22af08ae Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents: 10793
diff changeset
234 ##
17180
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
235 ## @item 3 (@w{@code{GLP_BR_MFV}})
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
236 ## Most fractional variable.
10821
693e22af08ae Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents: 10793
diff changeset
237 ##
17180
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
238 ## @item 4 (@w{@code{GLP_BR_DTH}})
19040
0850b5212619 doc: Add @nospell macro around proper names in documentation.
Rik <rik@octave.org>
parents: 18679
diff changeset
239 ## Heuristic by @nospell{Driebeck and Tomlin}.
17180
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
240 ##
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
241 ## @item 5 (@w{@code{GLP_BR_PCH}})
17290
17be601bc783 doc: Periodic spellchecking of documentation.
Rik <rik@octave.org>
parents: 17281
diff changeset
242 ## Hybrid @nospell{pseudocost} heuristic.
5244
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
243 ## @end table
11587
c792872f8942 all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
244 ##
17180
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
245 ## @item btrack (default: 4)
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
246 ## Backtracking technique option (for MIP only):
14366
b76f0740940e doc: Periodic grammar check of documentation.
Rik <octave@nomad.inbox5.com>
parents: 14138
diff changeset
247 ##
5244
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
248 ## @table @asis
17180
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
249 ## @item 1 (@w{@code{GLP_BT_DFS}})
5244
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
250 ## Depth first search.
10821
693e22af08ae Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents: 10793
diff changeset
251 ##
17180
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
252 ## @item 2 (@w{@code{GLP_BT_BFS}})
5244
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
253 ## Breadth first search.
10821
693e22af08ae Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents: 10793
diff changeset
254 ##
17180
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
255 ## @item 3 (@w{@code{GLP_BT_BLB}})
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
256 ## Best local bound.
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
257 ##
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
258 ## @item 4 (@w{@code{GLP_BT_BPH}})
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
259 ## Best projection heuristic.
11587
c792872f8942 all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
260 ## @end table
c792872f8942 all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
261 ##
17180
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
262 ## @item presol (default: 1)
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
263 ## If this flag is set, the simplex solver uses the built-in LP presolver.
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
264 ## Otherwise the LP presolver is not used.
11587
c792872f8942 all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
265 ##
5244
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
266 ## @item lpsolver (default: 1)
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
267 ## Select which solver to use. If the problem is a MIP problem this flag
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
268 ## will be ignored.
14366
b76f0740940e doc: Periodic grammar check of documentation.
Rik <octave@nomad.inbox5.com>
parents: 14138
diff changeset
269 ##
5244
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
270 ## @table @asis
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
271 ## @item 1
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
272 ## Revised simplex method.
10821
693e22af08ae Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents: 10793
diff changeset
273 ##
5244
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
274 ## @item 2
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
275 ## Interior point method.
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
276 ## @end table
10821
693e22af08ae Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents: 10793
diff changeset
277 ##
17180
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
278 ## @item rtest (default: 34)
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
279 ## Ratio test technique:
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
280 ##
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
281 ## @table @asis
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
282 ## @item 17 (@w{@code{GLP_RT_STD}})
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
283 ## Standard ("textbook").
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
284 ##
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
285 ## @item 34 (@w{@code{GLP_RT_HAR}})
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
286 ## Harris' two-pass ratio test.
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
287 ## @end table
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
288 ##
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
289 ## @item tmlim (default: intmax)
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
290 ## Searching time limit, in milliseconds.
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
291 ##
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
292 ## @item outdly (default: 0)
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
293 ## Output delay, in seconds. This parameter specifies how long the solver
20165
f1d0f506ee78 doc: Update more docstrings to have one sentence summary as first line.
Rik <rik@octave.org>
parents: 19697
diff changeset
294 ## should delay sending information about the solution to the standard output.
17180
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
295 ##
5244
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
296 ## @item save (default: 0)
20165
f1d0f506ee78 doc: Update more docstrings to have one sentence summary as first line.
Rik <rik@octave.org>
parents: 19697
diff changeset
297 ## If this parameter is nonzero, save a copy of the problem in CPLEX LP
f1d0f506ee78 doc: Update more docstrings to have one sentence summary as first line.
Rik <rik@octave.org>
parents: 19697
diff changeset
298 ## format to the file @file{"outpb.lp"}. There is currently no way to change
f1d0f506ee78 doc: Update more docstrings to have one sentence summary as first line.
Rik <rik@octave.org>
parents: 19697
diff changeset
299 ## the name of the output file.
5244
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
300 ## @end table
11587
c792872f8942 all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
301 ##
5244
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
302 ## Real parameters:
11587
c792872f8942 all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
303 ##
5244
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
304 ## @table @code
17180
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
305 ## @item tolbnd (default: 1e-7)
5289
b98bf1d70a0a [project @ 2005-04-21 14:43:14 by jwe]
jwe
parents: 5244
diff changeset
306 ## Relative tolerance used to check if the current basic solution is primal
5244
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
307 ## feasible. It is not recommended that you change this parameter unless you
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
308 ## have a detailed understanding of its purpose.
11587
c792872f8942 all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
309 ##
17180
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
310 ## @item toldj (default: 1e-7)
5244
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
311 ## Absolute tolerance used to check if the current basic solution is dual
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
312 ## feasible. It is not recommended that you change this parameter unless you
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
313 ## have a detailed understanding of its purpose.
11587
c792872f8942 all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
314 ##
17180
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
315 ## @item tolpiv (default: 1e-10)
20165
f1d0f506ee78 doc: Update more docstrings to have one sentence summary as first line.
Rik <rik@octave.org>
parents: 19697
diff changeset
316 ## Relative tolerance used to choose eligible pivotal elements of the simplex
f1d0f506ee78 doc: Update more docstrings to have one sentence summary as first line.
Rik <rik@octave.org>
parents: 19697
diff changeset
317 ## table. It is not recommended that you change this parameter unless you have
f1d0f506ee78 doc: Update more docstrings to have one sentence summary as first line.
Rik <rik@octave.org>
parents: 19697
diff changeset
318 ## a detailed understanding of its purpose.
11587
c792872f8942 all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
319 ##
17180
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
320 ## @item objll (default: -DBL_MAX)
20165
f1d0f506ee78 doc: Update more docstrings to have one sentence summary as first line.
Rik <rik@octave.org>
parents: 19697
diff changeset
321 ## Lower limit of the objective function. If the objective function reaches
f1d0f506ee78 doc: Update more docstrings to have one sentence summary as first line.
Rik <rik@octave.org>
parents: 19697
diff changeset
322 ## this limit and continues decreasing, the solver stops the search. This
f1d0f506ee78 doc: Update more docstrings to have one sentence summary as first line.
Rik <rik@octave.org>
parents: 19697
diff changeset
323 ## parameter is used in the dual simplex method only.
11587
c792872f8942 all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
324 ##
17180
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
325 ## @item objul (default: +DBL_MAX)
20165
f1d0f506ee78 doc: Update more docstrings to have one sentence summary as first line.
Rik <rik@octave.org>
parents: 19697
diff changeset
326 ## Upper limit of the objective function. If the objective function reaches
f1d0f506ee78 doc: Update more docstrings to have one sentence summary as first line.
Rik <rik@octave.org>
parents: 19697
diff changeset
327 ## this limit and continues increasing, the solver stops the search. This
f1d0f506ee78 doc: Update more docstrings to have one sentence summary as first line.
Rik <rik@octave.org>
parents: 19697
diff changeset
328 ## parameter is used in the dual simplex only.
11587
c792872f8942 all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
329 ##
17180
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
330 ## @item tolint (default: 1e-5)
5289
b98bf1d70a0a [project @ 2005-04-21 14:43:14 by jwe]
jwe
parents: 5244
diff changeset
331 ## Relative tolerance used to check if the current basic solution is integer
20165
f1d0f506ee78 doc: Update more docstrings to have one sentence summary as first line.
Rik <rik@octave.org>
parents: 19697
diff changeset
332 ## feasible. It is not recommended that you change this parameter unless you
f1d0f506ee78 doc: Update more docstrings to have one sentence summary as first line.
Rik <rik@octave.org>
parents: 19697
diff changeset
333 ## have a detailed understanding of its purpose.
11587
c792872f8942 all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
334 ##
17180
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
335 ## @item tolobj (default: 1e-7)
20165
f1d0f506ee78 doc: Update more docstrings to have one sentence summary as first line.
Rik <rik@octave.org>
parents: 19697
diff changeset
336 ## Relative tolerance used to check if the value of the objective function is
f1d0f506ee78 doc: Update more docstrings to have one sentence summary as first line.
Rik <rik@octave.org>
parents: 19697
diff changeset
337 ## not better than in the best known integer feasible solution. It is not
f1d0f506ee78 doc: Update more docstrings to have one sentence summary as first line.
Rik <rik@octave.org>
parents: 19697
diff changeset
338 ## recommended that you change this parameter unless you have a detailed
f1d0f506ee78 doc: Update more docstrings to have one sentence summary as first line.
Rik <rik@octave.org>
parents: 19697
diff changeset
339 ## understanding of its purpose.
5244
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
340 ## @end table
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
341 ## @end table
11587
c792872f8942 all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
342 ##
5244
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
343 ## Output values:
11587
c792872f8942 all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
344 ##
5244
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
345 ## @table @var
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
346 ## @item xopt
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
347 ## The optimizer (the value of the decision variables at the optimum).
10821
693e22af08ae Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents: 10793
diff changeset
348 ##
5244
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
349 ## @item fopt
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
350 ## The optimum value of the objective function.
10821
693e22af08ae Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents: 10793
diff changeset
351 ##
17180
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
352 ## @item errnum
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
353 ## Error code.
14366
b76f0740940e doc: Periodic grammar check of documentation.
Rik <octave@nomad.inbox5.com>
parents: 14138
diff changeset
354 ##
5244
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
355 ## @table @asis
17180
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
356 ## @item 0
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
357 ## No error.
12642
f96b9b9f141b doc: Periodic grammarcheck and spellcheck of documentation.
Rik <octave@nomad.inbox5.com>
parents: 11595
diff changeset
358 ##
17180
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
359 ## @item 1 (@w{@code{GLP_EBADB}})
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
360 ## Invalid basis.
12642
f96b9b9f141b doc: Periodic grammarcheck and spellcheck of documentation.
Rik <octave@nomad.inbox5.com>
parents: 11595
diff changeset
361 ##
17180
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
362 ## @item 2 (@w{@code{GLP_ESING}})
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
363 ## Singular matrix.
12642
f96b9b9f141b doc: Periodic grammarcheck and spellcheck of documentation.
Rik <octave@nomad.inbox5.com>
parents: 11595
diff changeset
364 ##
17180
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
365 ## @item 3 (@w{@code{GLP_ECOND}})
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
366 ## Ill-conditioned matrix.
15007
8f0e3c5bfa5f doc: Periodic grammarcheck of documentation
Rik <rik@octave.org>
parents: 14868
diff changeset
367 ##
17180
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
368 ## @item 4 (@w{@code{GLP_EBOUND}})
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
369 ## Invalid bounds.
5232
9b776f5a33eb [project @ 2005-03-22 16:16:30 by jwe]
jwe
parents:
diff changeset
370 ##
17180
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
371 ## @item 5 (@w{@code{GLP_EFAIL}})
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
372 ## Solver failed.
12642
f96b9b9f141b doc: Periodic grammarcheck and spellcheck of documentation.
Rik <octave@nomad.inbox5.com>
parents: 11595
diff changeset
373 ##
17180
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
374 ## @item 6 (@w{@code{GLP_EOBJLL}})
5244
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
375 ## Objective function lower limit reached.
12642
f96b9b9f141b doc: Periodic grammarcheck and spellcheck of documentation.
Rik <octave@nomad.inbox5.com>
parents: 11595
diff changeset
376 ##
17180
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
377 ## @item 7 (@w{@code{GLP_EOBJUL}})
5244
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
378 ## Objective function upper limit reached.
12642
f96b9b9f141b doc: Periodic grammarcheck and spellcheck of documentation.
Rik <octave@nomad.inbox5.com>
parents: 11595
diff changeset
379 ##
17180
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
380 ## @item 8 (@w{@code{GLP_EITLIM}})
5244
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
381 ## Iterations limit exhausted.
12642
f96b9b9f141b doc: Periodic grammarcheck and spellcheck of documentation.
Rik <octave@nomad.inbox5.com>
parents: 11595
diff changeset
382 ##
17180
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
383 ## @item 9 (@w{@code{GLP_ETMLIM}})
5244
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
384 ## Time limit exhausted.
12642
f96b9b9f141b doc: Periodic grammarcheck and spellcheck of documentation.
Rik <octave@nomad.inbox5.com>
parents: 11595
diff changeset
385 ##
17180
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
386 ## @item 10 (@w{@code{GLP_ENOPFS}})
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
387 ## No primal feasible solution.
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
388 ##
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
389 ## @item 11 (@w{@code{GLP_ENODFS}})
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
390 ## No dual feasible solution.
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
391 ##
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
392 ## @item 12 (@w{@code{GLP_EROOT}})
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
393 ## Root LP optimum not provided.
12642
f96b9b9f141b doc: Periodic grammarcheck and spellcheck of documentation.
Rik <octave@nomad.inbox5.com>
parents: 11595
diff changeset
394 ##
17180
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
395 ## @item 13 (@w{@code{GLP_ESTOP}})
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
396 ## Search terminated by application.
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
397 ##
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
398 ## @item 14 (@w{@code{GLP_EMIPGAP}})
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
399 ## Relative MIP gap tolerance reached.
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
400 ##
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
401 ## @item 15 (@w{@code{GLP_ENOFEAS}})
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
402 ## No primal/dual feasible solution.
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
403 ##
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
404 ## @item 16 (@w{@code{GLP_ENOCVG}})
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
405 ## No convergence.
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
406 ##
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
407 ## @item 17 (@w{@code{GLP_EINSTAB}})
5244
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
408 ## Numerical instability.
12642
f96b9b9f141b doc: Periodic grammarcheck and spellcheck of documentation.
Rik <octave@nomad.inbox5.com>
parents: 11595
diff changeset
409 ##
17180
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
410 ## @item 18 (@w{@code{GLP_EDATA}})
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
411 ## Invalid data.
12642
f96b9b9f141b doc: Periodic grammarcheck and spellcheck of documentation.
Rik <octave@nomad.inbox5.com>
parents: 11595
diff changeset
412 ##
17180
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
413 ## @item 19 (@w{@code{GLP_ERANGE}})
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
414 ## Result out of range.
5244
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
415 ## @end table
10821
693e22af08ae Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents: 10793
diff changeset
416 ##
5244
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
417 ## @item extra
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
418 ## A data structure containing the following fields:
14366
b76f0740940e doc: Periodic grammar check of documentation.
Rik <octave@nomad.inbox5.com>
parents: 14138
diff changeset
419 ##
5244
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
420 ## @table @code
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
421 ## @item lambda
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
422 ## Dual variables.
10821
693e22af08ae Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents: 10793
diff changeset
423 ##
5244
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
424 ## @item redcosts
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
425 ## Reduced Costs.
10821
693e22af08ae Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents: 10793
diff changeset
426 ##
5244
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
427 ## @item time
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
428 ## Time (in seconds) used for solving LP/MIP problem.
10821
693e22af08ae Grammarcheck documentation of m-files
Rik <octave@nomad.inbox5.com>
parents: 10793
diff changeset
429 ##
17180
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
430 ## @item status
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
431 ## Status of the optimization.
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
432 ##
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
433 ## @table @asis
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
434 ## @item 1 (@w{@code{GLP_UNDEF}})
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
435 ## Solution status is undefined.
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
436 ##
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
437 ## @item 2 (@w{@code{GLP_FEAS}})
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
438 ## Solution is feasible.
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
439 ##
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
440 ## @item 3 (@w{@code{GLP_INFEAS}})
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
441 ## Solution is infeasible.
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
442 ##
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
443 ## @item 4 (@w{@code{GLP_NOFEAS}})
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
444 ## Problem has no feasible solution.
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
445 ##
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
446 ## @item 5 (@w{@code{GLP_OPT}})
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
447 ## Solution is optimal.
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
448 ##
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
449 ## @item 6 (@w{@code{GLP_UNBND}})
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
450 ## Problem has no unbounded solution.
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
451 ## @end table
5244
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
452 ## @end table
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
453 ## @end table
11587
c792872f8942 all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
454 ##
5244
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
455 ## Example:
11587
c792872f8942 all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
456 ##
5244
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
457 ## @example
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
458 ## @group
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
459 ## c = [10, 6, 4]';
11471
994e2a93a8e2 Use uppercase 'A' to refer to matrix inputs in m-files.
Rik <octave@nomad.inbox5.com>
parents: 10821
diff changeset
460 ## A = [ 1, 1, 1;
5244
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
461 ## 10, 4, 5;
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
462 ## 2, 2, 6];
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
463 ## b = [100, 600, 300]';
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
464 ## lb = [0, 0, 0]';
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
465 ## ub = [];
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
466 ## ctype = "UUU";
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
467 ## vartype = "CCC";
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
468 ## s = -1;
11587
c792872f8942 all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
469 ##
5244
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
470 ## param.msglev = 1;
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
471 ## param.itlim = 100;
11587
c792872f8942 all script files: untabify and strip trailing whitespace
John W. Eaton <jwe@octave.org>
parents: 11523
diff changeset
472 ##
9758
09da0bd91412 Periodic grammar check of Octave documentation files to ensure common format
Rik <rdrider0-list@yahoo.com>
parents: 9245
diff changeset
473 ## [xmin, fmin, status, extra] = ...
11471
994e2a93a8e2 Use uppercase 'A' to refer to matrix inputs in m-files.
Rik <octave@nomad.inbox5.com>
parents: 10821
diff changeset
474 ## glpk (c, A, b, lb, ub, ctype, vartype, s, param);
5244
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
475 ## @end group
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
476 ## @end example
a34c3c5c37cf [project @ 2005-03-25 03:29:52 by jwe]
jwe
parents: 5237
diff changeset
477 ## @end deftypefn
5232
9b776f5a33eb [project @ 2005-03-22 16:16:30 by jwe]
jwe
parents:
diff changeset
478
5233
bdf892d3b024 [project @ 2005-03-22 17:44:31 by jwe]
jwe
parents: 5232
diff changeset
479 ## Author: Nicolo' Giorgetti <giorgetti@dii.unisi.it>
bdf892d3b024 [project @ 2005-03-22 17:44:31 by jwe]
jwe
parents: 5232
diff changeset
480 ## Adapted-by: jwe
5232
9b776f5a33eb [project @ 2005-03-22 16:16:30 by jwe]
jwe
parents:
diff changeset
481
17180
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
482 function [xopt, fmin, errnum, extra] = glpk (c, A, b, lb, ub, ctype, vartype, sense, param)
5232
9b776f5a33eb [project @ 2005-03-22 16:16:30 by jwe]
jwe
parents:
diff changeset
483
5233
bdf892d3b024 [project @ 2005-03-22 17:44:31 by jwe]
jwe
parents: 5232
diff changeset
484 ## If there is no input output the version and syntax
5237
652e8aa49fa7 [project @ 2005-03-23 21:28:45 by jwe]
jwe
parents: 5233
diff changeset
485 if (nargin < 3 || nargin > 9)
6046
34f96dd5441b [project @ 2006-10-10 16:10:25 by jwe]
jwe
parents: 5307
diff changeset
486 print_usage ();
5233
bdf892d3b024 [project @ 2005-03-22 17:44:31 by jwe]
jwe
parents: 5232
diff changeset
487 endif
5232
9b776f5a33eb [project @ 2005-03-22 16:16:30 by jwe]
jwe
parents:
diff changeset
488
5233
bdf892d3b024 [project @ 2005-03-22 17:44:31 by jwe]
jwe
parents: 5232
diff changeset
489 if (all (size (c) > 1) || iscomplex (c) || ischar (c))
21030
e204d44f5069 glpk.m: Remove useless return statements after error and print_usage. Merged
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents: 20852
diff changeset
490 error ("glpk: C must be a real vector");
5233
bdf892d3b024 [project @ 2005-03-22 17:44:31 by jwe]
jwe
parents: 5232
diff changeset
491 endif
bdf892d3b024 [project @ 2005-03-22 17:44:31 by jwe]
jwe
parents: 5232
diff changeset
492 nx = length (c);
bdf892d3b024 [project @ 2005-03-22 17:44:31 by jwe]
jwe
parents: 5232
diff changeset
493 ## Force column vector.
bdf892d3b024 [project @ 2005-03-22 17:44:31 by jwe]
jwe
parents: 5232
diff changeset
494 c = c(:);
5232
9b776f5a33eb [project @ 2005-03-22 16:16:30 by jwe]
jwe
parents:
diff changeset
495
5237
652e8aa49fa7 [project @ 2005-03-23 21:28:45 by jwe]
jwe
parents: 5233
diff changeset
496 ## 2) Matrix constraint
5232
9b776f5a33eb [project @ 2005-03-22 16:16:30 by jwe]
jwe
parents:
diff changeset
497
11471
994e2a93a8e2 Use uppercase 'A' to refer to matrix inputs in m-files.
Rik <octave@nomad.inbox5.com>
parents: 10821
diff changeset
498 if (isempty (A))
10635
d1978e7364ad Print name of function in error() string messages.
Rik <octave@nomad.inbox5.com>
parents: 10549
diff changeset
499 error ("glpk: A cannot be an empty matrix");
5233
bdf892d3b024 [project @ 2005-03-22 17:44:31 by jwe]
jwe
parents: 5232
diff changeset
500 endif
22224
20e0c0b8820c Allow sequential quadratic programs with infeasible QPs (bug #36015).
Lachlan Andrew <lachlanbis@gmail.com>
parents: 21580
diff changeset
501 if (! isreal (A))
20e0c0b8820c Allow sequential quadratic programs with infeasible QPs (bug #36015).
Lachlan Andrew <lachlanbis@gmail.com>
parents: 21580
diff changeset
502 error ("glpk: A must be real valued, not %s", typeinfo (A));
20e0c0b8820c Allow sequential quadratic programs with infeasible QPs (bug #36015).
Lachlan Andrew <lachlanbis@gmail.com>
parents: 21580
diff changeset
503 endif
14868
5d3a684236b0 maint: Use Octave coding conventions for cuddling parentheses in scripts directory
Rik <octave@nomad.inbox5.com>
parents: 14366
diff changeset
504 [nc, nxa] = size (A);
22224
20e0c0b8820c Allow sequential quadratic programs with infeasible QPs (bug #36015).
Lachlan Andrew <lachlanbis@gmail.com>
parents: 21580
diff changeset
505 if (nxa != nx)
20e0c0b8820c Allow sequential quadratic programs with infeasible QPs (bug #36015).
Lachlan Andrew <lachlanbis@gmail.com>
parents: 21580
diff changeset
506 error ("glpk: A must be %d by %d, not %d by %d",
22225
42456fc9bf6c glpk.m: Style fixes for cset 20e0c0b8820c.
Rik <rik@octave.org>
parents: 22224
diff changeset
507 nc, nx, rows (A), columns (A));
5233
bdf892d3b024 [project @ 2005-03-22 17:44:31 by jwe]
jwe
parents: 5232
diff changeset
508 endif
bdf892d3b024 [project @ 2005-03-22 17:44:31 by jwe]
jwe
parents: 5232
diff changeset
509
5237
652e8aa49fa7 [project @ 2005-03-23 21:28:45 by jwe]
jwe
parents: 5233
diff changeset
510 ## 3) RHS
5232
9b776f5a33eb [project @ 2005-03-22 16:16:30 by jwe]
jwe
parents:
diff changeset
511
5233
bdf892d3b024 [project @ 2005-03-22 17:44:31 by jwe]
jwe
parents: 5232
diff changeset
512 if (isempty (b))
10635
d1978e7364ad Print name of function in error() string messages.
Rik <octave@nomad.inbox5.com>
parents: 10549
diff changeset
513 error ("glpk: B cannot be an empty vector");
5233
bdf892d3b024 [project @ 2005-03-22 17:44:31 by jwe]
jwe
parents: 5232
diff changeset
514 endif
bdf892d3b024 [project @ 2005-03-22 17:44:31 by jwe]
jwe
parents: 5232
diff changeset
515 if (! isreal (b) || length (b) != nc)
10635
d1978e7364ad Print name of function in error() string messages.
Rik <octave@nomad.inbox5.com>
parents: 10549
diff changeset
516 error ("glpk: B must be a real valued %d by 1 vector", nc);
5233
bdf892d3b024 [project @ 2005-03-22 17:44:31 by jwe]
jwe
parents: 5232
diff changeset
517 endif
bdf892d3b024 [project @ 2005-03-22 17:44:31 by jwe]
jwe
parents: 5232
diff changeset
518
5237
652e8aa49fa7 [project @ 2005-03-23 21:28:45 by jwe]
jwe
parents: 5233
diff changeset
519 ## 4) Vector with the lower bound of each variable
5232
9b776f5a33eb [project @ 2005-03-22 16:16:30 by jwe]
jwe
parents:
diff changeset
520
5237
652e8aa49fa7 [project @ 2005-03-23 21:28:45 by jwe]
jwe
parents: 5233
diff changeset
521 if (nargin > 3)
5233
bdf892d3b024 [project @ 2005-03-22 17:44:31 by jwe]
jwe
parents: 5232
diff changeset
522 if (isempty (lb))
8036
854683691d7a fix invalid memory read in glpk
Jaroslav Hajek <highegg@gmail.com>
parents: 7151
diff changeset
523 lb = zeros (nx, 1);
5233
bdf892d3b024 [project @ 2005-03-22 17:44:31 by jwe]
jwe
parents: 5232
diff changeset
524 elseif (! isreal (lb) || all (size (lb) > 1) || length (lb) != nx)
10635
d1978e7364ad Print name of function in error() string messages.
Rik <octave@nomad.inbox5.com>
parents: 10549
diff changeset
525 error ("glpk: LB must be a real valued %d by 1 column vector", nx);
5233
bdf892d3b024 [project @ 2005-03-22 17:44:31 by jwe]
jwe
parents: 5232
diff changeset
526 endif
bdf892d3b024 [project @ 2005-03-22 17:44:31 by jwe]
jwe
parents: 5232
diff changeset
527 else
5237
652e8aa49fa7 [project @ 2005-03-23 21:28:45 by jwe]
jwe
parents: 5233
diff changeset
528 lb = zeros (nx, 1);
7151
aeeb646f6538 [project @ 2007-11-09 19:34:17 by jwe]
jwe
parents: 7096
diff changeset
529 endif
5233
bdf892d3b024 [project @ 2005-03-22 17:44:31 by jwe]
jwe
parents: 5232
diff changeset
530
5237
652e8aa49fa7 [project @ 2005-03-23 21:28:45 by jwe]
jwe
parents: 5233
diff changeset
531 ## 5) Vector with the upper bound of each variable
5232
9b776f5a33eb [project @ 2005-03-22 16:16:30 by jwe]
jwe
parents:
diff changeset
532
5237
652e8aa49fa7 [project @ 2005-03-23 21:28:45 by jwe]
jwe
parents: 5233
diff changeset
533 if (nargin > 4)
5233
bdf892d3b024 [project @ 2005-03-22 17:44:31 by jwe]
jwe
parents: 5232
diff changeset
534 if (isempty (ub))
10541
e9d1a974a517 Eliminate repmat (Inf, x , y) and simply use Inf (x,y)
Rik <code@nomad.inbox5.com>
parents: 9758
diff changeset
535 ub = Inf (nx, 1);
5233
bdf892d3b024 [project @ 2005-03-22 17:44:31 by jwe]
jwe
parents: 5232
diff changeset
536 elseif (! isreal (ub) || all (size (ub) > 1) || length (ub) != nx)
10635
d1978e7364ad Print name of function in error() string messages.
Rik <octave@nomad.inbox5.com>
parents: 10549
diff changeset
537 error ("glpk: UB must be a real valued %d by 1 column vector", nx);
5233
bdf892d3b024 [project @ 2005-03-22 17:44:31 by jwe]
jwe
parents: 5232
diff changeset
538 endif
bdf892d3b024 [project @ 2005-03-22 17:44:31 by jwe]
jwe
parents: 5232
diff changeset
539 else
10541
e9d1a974a517 Eliminate repmat (Inf, x , y) and simply use Inf (x,y)
Rik <code@nomad.inbox5.com>
parents: 9758
diff changeset
540 ub = Inf (nx, 1);
7151
aeeb646f6538 [project @ 2007-11-09 19:34:17 by jwe]
jwe
parents: 7096
diff changeset
541 endif
5232
9b776f5a33eb [project @ 2005-03-22 16:16:30 by jwe]
jwe
parents:
diff changeset
542
5237
652e8aa49fa7 [project @ 2005-03-23 21:28:45 by jwe]
jwe
parents: 5233
diff changeset
543 ## 6) Sense of each constraint
5232
9b776f5a33eb [project @ 2005-03-22 16:16:30 by jwe]
jwe
parents:
diff changeset
544
5237
652e8aa49fa7 [project @ 2005-03-23 21:28:45 by jwe]
jwe
parents: 5233
diff changeset
545 if (nargin > 5)
652e8aa49fa7 [project @ 2005-03-23 21:28:45 by jwe]
jwe
parents: 5233
diff changeset
546 if (isempty (ctype))
652e8aa49fa7 [project @ 2005-03-23 21:28:45 by jwe]
jwe
parents: 5233
diff changeset
547 ctype = repmat ("S", nc, 1);
652e8aa49fa7 [project @ 2005-03-23 21:28:45 by jwe]
jwe
parents: 5233
diff changeset
548 elseif (! ischar (ctype) || all (size (ctype) > 1) || length (ctype) != nc)
10635
d1978e7364ad Print name of function in error() string messages.
Rik <octave@nomad.inbox5.com>
parents: 10549
diff changeset
549 error ("glpk: CTYPE must be a char valued vector of length %d", nc);
5237
652e8aa49fa7 [project @ 2005-03-23 21:28:45 by jwe]
jwe
parents: 5233
diff changeset
550 elseif (! all (ctype == "F" | ctype == "U" | ctype == "S"
10549
95c3e38098bf Untabify .m scripts
Rik <code@nomad.inbox5.com>
parents: 10541
diff changeset
551 | ctype == "L" | ctype == "D"))
10635
d1978e7364ad Print name of function in error() string messages.
Rik <octave@nomad.inbox5.com>
parents: 10549
diff changeset
552 error ("glpk: CTYPE must contain only F, U, S, L, or D");
5237
652e8aa49fa7 [project @ 2005-03-23 21:28:45 by jwe]
jwe
parents: 5233
diff changeset
553 endif
652e8aa49fa7 [project @ 2005-03-23 21:28:45 by jwe]
jwe
parents: 5233
diff changeset
554 else
652e8aa49fa7 [project @ 2005-03-23 21:28:45 by jwe]
jwe
parents: 5233
diff changeset
555 ctype = repmat ("S", nc, 1);
7151
aeeb646f6538 [project @ 2007-11-09 19:34:17 by jwe]
jwe
parents: 7096
diff changeset
556 endif
5237
652e8aa49fa7 [project @ 2005-03-23 21:28:45 by jwe]
jwe
parents: 5233
diff changeset
557
652e8aa49fa7 [project @ 2005-03-23 21:28:45 by jwe]
jwe
parents: 5233
diff changeset
558 ## 7) Vector with the type of variables
652e8aa49fa7 [project @ 2005-03-23 21:28:45 by jwe]
jwe
parents: 5233
diff changeset
559
652e8aa49fa7 [project @ 2005-03-23 21:28:45 by jwe]
jwe
parents: 5233
diff changeset
560 if (nargin > 6)
5289
b98bf1d70a0a [project @ 2005-04-21 14:43:14 by jwe]
jwe
parents: 5244
diff changeset
561 if (isempty (vartype))
5233
bdf892d3b024 [project @ 2005-03-22 17:44:31 by jwe]
jwe
parents: 5232
diff changeset
562 vartype = repmat ("C", nx, 1);
bdf892d3b024 [project @ 2005-03-22 17:44:31 by jwe]
jwe
parents: 5232
diff changeset
563 elseif (! ischar (vartype) || all (size (vartype) > 1)
10549
95c3e38098bf Untabify .m scripts
Rik <code@nomad.inbox5.com>
parents: 10541
diff changeset
564 || length (vartype) != nx)
10635
d1978e7364ad Print name of function in error() string messages.
Rik <octave@nomad.inbox5.com>
parents: 10549
diff changeset
565 error ("glpk: VARTYPE must be a char valued vector of length %d", nx);
5233
bdf892d3b024 [project @ 2005-03-22 17:44:31 by jwe]
jwe
parents: 5232
diff changeset
566 elseif (! all (vartype == "C" | vartype == "I"))
10635
d1978e7364ad Print name of function in error() string messages.
Rik <octave@nomad.inbox5.com>
parents: 10549
diff changeset
567 error ("glpk: VARTYPE must contain only C or I");
5233
bdf892d3b024 [project @ 2005-03-22 17:44:31 by jwe]
jwe
parents: 5232
diff changeset
568 endif
bdf892d3b024 [project @ 2005-03-22 17:44:31 by jwe]
jwe
parents: 5232
diff changeset
569 else
bdf892d3b024 [project @ 2005-03-22 17:44:31 by jwe]
jwe
parents: 5232
diff changeset
570 ## As default we consider continuous vars
bdf892d3b024 [project @ 2005-03-22 17:44:31 by jwe]
jwe
parents: 5232
diff changeset
571 vartype = repmat ("C", nx, 1);
bdf892d3b024 [project @ 2005-03-22 17:44:31 by jwe]
jwe
parents: 5232
diff changeset
572 endif
5232
9b776f5a33eb [project @ 2005-03-22 16:16:30 by jwe]
jwe
parents:
diff changeset
573
5289
b98bf1d70a0a [project @ 2005-04-21 14:43:14 by jwe]
jwe
parents: 5244
diff changeset
574 ## 8) Sense of optimization
b98bf1d70a0a [project @ 2005-04-21 14:43:14 by jwe]
jwe
parents: 5244
diff changeset
575
b98bf1d70a0a [project @ 2005-04-21 14:43:14 by jwe]
jwe
parents: 5244
diff changeset
576 if (nargin > 7)
b98bf1d70a0a [project @ 2005-04-21 14:43:14 by jwe]
jwe
parents: 5244
diff changeset
577 if (isempty (sense))
b98bf1d70a0a [project @ 2005-04-21 14:43:14 by jwe]
jwe
parents: 5244
diff changeset
578 sense = 1;
b98bf1d70a0a [project @ 2005-04-21 14:43:14 by jwe]
jwe
parents: 5244
diff changeset
579 elseif (ischar (sense) || all (size (sense) > 1) || ! isreal (sense))
10635
d1978e7364ad Print name of function in error() string messages.
Rik <octave@nomad.inbox5.com>
parents: 10549
diff changeset
580 error ("glpk: SENSE must be an integer value");
5289
b98bf1d70a0a [project @ 2005-04-21 14:43:14 by jwe]
jwe
parents: 5244
diff changeset
581 elseif (sense >= 0)
b98bf1d70a0a [project @ 2005-04-21 14:43:14 by jwe]
jwe
parents: 5244
diff changeset
582 sense = 1;
b98bf1d70a0a [project @ 2005-04-21 14:43:14 by jwe]
jwe
parents: 5244
diff changeset
583 else
b98bf1d70a0a [project @ 2005-04-21 14:43:14 by jwe]
jwe
parents: 5244
diff changeset
584 sense = -1;
b98bf1d70a0a [project @ 2005-04-21 14:43:14 by jwe]
jwe
parents: 5244
diff changeset
585 endif
b98bf1d70a0a [project @ 2005-04-21 14:43:14 by jwe]
jwe
parents: 5244
diff changeset
586 else
b98bf1d70a0a [project @ 2005-04-21 14:43:14 by jwe]
jwe
parents: 5244
diff changeset
587 sense = 1;
b98bf1d70a0a [project @ 2005-04-21 14:43:14 by jwe]
jwe
parents: 5244
diff changeset
588 endif
b98bf1d70a0a [project @ 2005-04-21 14:43:14 by jwe]
jwe
parents: 5244
diff changeset
589
b98bf1d70a0a [project @ 2005-04-21 14:43:14 by jwe]
jwe
parents: 5244
diff changeset
590 ## 9) Parameters vector
5233
bdf892d3b024 [project @ 2005-03-22 17:44:31 by jwe]
jwe
parents: 5232
diff changeset
591
bdf892d3b024 [project @ 2005-03-22 17:44:31 by jwe]
jwe
parents: 5232
diff changeset
592 if (nargin > 8)
bdf892d3b024 [project @ 2005-03-22 17:44:31 by jwe]
jwe
parents: 5232
diff changeset
593 if (! isstruct (param))
10635
d1978e7364ad Print name of function in error() string messages.
Rik <octave@nomad.inbox5.com>
parents: 10549
diff changeset
594 error ("glpk: PARAM must be a structure");
5233
bdf892d3b024 [project @ 2005-03-22 17:44:31 by jwe]
jwe
parents: 5232
diff changeset
595 endif
bdf892d3b024 [project @ 2005-03-22 17:44:31 by jwe]
jwe
parents: 5232
diff changeset
596 else
bdf892d3b024 [project @ 2005-03-22 17:44:31 by jwe]
jwe
parents: 5232
diff changeset
597 param = struct ();
bdf892d3b024 [project @ 2005-03-22 17:44:31 by jwe]
jwe
parents: 5232
diff changeset
598 endif
5232
9b776f5a33eb [project @ 2005-03-22 16:16:30 by jwe]
jwe
parents:
diff changeset
599
17180
54e251e699bb Use the new GLPK API (bug #39038).
Sébastien Villemot <sebastien@debian.org>
parents: 15007
diff changeset
600 [xopt, fmin, errnum, extra] = ...
11471
994e2a93a8e2 Use uppercase 'A' to refer to matrix inputs in m-files.
Rik <octave@nomad.inbox5.com>
parents: 10821
diff changeset
601 __glpk__ (c, A, b, lb, ub, ctype, vartype, sense, param);
5232
9b776f5a33eb [project @ 2005-03-22 16:16:30 by jwe]
jwe
parents:
diff changeset
602
9b776f5a33eb [project @ 2005-03-22 16:16:30 by jwe]
jwe
parents:
diff changeset
603 endfunction
17338
1c89599167a6 maint: End m-files with 1 blank line.
Rik <rik@octave.org>
parents: 17290
diff changeset
604
21030
e204d44f5069 glpk.m: Remove useless return statements after error and print_usage. Merged
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents: 20852
diff changeset
605
21130
9d7619605e5e * glpk.m: Make tests conditional on HAVE_GLPK.
John W. Eaton <jwe@octave.org>
parents: 21030
diff changeset
606 %!testif HAVE_GLPK
21030
e204d44f5069 glpk.m: Remove useless return statements after error and print_usage. Merged
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents: 20852
diff changeset
607 %! sense = -1;
e204d44f5069 glpk.m: Remove useless return statements after error and print_usage. Merged
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents: 20852
diff changeset
608 %! c = [10, 6, 4]';
e204d44f5069 glpk.m: Remove useless return statements after error and print_usage. Merged
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents: 20852
diff changeset
609 %! A = [1, 1, 1; 10, 4, 5; 2, 2, 6];
e204d44f5069 glpk.m: Remove useless return statements after error and print_usage. Merged
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents: 20852
diff changeset
610 %! b = [100, 600, 300]';
e204d44f5069 glpk.m: Remove useless return statements after error and print_usage. Merged
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents: 20852
diff changeset
611 %! ctype = ['U', 'U', 'U']';
e204d44f5069 glpk.m: Remove useless return statements after error and print_usage. Merged
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents: 20852
diff changeset
612 %! lb = [0, 0, 0]';
e204d44f5069 glpk.m: Remove useless return statements after error and print_usage. Merged
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents: 20852
diff changeset
613 %! ub = [];
e204d44f5069 glpk.m: Remove useless return statements after error and print_usage. Merged
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents: 20852
diff changeset
614 %! vartype = ['C', 'C', 'C']';
e204d44f5069 glpk.m: Remove useless return statements after error and print_usage. Merged
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents: 20852
diff changeset
615 %! param.msglev = 0;
e204d44f5069 glpk.m: Remove useless return statements after error and print_usage. Merged
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents: 20852
diff changeset
616 %! param.lpsolver = 1;
e204d44f5069 glpk.m: Remove useless return statements after error and print_usage. Merged
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents: 20852
diff changeset
617 %! [xmin, fmin, errnum, extra] = glpk (c, A, b, lb, ub, ctype, vartype, ...
e204d44f5069 glpk.m: Remove useless return statements after error and print_usage. Merged
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents: 20852
diff changeset
618 %! sense, param);
21580
ecce63c99c3f maint: Add semicolons to terminate code in %! blocks.
Rik <rik@octave.org>
parents: 21130
diff changeset
619 %! assert (fmin, c' * xmin);
21030
e204d44f5069 glpk.m: Remove useless return statements after error and print_usage. Merged
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents: 20852
diff changeset
620 %! for i = 1:3
21580
ecce63c99c3f maint: Add semicolons to terminate code in %! blocks.
Rik <rik@octave.org>
parents: 21130
diff changeset
621 %! assert (A(i,:) * xmin <= b(i));
21030
e204d44f5069 glpk.m: Remove useless return statements after error and print_usage. Merged
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents: 20852
diff changeset
622 %! endfor
e204d44f5069 glpk.m: Remove useless return statements after error and print_usage. Merged
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents: 20852
diff changeset
623
21130
9d7619605e5e * glpk.m: Make tests conditional on HAVE_GLPK.
John W. Eaton <jwe@octave.org>
parents: 21030
diff changeset
624 %!testif HAVE_GLPK
21030
e204d44f5069 glpk.m: Remove useless return statements after error and print_usage. Merged
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents: 20852
diff changeset
625 %! sense = 1;
e204d44f5069 glpk.m: Remove useless return statements after error and print_usage. Merged
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents: 20852
diff changeset
626 %! c = [-1, -1]';
e204d44f5069 glpk.m: Remove useless return statements after error and print_usage. Merged
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents: 20852
diff changeset
627 %! A = [-2, 5; 2, -2];
e204d44f5069 glpk.m: Remove useless return statements after error and print_usage. Merged
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents: 20852
diff changeset
628 %! b = [5, 1]';
e204d44f5069 glpk.m: Remove useless return statements after error and print_usage. Merged
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents: 20852
diff changeset
629 %! ctype = ['U', 'U']';
e204d44f5069 glpk.m: Remove useless return statements after error and print_usage. Merged
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents: 20852
diff changeset
630 %! lb = [0, 0]';
e204d44f5069 glpk.m: Remove useless return statements after error and print_usage. Merged
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents: 20852
diff changeset
631 %! ub = [];
e204d44f5069 glpk.m: Remove useless return statements after error and print_usage. Merged
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents: 20852
diff changeset
632 %! vartype = ['I', 'I']';
e204d44f5069 glpk.m: Remove useless return statements after error and print_usage. Merged
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents: 20852
diff changeset
633 %! param.msglev = 0;
e204d44f5069 glpk.m: Remove useless return statements after error and print_usage. Merged
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents: 20852
diff changeset
634 %! [xmin, fmin, errnum, extra] = glpk (c, A, b, lb, ub, ctype, vartype, ...
e204d44f5069 glpk.m: Remove useless return statements after error and print_usage. Merged
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents: 20852
diff changeset
635 %! sense, param);
21580
ecce63c99c3f maint: Add semicolons to terminate code in %! blocks.
Rik <rik@octave.org>
parents: 21130
diff changeset
636 %! assert (fmin, c' * xmin);
21030
e204d44f5069 glpk.m: Remove useless return statements after error and print_usage. Merged
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents: 20852
diff changeset
637 %! for i = 1:2
21580
ecce63c99c3f maint: Add semicolons to terminate code in %! blocks.
Rik <rik@octave.org>
parents: 21130
diff changeset
638 %! assert (A(i,:) * xmin <= b(i));
21030
e204d44f5069 glpk.m: Remove useless return statements after error and print_usage. Merged
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents: 20852
diff changeset
639 %! endfor
e204d44f5069 glpk.m: Remove useless return statements after error and print_usage. Merged
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents: 20852
diff changeset
640
e204d44f5069 glpk.m: Remove useless return statements after error and print_usage. Merged
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents: 20852
diff changeset
641
21130
9d7619605e5e * glpk.m: Make tests conditional on HAVE_GLPK.
John W. Eaton <jwe@octave.org>
parents: 21030
diff changeset
642 %!testif HAVE_GLPK
21030
e204d44f5069 glpk.m: Remove useless return statements after error and print_usage. Merged
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents: 20852
diff changeset
643 %! sense = 1;
e204d44f5069 glpk.m: Remove useless return statements after error and print_usage. Merged
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents: 20852
diff changeset
644 %! c = [0, 0, 0, -1, -1]';
e204d44f5069 glpk.m: Remove useless return statements after error and print_usage. Merged
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents: 20852
diff changeset
645 %! A = [-2, 0, 0, 1, 0; 0, 1, 0, 0, 2; 0, 0, 1, 3, 2];
e204d44f5069 glpk.m: Remove useless return statements after error and print_usage. Merged
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents: 20852
diff changeset
646 %! b = [4, 12, 18]';
e204d44f5069 glpk.m: Remove useless return statements after error and print_usage. Merged
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents: 20852
diff changeset
647 %! ctype = ['S', 'S', 'S']';
e204d44f5069 glpk.m: Remove useless return statements after error and print_usage. Merged
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents: 20852
diff changeset
648 %! lb = [0, 0, 0, 0, 0]';
e204d44f5069 glpk.m: Remove useless return statements after error and print_usage. Merged
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents: 20852
diff changeset
649 %! ub = [];
e204d44f5069 glpk.m: Remove useless return statements after error and print_usage. Merged
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents: 20852
diff changeset
650 %! vartype = ['C', 'C', 'C', 'C', 'C']';
e204d44f5069 glpk.m: Remove useless return statements after error and print_usage. Merged
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents: 20852
diff changeset
651 %! param.msglev = 0;
e204d44f5069 glpk.m: Remove useless return statements after error and print_usage. Merged
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents: 20852
diff changeset
652 %! [xmin, fmin, errnum, extra] = glpk (c, A, b, lb, ub, ctype, vartype, ...
e204d44f5069 glpk.m: Remove useless return statements after error and print_usage. Merged
Kai T. Ohlhus <k.ohlhus@gmail.com>
parents: 20852
diff changeset
653 %! sense, param);
21580
ecce63c99c3f maint: Add semicolons to terminate code in %! blocks.
Rik <rik@octave.org>
parents: 21130
diff changeset
654 %! assert (fmin, c' * xmin);
ecce63c99c3f maint: Add semicolons to terminate code in %! blocks.
Rik <rik@octave.org>
parents: 21130
diff changeset
655 %! assert (A * xmin, b);