function whale_test ( )

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

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

  label = 'whale';
  tile_num = whale_tile_num ( );

  lp_generate ( label, tile_num, @whale_tile_word, @whale_grid_word );

  filename = 'whale.sol';
  x = cplex_solution_read ( filename );

  filename = 'whale_solution.png';
  solution_plot ( x, filename, label, @whale_grid_word, @whale_tile_num, ...
    @whale_tile_word );

  filename = 'whale_solution_xy.tex';
  plot_scale = 1.0;
  solution_tikz_xy ( x, filename, @whale_grid_word, @whale_tile_num, ...
    @whale_tile_word, plot_scale );

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

  rmpath ( '../whale' );
  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

