 

advertisement
Smvals
Robmin finds λ0, and CONS(λ0,SM) such


RobmFu  Fr  AJP CONS 0 , SM
 / CHI  0 #RobmFunction
The SM(I) values are recalculated any time the current CHI is less than the last CHI.
IF(CHI.LT.CHL)THEN
…
CALL SMVALS(SM,NCON,CONS,XCONS,PC,XPC,PPCC)
Robmin stores the value of c0, 2(c0) and 2(c0)/cI for the last iteration. When it
returns, it has the values c0+ , 2(c0+), 2(c0+)/cI.
The expansion of 2 is
M
 2  c0  1 M
 2  2  c0  1 M
2
2
 c0     0  c0     I
 I J
  S I  I2 (1.1).

c
2

c

c
2 I
I 1
I ,J
I
I
J
The SI terms represent the series of terms beyond quadratic.
Or
 2 c0  
 2  c0  M
 2  2  c0 

  J
  I exp    S I (1.2)
cI
cI
cI cJ
J
Or
 2 c0  
 2  c0  M
 2  2  c0 

  J
cI
cI
cI cJ
J
SI 
(1.3)
I
If I is zero, (1.3) is not defined, in this case SI is set equal to exp(-600).
Equation (1.3) is sometimes negative. This implies that the actual χ2 is less than
that predicted. This represents leaving the convergence range for  as much as the
positive prediction. The absolute value of SI is always used.






..\..\sources\robmindq.for
SUBROUTINE SMVALS(SM,NCON,CONS,XCONS,PC,XPC,PPCC)
IMPLICIT REAL*8 (A-H,O-Z)
REAL*16 PPCC(NCON*(NCON+1)/2)
DIMENSION SM(NCON),CONS(NCON),XCONS(NCON),PC(NCON),XPC(NCON)
C PC IS THE CURRENT VALUE OF THE FIRST DERIVATIVE MATIRX.
C XPC IS THE FIRST DERIVATIVE MATRIX AT THE LAST MINIMUM IN CHI
C MPPCC IS THE SECOND DERIVATIV MATRIX OF THE CURRENT CONS
C XPC(I)=PC(I)+SUMJ (XCONS(J)-CONS(J))*PPCC(I,J)
C IF ABS(RIGHT SIDE) IS LARGER THAN ABS(LEFT), THE SMOOTHER SHOULD BE
MINIMAL
C IF ABS(RIGHT SIDE) IS SMALLER THAN ABS(LEFT)
C
SM(I)=(ABS(LEFT)-ABS(RIGHT))/ABS(XCONS(I)-CONS(I))
DO I=1,NCON
ANUM=PC(I)-XPC(I)
DO J=1,NCON
C
IJ=KIJ(I,J)
DELTA=CONS(J)-XCONS(J)
ANUM=ANUM-DELTA*PPCC(IJ)
ENDDO
DELTA=CONS(I)-XCONS(I)
IF(ABS(DELTA).LT.1D-200.OR.ABS(ANUM).LT.1D-200)THEN
SM(I)=SM(I)-1
ELSE
SM(I)=LOG(ABS(ANUM))-LOG(ABS(DELTA))
ENDIF
PRINT*,' FROM SMVALS I, SM(I) ',I,SM(I)
ENDDO
RETURN
END
FUNCTION ROBMFU(CHI,AJP,PC,PPCC,SM,B,NCON,FR,ALAMB)
IMPLICIT REAL*8 (A-H,O-Z)
REAL*16 PPCC(NCON*(NCON+1)/2)
DIMENSION SM(NCON),B(NCON),PC(NCON)
CALL GSOLVE(CHI,PC,PPCC,SM,ALAMB,NCON,AJP,B)
IF(AJP.GT.CHI)AJP=-CHI
ROBMFU=AJP/CHI-FR
RETURN
END
SUBROUTINE GSOLVE(CHI,PC,PPCC,SM,ALAMDA,NCON,AJP,B)
…
DO K=1,NCON
K2=K2+K
PPCCI(K2)=PPCCI(K2)+BEXP(SM(K)+ALAMDA)
C
Marquardt  I   0  exp  Sm  I  
ENDDO
CALL SMINVQ(PPCCI,NCON,IFL,IFLT,ICONT)
C The call is to SMINV in robminW1 and to MPSminv in Robminqmp
…
KI=1
AJP=CHI+B(1)*(PC(1)+0.5D0*PPCC(1)*B(1))
DO K=2,NCON
KI=KI+K
AJP=AJP+B(K)*(PC(K)+0.5D0*PPCC(KI)*B(K))
KT=KI-K
DO M=1,K-1
KT=KT+1
AJP=AJP+PPCC(KT)*B(M)*B(K)
ENDDO
ENDDO
Download