CONOPT
|
The modeler can tell CONOPT that second order directional derivatives are available by registering a 2DDir or 2DDirLagr callback routine using COIDEF_2DDir() or COIDEF_2DDirLagr().
This optional callback routine must be registered with COIDEF_2DDir(). It computes the directional second derivative for a single constraint as defined in the introduction to this section.
where:
X
: Vector with the point in which the directional second derivatives should be computed. Defined by CONOPT.DX
: Vector with the direction in which the directional second derivatives should be computed. Defined by CONOPT.D2G
: Vector returning the directional second derivative. The relevant positions (see JCNM
below) will be zero on entry to 2DDir
.ROWNO
: The constraint for which the directional second derivatives should be computed. Defined by CONOPT. 2DDir
will be called for one constraint at a time and only for nonlinear constraints.JCNM
: List of column numbers for the variables that appear nonlinearly in the current constraint. JCNM
and NJ
(see below) are provided as a service to modelers that may find this information useful; it can be ignored by others.NODRV
: Must be set to 1 if the directional second derivatives for some reason could not be computed, for example because some of them were not defined. CONOPT will not use any output from a point that returned a nonzero NODRV
.N
: The number of variables in the model as defined in COIDEF_NumVar(). Provided by CONOPT.NJ
: The number of variables appearing nonlinearly in the current constraint. Defined by CONOPT.THREAD
: In some multi-threading environments multiple copies of FDEval
can be called at the same time, (see Multi Threading). THREAD
will hold the number of the thread for the current call of FDEval
. THREAD
is in the interval from 0 to the maximum number of threads allowed for FDEval
.USRMEM
: User memory as defined in COIDEF_UsrMem() (Only for Fortran and C API).
This optional callback routine must be registered with COIDEF_2DDirIni(). If it is registered it is called by CONOPT before a sequence of 2DDir
calls each time either the point or the direction changes. It can be used to initialize the 2DDir
computations, for example to compute common terms.
where:
X
: Vector with the point in which the directional second derivatives should be computed in future 2DDir
calls. Defined by CONOPT.DX
: Vector with the direction in which the directional second derivatives should be computed in future 2DDir
calls. Defined by CONOPT.ROWLIST
: List of the constraints that will be evaluated in the future 2DDir
calls.LISTSIZE
: The number of elements in ROWLIST
, defined by CONOPT.NUMTHREAD
: The number of threads to be used for the following 2DDir
calls.NEWPT
: Indicator that describes the pair (X,DX)
. Is provided by CONOPT:
X
have not changed but the direction DX
has changed.NEWPT
is provided by CONOPT as a service to the modeler. It may be used to calculate and reuse terms that depend on X
but do not depend on the direction.
NODRV
: Must be set to 1 if the directional second derivatives for some reason could not be computed, for example because some of them were not defined. CONOPT will not use any output from a point that returned a nonzero NODRV
and 2DDir
and the optional 2DDirEnd
will not be called in this point.N
: The number of variables in the model as defined in COIDEF_NumVar(). Provided by CONOPT.USRMEM
: User memory as defined in COIDEF_UsrMem() (Only for Fortran and C API).
This optional callback routine must be registered with COIDEF_2DDirEnd(). If it is registered it is called by CONOPT after a sequence of 2DDir
calls each time either the point or the direction changes. It can be used to perform cleanup tasks, including to report if anything went wrong.
where:
NODRV
: Can be set to 1 if the directional second derivatives for some reason could not be computed, for example because some of them were not defined. this is an alternative to the use of NODRV
in 2DDir
. CONOPT will not use any output from a point and direction that returned a nonzero NODRV
.USRMEM
: User memory as defined in COIDEF_UsrMem() (Only for Fortran and C API).