function pram_test ( )

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

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

  label = 'pram';
  tile_num = pram_tile_num ( );

  lp_generate ( label, tile_num, @pram_tile_word, @pram_grid_word );
%
%  "pram.sol" was created by CPLEX, which processed "pram.lp".
%
  filename = 'pram.sol';
  x = cplex_solution_read ( filename );

  filename = 'pram_solution.png';
  solution_plot ( x, filename, label, @pram_grid_word, @pram_tile_num, ...
    @pram_tile_word );

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

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

