Click or drag to resize

TNRun Method


Namespace: DotNumerics.Optimization.TN
Assembly: DWSIM.MathOps.DotNumerics (in DWSIM.MathOps.DotNumerics.dll) Version: 1.0.0.0 (1.0.0.0)
Syntax
public void Run(
	ref int IERROR,
	int N,
	ref double[] X,
	int offset_x,
	ref double F,
	ref double[] G,
	int offset_g,
	ref double[] W,
	int offset_w,
	int LW,
	ISFUN SFUN
)
Request Example View Source

Parameters

IERROR  Int32
- (INTEGER) ERROR CODE ( 0 =.GT. NORMAL RETURN) ( 2 =.GT. MORE THAN MAXFUN EVALUATIONS) ( 3 =.GT. LINE SEARCH FAILED TO FIND ( LOWER POINT (MAY NOT BE SERIOUS) (-1 =.GT. ERROR IN INPUT PARAMETERS)
N  Int32
- (INTEGER) NUMBER OF VARIABLES
X  Double
- (REAL*8) VECTOR OF LENGTH AT LEAST N; ON INPUT, AN INITIAL ESTIMATE OF THE SOLUTION; ON OUTPUT, THE COMPUTED SOLUTION.
offset_x  Int32
 
F  Double
- (REAL*8) ON INPUT, A ROUGH ESTIMATE OF THE VALUE OF THE OBJECTIVE FUNCTION AT THE SOLUTION; ON OUTPUT, THE VALUE OF THE OBJECTIVE FUNCTION AT THE SOLUTION
G  Double
- (REAL*8) VECTOR OF LENGTH AT LEAST N; ON OUTPUT, THE FINAL VALUE OF THE GRADIENT
offset_g  Int32
 
W  Double
- (REAL*8) WORK VECTOR OF LENGTH AT LEAST 14*N
offset_w  Int32
 
LW  Int32
- (INTEGER) THE DECLARED DIMENSION OF W
SFUN  ISFUN
- A USER-SPECIFIED SUBROUTINE THAT COMPUTES THE FUNCTION AND GRADIENT OF THE OBJECTIVE FUNCTION. IT MUST HAVE THE CALLING SEQUENCE SUBROUTINE SFUN (N, X, F, G) INTEGER N DOUBLE PRECISION X(N), G(N), F
See Also