function boomerang_test ( )

%*****************************************************************************80
%
%% boomerang_test() tests boomerang().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    06 February 2022
%
%  Author:
%
%    John Burkardt
%
  addpath ( '../eternity' );
  addpath ( '../boomerang' );

  timestamp ( );
  fprintf ( 1, '\n' );
  fprintf ( 1, 'boomerang_test():\n' );
  fprintf ( 1, '  MATLAB/Octave version %s.\n', version ( ) );
  fprintf ( 1, '  boomerang() implements a linear programming\n' );
  fprintf ( 1, '  approach to the boomerang tiling problem.\n' );

  label = 'boomerang';
  tile_num = boomerang_tile_num ( );

  if ( false )
%
%  If boomerang.lp.gz exists, delete it.
%
    gzipname = 'boomerang.lp.gz';
    if ( isfile ( gzipname ) )
      delete ( gzipname );
      fprintf ( 1, '  Deleting "%s"\n', gzipname );
    end
%
%  Create boomerang.lp
%
    lp_generate ( label, tile_num, @boomerang_tile_word, @boomerang_grid_word );
%
%  Compress boomerang.lp.
%
    filename = 'boomerang.lp';
    if ( isfile ( filename ) )
      gzip ( filename );
      fprintf ( 1, '  Compressing "%s""\n', filename );
      delete ( filename );
    end

  end

  if ( true )
%
%  If boomerang_alt.lp.gz exists, delete it.
%
    gzipname = 'boomerang_alt.lp.gz';
    if ( isfile ( gzipname ) )
      delete ( gzipname );
      fprintf ( 1, '  Deleting "%s"\n', gzipname );
    end
%
%  boomerang_lp_alt() creates boomerang_alt.lp
%
    boomerang_lp_alt ( );
%
%  Compress boomerang_alt.lp.
%
    filename = 'boomerang_alt.lp';
    if ( isfile ( filename ) )
      gzip ( filename );
      fprintf ( 1, '  Compressing "%s""\n', filename );
      delete ( filename );
    end

  end

  if ( false )
%
%  If boomerang.sol.gz exists, gunzip it.
%
    gzipname = 'boomerang.sol.gz';
    if ( isfile ( gzipname ) )
      gunzip ( gzipname )
      fprintf ( 1, '  Uncompressing "%s"\n', gzipname );
    end
%
%  "boomerang.sol" was created by CPLEX, which processed "boomerang.lp".
%
    filename = 'boomerang.sol';
    x = cplex_solution_read ( filename );
%
%  Compress boomerang.sol.
%
    filename = 'boomerang.sol';
    if ( isfile ( filename ) )
      gzip ( filename );
      fprintf ( 1, '  Compressing "%s""\n', filename );
      delete ( filename );
    end
%
%  Plot the information in X.
%
    filename = 'boomerang_solution.png';
    solution_plot ( x, filename, label, @boomerang_grid_word, ...
      @boomerang_tile_num, @boomerang_tile_word );
%
%  Print the information in X.
%
    boomerang_solution_print ( x );

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

  rmpath ( '../boomerang' );
  rmpath ( '../eternity' );

  return
end
function timestamp ( )

%*****************************************************************************80
%
%% timestamp() prints the current YMDHMS date as a timestamp.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    14 February 2003
%
%  Author:
%
%    John Burkardt
%
  t = now;
  c = datevec ( t );
  s = datestr ( c, 0 );
  fprintf ( 1, '%s\n', s );

  return
end

