function predator_prey_equilibrium_test ( )

%*****************************************************************************80
%
%% predator_prey_equilibrium_test() verifies the equilibrium for predator_prey_ode().
%
%  Discussion:
%
%    For any (positive) parameter choices, the equilibrium solution should satisfy
%    dy/dt=[0;0] and H=0.
% 
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    17 December 2021
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'predator_prey_equilibrium_test()\n' );
  fprintf ( 1, '  Verify that dy/dt=[0;0] and H=0 for any parameter values.\n' );

  [ alpha_save, beta_save, gamma_save, delta_save, t0, y0, tstop ] = ...
    predator_prey_parameters ( );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  (alpha,beta,gamma,delta)  dydt  H\n' );
  fprintf ( 1, '\n' );
  for i = 1 : 5
    alpha = rand ( );
    beta = rand ( );
    gamma = rand ( );
    delta = rand ( );
    y_equi = predator_prey_equilibrium ( );
    t_equi = rand ( );
    h_equi = predator_prey_conserved ( y_equi );
    dydt = predator_prey_deriv ( t_equi, y_equi );
    fprintf ( 1, '  (%g,%g,%g,%g): (%g,%g)  %g\n', alpha, beta, gamma, delta, dydt, h_equi );
  end
%
%  Restore default parameters.
%
  predator_prey_parameters ( alpha_save, beta_save, gamma_save, delta_save, ...
    t0, y0, tstop );
  
  return
end

