function h = predator_prey_conserved ( y )

%*****************************************************************************80
%
%% predator_prey_conserved() evaluates a conserved quantity.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    24 April 2021
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    real Y(N,2): the current solution variables, rabbits and foxes.
%
%  Output:
%
%    real H(N): the value of the conserved quantity.
%
  r = y(:,1);
  f = y(:,2);

  [ alpha, beta, gamma, delta, t0, y0, tstop ] = predator_prey_parameters ( );

  h = delta * r - gamma * log ( r ) + beta * f - alpha * log ( f );

  return
end

