e04vjf may be used before
e04vhf to determine the sparsity pattern for the Jacobian.
When using
e04vhf, if you set the optional parameter
and
usrfun provides none of the derivatives, you may need to call
e04vjf 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
e04vjf determines the sparsity pattern for the Jacobian and identifies the constant elements automatically. To do so,
e04vjf 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,
e04vjf finds that the Jacobian can be permuted to the form:
where
,
and
are constant. Note that
might contain elements that are also constant, but
e04vjf must classify them as nonlinear. This is because
e04vhf ‘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
e04vhf.
Note: all optional parameters are described in detail in
Section 12.1 in
e04vhf.
If on entry
or
, explanatory error messages are output on the current error message unit (as defined by
x04aaf).
Not applicable.
Please consult the
X06 Chapter Introduction for information on how to control and interrogate the OpenMP environment used within this routine. Please also consult the
Users' Note for your implementation for any additional implementation-specific information.
None.
This example shows how to call
e04vjf to determine the sparsity pattern of the Jacobian before calling
e04vhf 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 (
).