function glycolysis_equilibrium_test ( )

%*****************************************************************************80
%
%% glycolysis_equilibrium_test() verifies equilibrium of glycolysis_ode().
%
%  Discussion:
%
%    For any (positive) parameters, the equilibrium solution should satisfy
%    dy/dt=[0;0].
% 
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    29 January 2022
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'glycolysis_equilibrium_test()\n' );
  fprintf ( 1, '  Verify that dy/dt=[0;0] for any parameter values.\n' );

  [ a_save, b_save, t0, y0, tstop ] = glycolysis_parameters ( );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  (a,b) y_equi, t_equi, dydt\n' );
  fprintf ( 1, '\n' );
  for i = 1 : 5
    a = rand ( );
    b = rand ( );
    glycolysis_parameters ( a, b, t0, y0, tstop );
    y_equi = glycolysis_equilibrium ( );
    t_equi = rand ( );
    dydt = glycolysis_deriv ( t_equi, y_equi );
    fprintf ( 1, '  (%g,%g): (%g,%g)  %g  (%g,%g)\n', ...
      a, b, y_equi, t_equi, dydt );
  end
%
%  Restore default parameters.
%
  glycolysis_parameters ( a_save, b_save, t0, y0, tstop );
  
  return
end

