2 * Functions and Variables for augmented_lagrangian::
5 @node Functions and Variables for augmented_lagrangian, , Package augmented_lagrangian, Package augmented_lagrangian
6 @section Functions and Variables for augmented_lagrangian
8 @anchor{augmented_lagrangian_method}
9 @deffn {Function} augmented_lagrangian_method @
10 @fname{augmented_lagrangian_method} (@var{FOM}, @var{xx}, @var{C}, @var{yy}) @
11 @fname{augmented_lagrangian_method} (@var{FOM}, @var{xx}, @var{C}, @var{yy}, optional_args) @
12 @fname{augmented_lagrangian_method} ([@var{FOM}, @var{grad}], @var{xx}, @var{C}, @var{yy}) @
13 @fname{augmented_lagrangian_method} ([@var{FOM}, @var{grad}], @var{xx}, @var{C}, @var{yy}, optional_args)
15 Returns an approximate minimum of the expression @var{FOM}
16 with respect to the variables @var{xx},
17 holding the constraints @var{C} equal to zero.
18 @var{yy} is a list of initial guesses for @var{xx}.
19 The method employed is the augmented Lagrangian method (see Refs [1] and [2]).
21 @var{grad}, if present, is the gradient of @var{FOM} with respect to @var{xx},
22 represented as a list of expressions,
23 one for each variable in @var{xx}.
24 If not present, the gradient is constructed automatically.
26 @var{FOM} and each element of @var{grad}, if present,
27 must be ordinary expressions, not names of functions or lambda expressions.
29 @code{optional_args} represents additional arguments,
30 specified as @code{@var{symbol} = @var{value}}.
31 The optional arguments recognized are:
35 Number of iterations of the augmented Lagrangian algorithm
37 Tolerance supplied to LBFGS
39 IPRINT parameter (a list of two integers which controls verbosity) supplied to LBFGS
41 Initial value of @code{%lambda} to be used for calculating the augmented Lagrangian
44 This implementation minimizes the augmented Lagrangian by
45 applying the limited-memory BFGS (LBFGS) algorithm,
46 which is a quasi-Newton algorithm.
48 @code{load("augmented_lagrangian")} loads this function.
50 See also @ref{Package lbfgs}
54 @c Both links seem invalid now (one redirects somewhere, one is access forbidden). Remove them?
55 [1] @url{http://www-fp.mcs.anl.gov/otc/Guide/OptWeb/continuous/constrained/nonlinearcon/auglag.html}
57 [2] @url{http://www.cs.ubc.ca/spider/ascher/542/chap10.pdf}
63 @c load ("augmented_lagrangian");
68 @c augmented_lagrangian_method(FOM, xx, C, yy, iprint=[-1,0]);
73 (%o1) /home/gunter/src/maxima-code/share/lbfgs/lbfgs.mac
76 (%i2) load ("augmented_lagrangian");
77 (%o2) /home/gunter/src/maxima-code/share/contrib/augmented_lagra\
81 (%i3) FOM: x^2 + 2*y^2;
98 (%i7) augmented_lagrangian_method(FOM, xx, C, yy, iprint=[-1,0]);
99 (%o7) [[x = 0.666659841080023, y = 0.333340272455448],
100 %lambda = [- 1.333337940892518]]
104 Same example as before, but this time the gradient is supplied as an argument.
108 @c load ("augmented_lagrangian")$
111 @c grad : [2*x, 4*y];
114 @c augmented_lagrangian_method ([FOM, grad], xx, C, yy,
115 @c iprint = [-1, 0]);
118 (%i1) load ("lbfgs")$
119 (%i2) load ("augmented_lagrangian")$
121 (%i3) FOM: x^2 + 2*y^2;
130 (%i5) grad : [2*x, 4*y];
134 (%i6) C: [x + y - 1];
142 (%i8) augmented_lagrangian_method ([FOM, grad], xx, C, yy,
144 (%o8) [[x = 0.6666598410800247, y = 0.3333402724554464],
145 %lambda = [- 1.333337940892525]]
149 @opencatbox{Categories:}
150 @category{Numerical methods}
151 @category{Optimization}
152 @category{Share packages}
153 @category{Package augmented_lagrangian}