anchor.diff:      !
       ! FCNT - number of function evaluations
   
  +    use svrmod
  +
       IMPLICIT NONE
   
       ! SCALAR ARGUMENTS
  
positive.code: 
      IF (OUTPUT) WRITE(*,1001)
  
      DO I=1,N
         XNOVO(I) = X(I)
         XBASE_A(I)= X(I)            
      END DO
  
      GO TO 5
  4   CONTINUE     
      DO I=1, N
         X(I) = XNOVO(I)                     
         XBASE_A(I)=  XNOVO(I)                  
      END DO
  
  5   continue
  
      CALL  PRIMEIROMODELO1 (N,X,Q,H, NPT,RHO,Y,FF,FLAG) 
  
      IF ( OUTPUT ) WRITE(*,1002) RHO,DELTA,FF(1),IC,MIN(N,MAXXEL), &
                    (X(I), I=1,MIN(N,MAXXEL))
      IF ( FLAG .NE. 0 ) GOTO 31
  
      FOPT = FF(1)         
  
  11  CALL   SUBPROBLEMA(N,NPT,Q,DELTA,D, X, XL, XU, DSQ, &
                         M, EQUATN, LINEAR, CCODED, XEPS, FLAG) 
  
      IF ( OUTPUT ) WRITE(*,1003) RHO,DELTA,Q(1),FOPT,IC
      IF ( FLAG .NE. 0 ) GOTO 31
  
      DISTSQ=(10.D0*RHO)**2                 
      IF (SQRT(DSQ) .LT. 0.5D0*RHO) THEN 
  
         KN=0
         DO   K=1,NPT
            SUM=0D0
            DO   J=1,N
               SUM=SUM+(Y(K,J)-X(J))**2
            END DO
            IF (SUM .GT. DISTSQ) THEN
               KN=K
               exit
            END IF
         END DO
  
         IF (RHO .LE. RHOEND) GO TO 31
         IF (KN .EQ. 0)   RHO = GAMA * RHO              
  
         GO TO 4
      END IF
  
negative.code: 
    end subroutine mevalhc
  
  end module trdf
  