comparison scripts/optimization/sqp.m @ 10821:693e22af08ae

Grammarcheck documentation of m-files Add newlines between @item fields for readability.
author Rik <octave@nomad.inbox5.com>
date Mon, 26 Jul 2010 21:25:36 -0700
parents 35338deff753
children a44f979a35ce
comparison
equal deleted inserted replaced
10820:c44c786f87ba 10821:693e22af08ae
52 ## g(x) = 0 52 ## g(x) = 0
53 ## h(x) >= 0 53 ## h(x) >= 0
54 ## lb <= x <= ub 54 ## lb <= x <= ub
55 ## @end group 55 ## @end group
56 ## @end example 56 ## @end example
57 ##
57 ## @end ifnottex 58 ## @end ifnottex
58 ##
59 ## @noindent 59 ## @noindent
60 ## using a successive quadratic programming method. 60 ## using a successive quadratic programming method.
61 ## 61 ##
62 ## The first argument is the initial guess for the vector @var{x}. 62 ## The first argument is the initial guess for the vector @var{x}.
63 ## 63 ##
117 ## 117 ##
118 ## The third and fourth arguments may also be 2-element cell arrays of 118 ## The third and fourth arguments may also be 2-element cell arrays of
119 ## function handles. The first element should point to the constraint 119 ## function handles. The first element should point to the constraint
120 ## function and the second should point to a function that computes the 120 ## function and the second should point to a function that computes the
121 ## gradient of the constraint function: 121 ## gradient of the constraint function:
122 ##
123 ## @tex 122 ## @tex
124 ## $$ 123 ## $$
125 ## \Bigg( {\partial f(x) \over \partial x_1}, 124 ## \Bigg( {\partial f(x) \over \partial x_1},
126 ## {\partial f(x) \over \partial x_2}, \ldots, 125 ## {\partial f(x) \over \partial x_2}, \ldots,
127 ## {\partial f(x) \over \partial x_N} \Bigg)^T 126 ## {\partial f(x) \over \partial x_N} \Bigg)^T
128 ## $$ 127 ## $$
129 ## @end tex 128 ## @end tex
130 ## @ifnottex 129 ## @ifnottex
130 ##
131 ## @example 131 ## @example
132 ## @group 132 ## @group
133 ## [ d f(x) d f(x) d f(x) ] 133 ## [ d f(x) d f(x) d f(x) ]
134 ## transpose ( [ ------ ----- ... ------ ] ) 134 ## transpose ( [ ------ ----- ... ------ ] )
135 ## [ dx_1 dx_2 dx_N ] 135 ## [ dx_1 dx_2 dx_N ]
136 ## @end group 136 ## @end group
137 ## @end example 137 ## @end example
138 ##
138 ## @end ifnottex 139 ## @end ifnottex
139 ##
140 ## The fifth and sixth arguments contain lower and upper bounds 140 ## The fifth and sixth arguments contain lower and upper bounds
141 ## on @var{x}. These must be consistent with the equality and inequality 141 ## on @var{x}. These must be consistent with the equality and inequality
142 ## constraints @var{g} and @var{h}. If the arguments are vectors then 142 ## constraints @var{g} and @var{h}. If the arguments are vectors then
143 ## @var{x}(i) is bound by @var{lb}(i) and @var{ub}(i). A bound can also 143 ## @var{x}(i) is bound by @var{lb}(i) and @var{ub}(i). A bound can also
144 ## be a scalar in which case all elements of @var{x} will share the same 144 ## be a scalar in which case all elements of @var{x} will share the same
150 ## 150 ##
151 ## The eighth argument specifies the tolerance for the stopping criteria. 151 ## The eighth argument specifies the tolerance for the stopping criteria.
152 ## The default value is @code{eps}. 152 ## The default value is @code{eps}.
153 ## 153 ##
154 ## The value returned in @var{info} may be one of the following: 154 ## The value returned in @var{info} may be one of the following:
155 ##
155 ## @table @asis 156 ## @table @asis
156 ## @item 101 157 ## @item 101
157 ## The algorithm terminated normally. 158 ## The algorithm terminated normally.
158 ## Either all constraints meet the requested tolerance, or the stepsize, 159 ## Either all constraints meet the requested tolerance, or the stepsize,
159 ## @tex 160 ## @tex
161 ## @end tex 162 ## @end tex
162 ## @ifnottex 163 ## @ifnottex
163 ## delta @var{x}, 164 ## delta @var{x},
164 ## @end ifnottex 165 ## @end ifnottex
165 ## is less than @code{tol * norm (x)}. 166 ## is less than @code{tol * norm (x)}.
167 ##
166 ## @item 102 168 ## @item 102
167 ## The BFGS update failed. 169 ## The BFGS update failed.
170 ##
168 ## @item 103 171 ## @item 103
169 ## The maximum number of iterations was reached. 172 ## The maximum number of iterations was reached.
170 ## @end table 173 ## @end table
171 ## 174 ##
172 ## An example of calling @code{sqp}: 175 ## An example of calling @code{sqp}: