E04.E04ZC_CONFUN Delegate
関数リスト一覧   NagLibrary Namespaceへ  ライブラリイントロダクション  本ヘルプドキュメントのchm形式版

confun must calculate the vector cx of nonlinear constraint functions and its Jacobian for a specified n-vector x. If there are no nonlinear constraints (ncnln=0), confun will not be called by e04zc and confun may be the dummy method e04vdm. (e04vdm is included in the nAG Library.) If there are nonlinear constraints, e04zc always calls confun and objfun together, in that order.

Syntax

C#
public delegate void E04ZC_CONFUN(
	ref int mode,
	int ncnln,
	int n,
	double[] x,
	double[] c,
	double[,] cjac,
	int nstate
)
Visual Basic (Declaration)
Public Delegate Sub E04ZC_CONFUN ( _
	ByRef mode As Integer, _
	ncnln As Integer, _
	n As Integer, _
	x As Double(), _
	c As Double(), _
	cjac As Double(,), _
	nstate As Integer _
)
Visual C++
public delegate void E04ZC_CONFUN(
	int% mode, 
	int ncnln, 
	int n, 
	array<double>^ x, 
	array<double>^ c, 
	array<double,2>^ cjac, 
	int nstate
)
F#
type E04ZC_CONFUN = 
    delegate of 
        mode:int byref * 
        ncnln:int * 
        n:int * 
        x:float[] * 
        c:float[] * 
        cjac:float[,] * 
        nstate:int -> unit

Parameters

mode
Type: System..::.Int32 %
mode is a flag that you may set within confun to indicate a failure in the evaluation of the nonlinear constraints.
On entry: is always non-negative.
On exit: if mode is negative on exit from confun, then execution of e04zc will be terminated with ifail containing the negative value of mode.
ncnln
Type: System..::.Int32
On entry: the number m of nonlinear constraints, as input to e04zc.
n
Type: System..::.Int32
On entry: the number n of variables, as input to e04zc.
x
Type: array< System..::.Double >[]()[]
On entry: the vector x of variables at which the constraint functions are to be evaluated.
c
Type: array< System..::.Double >[]()[]
On exit: must contain ncnln nonlinear constraint values, with the value of the jth nonlinear constraint in c[j-1].
cjac
Type: array< System..::.Double ,2>[,](,)[,]
On exit: must contain the Jacobian of the nonlinear constraint functions with the ith row of cjac containing the gradient of the ith nonlinear constraint, i.e., cjac[i-1,j-1] must contain the partial derivative of ci with respect to xj. If cjac contains any constant elements, a saving in computation can be made by setting them once only, when nstate=1.
nstate
Type: System..::.Int32
On entry: will be 1 on the first call to confun by e04zc, and is 0 for the two subsequent calls. Thus, if you wish, nstate may be tested within confun in order to perform certain calculations once only. For example, you may read data or initialize global variables when nstate=1. In addition, the constant elements of cjac can be set in confun when nstate=1, and need not be defined on subsequent calls.

See Also