Click or drag to resize

FORMKRun Method


Namespace: DotNumerics.Optimization.LBFGSB
Assembly: DWSIM.MathOps.DotNumerics (in DWSIM.MathOps.DotNumerics.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public void Run(
	int N,
	int NSUB,
	int[] IND,
	int offset_ind,
	int NENTER,
	int ILEAVE,
	int[] INDX2,
	int offset_indx2,
	int IUPDAT,
	bool UPDATD,
	ref double[] WN,
	int offset_wn,
	ref double[] WN1,
	int offset_wn1,
	int M,
	double[] WS,
	int offset_ws,
	double[] WY,
	int offset_wy,
	double[] SY,
	int offset_sy,
	double THETA,
	int COL,
	int HEAD,
	ref int INFO
)
Request Example View Source

Parameters

N  Int32
is an integer variable. On entry n is the dimension of the problem. On exit n is unchanged.
NSUB  Int32
is an integer variable On entry nsub is the number of subspace variables in free set. On exit nsub is not changed.
IND  Int32
is an integer array of dimension nsub. On entry ind specifies the indices of subspace variables. On exit ind is unchanged.
offset_ind  Int32
 
NENTER  Int32
is an integer variable. On entry nenter is the number of variables entering the free set. On exit nenter is unchanged.
ILEAVE  Int32
is an integer variable. On entry indx2(ileave),...,indx2(n) are the variables leaving the free set. On exit ileave is unchanged.
INDX2  Int32
is an integer array of dimension n. On entry indx2(1),...,indx2(nenter) are the variables entering the free set, while indx2(ileave),...,indx2(n) are the variables leaving the free set. On exit indx2 is unchanged.
offset_indx2  Int32
 
IUPDAT  Int32
is an integer variable. On entry iupdat is the total number of BFGS updates made so far. On exit iupdat is unchanged.
UPDATD  Boolean
is a logical variable. On entry 'updatd' is true if the L-BFGS matrix is updatd. On exit 'updatd' is unchanged.
WN  Double
is a double precision array of dimension 2m x 2m. On entry wn is unspecified. On exit the upper triangle of wn stores the LEL^T factorization of the 2*col x 2*col indefinite matrix [-D -Y'ZZ'Y/theta L_a'-R_z' ] [L_a -R_z theta*S'AA'S ]
offset_wn  Int32
 
WN1  Double
is a double precision array of dimension 2m x 2m. On entry wn1 stores the lower triangular part of [Y' ZZ'Y L_a'+R_z'] [L_a+R_z S'AA'S ] in the previous iteration. On exit wn1 stores the corresponding updated matrices. The purpose of wn1 is just to store these inner products so they can be easily updated and inserted into wn.
offset_wn1  Int32
 
M  Int32
is an integer variable. On entry m is the maximum number of variable metric corrections used to define the limited memory matrix. On exit m is unchanged.
WS  Double
 
offset_ws  Int32
 
WY  Double
 
offset_wy  Int32
 
SY  Double
 
offset_sy  Int32
 
THETA  Double
is a double precision variable;
COL  Int32
is an integer variable;
HEAD  Int32
is an integer variable. On entry they store the information defining the limited memory BFGS matrix: ws(n,m) stores S, a set of s-vectors; wy(n,m) stores Y, a set of y-vectors; sy(m,m) stores S'Y; wtyy(m,m) stores the Cholesky factorization of (theta*S'S+LD^(-1)L') theta is the scaling factor specifying B_0 = theta I; col is the number of variable metric corrections stored; head is the location of the 1st s- (or y-) vector in S (or Y). On exit they are unchanged.
INFO  Int32
is an integer variable. On entry info is unspecified. On exit info = 0 for normal return; = -1 when the 1st Cholesky factorization failed; = -2 when the 2st Cholesky factorization failed.
See Also