function p00_sol_test ( )

%*****************************************************************************80
%
%% P00_SOL_TEST returns a local minimizer for any problem.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license. 
%
%  Modified:
%
%    03 December 2016
%
%  Author:
%
%    John Burkardt
%
  timestamp ( );
  fprintf ( 1, '\n' );
  fprintf ( 1, 'P00_SOL_TEST:\n' );
  fprintf ( 1, '  P00_SOL provides a local minimizer for any problem.\n' );
%
%  Get the number of problems.
%
  problem_num = p00_problem_num ( );

  for problem = 1 : problem_num

    if ( problem == 25 )
      p = 0.0;
      p25_p_set ( p );
    end

    if ( problem == 36 )
      seed = 123456789;
      p36_p_init ( seed );
    end

    title = p00_title ( problem );

    fprintf ( 1, '\n' );
    fprintf ( 1, '  %d: "%s"\n', problem, title );
%
%  Get or choose the problem size.
%
    n = p00_n ( problem );

    n_min = n;

    if ( n < 0 )
      n_min = abs ( n_min );
      n = max ( n_min, 4 );
    end
%
%  Compare the minimizer and minimum value, if known.
%
    [ know, x ] = p00_sol ( problem, n );

    if ( know <= 0 )

      fprintf ( 1, '  Exact minimizing solution not given.\n' );

    else

      for i = 1 : n
        if ( i == 1 )
          fprintf ( 1, '  Minimizing X = ( ' );
        end
        fprintf ( 1, '  %g', x(i) );
        if ( i < n )
          fprintf ( 1, ',' );
          if ( mod ( i, 5 ) == 0 )
            fprintf ( 1, '\n' );
          end
        else
          fprintf ( 1, ' )' );
        end
      end
      fprintf ( 1, '\n' );

      f_sol = p00_f ( problem, n, x );
      fprintf ( 1, '  F(X_MIN) =  %g\n', f_sol );
    end

  end
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'P00_SOL_TEST\n' );
  fprintf ( 1, '  Normal end of execution.\n' );
  fprintf ( 1, '\n' );
  timestamp ( );

  return
end
