e04vjc may be used before
e04vhc to determine the sparsity pattern for the Jacobian.
When using
e04vhc, if you set the optional parameter
and
usrfun provides none of the derivatives, you may need to call
e04vjc to determine the input arrays
iafun,
javar,
a,
igfun and
jgvar. These arrays define the pattern of nonzeros in the Jacobian matrix.
A typical sequence of calls could be
e04vgc (&state, ... );
e04vjc (nf, n, ... );
e04vlc ("Derivative Option = 0", &state, ... );
e04vhc (start, nf, ... );
e04vjc determines the sparsity pattern for the Jacobian and identifies the constant elements automatically. To do so,
e04vjc approximates the problem functions,
, at three random perturbations of the given initial point
. If an element of the approximate Jacobian is the same at all three points, then it is taken to be constant. If it is zero, it is taken to be identically zero. Since the random points are not chosen close together, the heuristic will correctly classify the Jacobian elements in the vast majority of cases. In general,
e04vjc finds that the Jacobian can be permuted to the form:
where
,
and
are constant. Note that
might contain elements that are also constant, but
e04vjc must classify them as nonlinear. This is because
e04vhc ‘removes’ linear variables from the calculation of
by setting them to zero before calling
usrfun. A knowledgeable user would be able to move such elements from
in
usrfun and enter them as part of
iafun,
javar and
a for
e04vhc.
Note: all optional parameters are described in detail in
Section 12.1 in
e04vhc.
Not applicable.
Please consult the
X06 Chapter Introduction for information on how to control and interrogate the OpenMP environment used within this function. Please also consult the
Users' Note for your implementation for any additional implementation-specific information.
None.
This example shows how to call
e04vjc to determine the sparsity pattern of the Jacobian before calling
e04vhc to solve a sparse nonlinear programming problem without providing the Jacobian information in
usrfun.
It is a reformulation of Problem 74 from
Hock and Schittkowski (1981) and involves the minimization of the nonlinear function
subject to the bounds
to the nonlinear constraints
and to the linear constraints
The initial point, which is infeasible, is
and
.
The optimal solution (to five figures) is
and
. All the nonlinear constraints are active at the solution.
The formulation of the problem combines the constraints and the objective into a single vector (
).