Control Problem Solver for Implicit Kedem or Newton Object
Syntax control::implicit_solver solve(L_fun, aL_fun, acriteria) y = solve.function(x) b = solve.derivative(x, y) u = solve.linear(v)
Purpose
The object
solve
can be used with
implicit_kedem
to compute
derivatives of the function
@(@
Y(x)
@)@ defined by @(@
L[x, Y(x)] = 0
@)@
for the control problem.
L_fun
This argument has prototype
const CppAD::ADFun<double>& L_fun
and is the CppAD function object corresponding to the
constraint
function.
aL_fun
This argument has prototype
const CppAD::ADFun< CppAD::AD<double> >& aL_fun
and is the CppAD function object corresponding to the
constraint
function.
This function object can be empty, if
solve.derivative
is note used with
Scalar
equal to CppAD::AD<double>.
An empty
aL_fun
object can be created with
CppAD::ADFun< CppAD::AD<double> > aL_fun;
criteria
This is the convergence criteria for @(@
L[x, Y(x)] = 0
@)@.
To be specific, a value @(@
y
@)@ is accepted if
the Euclidean norm squared
@(@
| L(x, y) |^2
@)@ is less than
criteria
.
This argument has prototype
const Solve& solve
The type
Solver
must support the default constructor
and the assignment operator.
It must also support the following operations:
solve.function
The argument
x
and the return value
y
have prototypes
const VECTOR(double)& x
VECTOR(double) y
where
x.size() == n
and
y.size() == m
.
The return value satisfies the relation @(@
L(x, y) = 0
@)@.
solve.derivative
The arguments have prototypes
const VECTOR(Scalar)& x
const VECTOR(Scalar)& y
The return value has prototype
VECTOR(Scalar) b
This returns the value of @(@
L_y (x, y)
@)@ for subsequent
calls to
solve.linear
.
Only the elements of @(@
L_y (x, y)
@)@ that depend on @(@
(x, y)
@)@
need be included in the vector @(@
b
@)@.
The type
Scalar
is either
double or CppAD::AD<double>.
solve.linear
The arguments
b
,
v
and the return value
u
have prototypes
const VECTOR(Scalar)& b
const VECTOR(Scalar)& v
VECTOR(Scalar) u
where both vectors have size
m
.
The return value satisfies the equation
@[@
u = L_y (x, y)^{-1} v
@]@
where @(@
L_y (x, y)
@)@ corresponds to
b
.
The type
Scalar
is either
double or CppAD::AD<double>.