add note 20251001
This commit is contained in:
@ -64,29 +64,29 @@ c This subroutine partitions the working arrays wa and iwa, and
|
||||
c then uses the limited memory BFGS method to solve the bound
|
||||
c constrained optimization problem by calling mainlb.
|
||||
c (The direct method will be used in the subspace minimization.)
|
||||
c
|
||||
c n is an integer variable.
|
||||
c 看上去就是一个利用有限内存进行最优化的程序?
|
||||
c n is an integer variable. problem 的维度大小
|
||||
c On entry n is the dimension of the problem.
|
||||
c On exit n is unchanged.
|
||||
c
|
||||
c m is an integer variable.
|
||||
c m is an integer variable. 可用的变量最大数量
|
||||
c On entry m is the maximum number of variable metric corrections
|
||||
c used to define the limited memory matrix.
|
||||
c On exit m is unchanged.
|
||||
c
|
||||
c x is a double precision array of dimension n.
|
||||
c x is a double precision array of dimension n. 状态向量,维度为 n
|
||||
c On entry x is an approximation to the solution.
|
||||
c On exit x is the current approximation.
|
||||
c
|
||||
c l is a double precision array of dimension n.
|
||||
c l is a double precision array of dimension n. 状态变量的下边界(预设好的)
|
||||
c On entry l is the lower bound on x.
|
||||
c On exit l is unchanged.
|
||||
c
|
||||
c u is a double precision array of dimension n.
|
||||
c u is a double precision array of dimension n. 状态变量的上边界(预设好的)
|
||||
c On entry u is the upper bound on x.
|
||||
c On exit u is unchanged.
|
||||
c
|
||||
c nbd is an integer array of dimension n.
|
||||
c nbd is an integer array of dimension n. 指定了边界是如何约束变量的
|
||||
c On entry nbd represents the type of bounds imposed on the
|
||||
c variables, and must be specified as follows:
|
||||
c nbd(i)=0 if x(i) is unbounded,
|
||||
@ -95,15 +95,15 @@ c 2 if x(i) has both lower and upper bounds, and
|
||||
c 3 if x(i) has only an upper bound.
|
||||
c On exit nbd is unchanged.
|
||||
c
|
||||
c f is a double precision variable.
|
||||
c f is a double precision variable. 代价函数值?
|
||||
c On first entry f is unspecified.
|
||||
c On final exit f is the value of the function at x.
|
||||
c
|
||||
c g is a double precision array of dimension n.
|
||||
c g is a double precision array of dimension n. 梯度数组,和状态向量的维度一致
|
||||
c On first entry g is unspecified.
|
||||
c On final exit g is the value of the gradient at x.
|
||||
c
|
||||
c factr is a double precision variable.
|
||||
c factr is a double precision variable. 大概是一个最优化的临界值,到该值后结束迭代
|
||||
c On entry factr >= 0 is specified by the user. The iteration
|
||||
c will stop when
|
||||
c
|
||||
@ -115,7 +115,7 @@ c low accuracy; 1.d+7 for moderate accuracy; 1.d+1 for extremely
|
||||
c high accuracy.
|
||||
c On exit factr is unchanged.
|
||||
c
|
||||
c pgtol is a double precision variable.
|
||||
c pgtol is a double precision variable. 一个用户指定的值,用于指定迭代结束的条件,用于和梯度投影的长度比较
|
||||
c On entry pgtol >= 0 is specified by the user. The iteration
|
||||
c will stop when
|
||||
c
|
||||
@ -124,15 +124,15 @@ c
|
||||
c where pg_i is the ith component of the projected gradient.
|
||||
c On exit pgtol is unchanged.
|
||||
c
|
||||
c wa is a double precision working array of length
|
||||
c wa is a double precision working array of length 用于计算的数组,这里就是外面状态向量计算的公式
|
||||
c (2mmax + 5)nmax + 12mmax^2 + 12mmax.
|
||||
c
|
||||
c iwa is an integer working array of length 3nmax.
|
||||
c iwa is an integer working array of length 3nmax. 同样也是用于计算的数组
|
||||
c
|
||||
c task is a working string of characters of length 60 indicating
|
||||
c task is a working string of characters of length 60 indicating 作业状态说明
|
||||
c the current job when entering and quitting this subroutine.
|
||||
c
|
||||
c iprint is an integer variable that must be set by the user.
|
||||
c iprint is an integer variable that must be set by the user. 指定了如何输出结果
|
||||
c It controls the frequency and type of output generated:
|
||||
c iprint<0 no output is generated;
|
||||
c iprint=0 print only one line at the last iteration;
|
||||
@ -143,9 +143,9 @@ c iprint>100 print details of every iteration including x and g;
|
||||
c When iprint > 0, the file iterate.dat will be created to
|
||||
c summarize the iteration.
|
||||
c
|
||||
c csave is a working string of characters of length 60.
|
||||
c csave is a working string of characters of length 60. 同样保存了作业状态的文本
|
||||
c
|
||||
c lsave is a logical working array of dimension 4.
|
||||
c lsave is a logical working array of dimension 4. 用于指定任务状态的一个逻辑数组
|
||||
c On exit with 'task' = NEW_X, the following information is
|
||||
c available:
|
||||
c If lsave(1) = .true. then the initial X has been replaced by
|
||||
@ -154,7 +154,7 @@ c If lsave(2) = .true. then the problem is constrained;
|
||||
c If lsave(3) = .true. then each variable has upper and lower
|
||||
c bounds;
|
||||
c
|
||||
c isave is an integer working array of dimension 44.
|
||||
c isave is an integer working array of dimension 44. 一些更具体的状态标记
|
||||
c On exit with 'task' = NEW_X, the following information is
|
||||
c available:
|
||||
c isave(22) = the total number of intervals explored in the
|
||||
@ -181,7 +181,7 @@ c active constraints in the current iteration;
|
||||
c isave(41) = the number of variables entering the set of active
|
||||
c constraints in the current iteration.
|
||||
c
|
||||
c dsave is a double precision working array of dimension 29.
|
||||
c dsave is a double precision working array of dimension 29. 大概是一些任务的结果
|
||||
c On exit with 'task' = NEW_X, the following information is
|
||||
c available:
|
||||
c dsave(1) = current 'theta' in the BFGS matrix;
|
||||
@ -210,7 +210,7 @@ c
|
||||
c L-BFGS-B Library ... mainlb.
|
||||
c
|
||||
c
|
||||
c References:
|
||||
c References: 居然还有参考文献
|
||||
c
|
||||
c [1] R. H. Byrd, P. Lu, J. Nocedal and C. Zhu, ``A limited
|
||||
c memory algorithm for bound constrained optimization'',
|
||||
@ -494,7 +494,7 @@ c ************
|
||||
double precision one,zero
|
||||
parameter (one=1.0d0,zero=0.0d0)
|
||||
|
||||
if (task .eq. 'START') then
|
||||
if (task .eq. 'START') then ! 如果作业状态是开始
|
||||
|
||||
epsmch = epsilon(one)
|
||||
|
||||
@ -634,7 +634,7 @@ c restore the previous iterate.
|
||||
|
||||
c Compute f0 and g0.
|
||||
|
||||
task = 'FG_START'
|
||||
task = 'FG_START' ! 如果作业状态不是开始,则设置为 FG_START,让驱动器继续计算代价函数和梯度
|
||||
c return to the driver to calculate f and g; reenter at 111.
|
||||
goto 1000
|
||||
111 continue
|
||||
|
Reference in New Issue
Block a user