anchor.diff:    integer, parameter :: MMAX = 1000
     integer, parameter :: JCNNZMAX = NMAX * MMAX
     integer, parameter :: HCNNZMAX = NMAX ** 2 * (1 + MMAX)
  -  integer, parameter :: MAXXEL = 3
  +  integer, parameter :: MAXXEL = 30
     integer, parameter :: INN = 1000
   
     ! COMMON SCALARS
  
positive.code: 
      FCNT = IC
  
      IF ( OUTPUT ) THEN
         call cpu_time(tempofinal)
         write(*,2000) F,FEAS,RHO,DELTA,IC,(tempofinal - tempoinicial), &
                       MIN(N,MAXXEL),(X(I), I=1,MIN(N,MAXXEL))
      END IF
  
      ! FORMATS
  
  1000 FORMAT(/,'PHASE 0',/,7('-'),/,/,'FEASIBILITY =',36X,D23.8,/, &
                'NEW POINT',/,3(1X,D23.8))
  1001 FORMAT(/,'PHASE 1',/,7('-'),/)
  1002 FORMAT(/,'(RE)BUILDING MODEL from scratch.',/, &
              5X,'RHO =',50X,D12.5,/,                 &
              5X,'Delta =',48X,D12.5,/,               &
              5X,'Objective function =',24X,D23.8,/,  &
              5X,'Function evaluations =',35X,I10,/,  &
              5X,'Current model center (first ',I3,' elements)',/,6X, &
              3(1X,D21.8))
  1003 FORMAT(/,'SOLVED TR SUBPROBLEM.',/,           &
              5X,'RHO =',50X,D12.5,/,                &
              5X,'Delta =',48X,D12.5,/,              &
              5X,'Model value =',31X,D23.8,/,        &
              5X,'Objective function (at Z) =',17X,D23.8,/, &
              5X,'Function evaluations =',35X,I10)
  1004 FORMAT(5X,'Objective function =',24X,D23.8)
  1005 FORMAT(/,'REMOVING sampling point',1X,I4,'.')
  1006 FORMAT(5X,'Objective function (at trial point) =',&
              7X,D23.8)
  
  
  1020 FORMAT(/,'Solution was found!',/)
  1021 FORMAT(/,'Flag -1: Error while evaluating functions.',/)
  1022 FORMAT(/,'Flag 2: Error in the internal solver.',/)
  1023 FORMAT(/,'Flag 3: Reached the maximum of',1X,I10,1X, &
            'function evaluations.',/)
  1024 FORMAT(/,'Flag 4: Rho smaller than tolerance.',/)
  
  2000 FORMAT(/,'Final Iteration',/,15('-'),2/,          &
              'Objective function =',29X,D23.8,/,        &
              'Feasibility =',36X,D23.8,/,               &
              'RHO =',55X,D12.5,/,                       &
              'Delta =',53X,D12.5,/,                     &
              'Function evaluations =',40X,I10,/,        &
              'CPU time =',30X,1PD23.8,1X,'seconds.',/,  &
              'Solution (first ',I3,' elements)',/,3(1X,D23.8))
  
  3000 FORMAT(/,'Welcome to TRDF Algorithm!',/,                   &
            'This algorithm was based on paper',/,                &
            'P.D. Conejo, E.W. Karas, and L.G. Pedroso',/,        &
            '"A trust-region derivative-free algorithm for',/,    &
            'constrained problems", Optimization Methods ',/,     &
            'and Software, v. 30 (6), p. 1126-1145, 2015]',/)
    END SUBROUTINE TRDFSUB
  
    ! ******************************************************************
  
negative.code:     ! canceled.
  
      call mevalf(N,d,QX,flag)
  
      do i = 1,n
         d(i) = z(i) - xbase_a(i)
      end do
  