use main to call all tests:

This commit is contained in:
Vítor Santos Costa
2015-11-10 14:22:13 +00:00
parent adf3ed0311
commit e4bcc5e8a2
5 changed files with 64 additions and 11 deletions

View File

@@ -6,20 +6,31 @@
%% under the terms of the GNU Lesser General Public License as published by the
%% Free Software Foundation, either version 3 of the License, or (at your
%% option) any later version.
%%
%%
%% This program is distributed in the hope that it will be useful, but WITHOUT
%% ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
%% FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
%% more details.
%%
%%
%% You should have received a copy of the GNU Lesser General Public License
%% along with this program. If not, see <http://www.gnu.org/licenses/>.
%%=============================================================================
:- use_module(library(gecode/clpfd)).
main :-
statistics( runtime, _ ),
once( send_most_money(Letters, Money) ),
statistics( runtime, [DT|_] ),
% findall(Queens, queens(I, Queens), Solutions ),
% length( Solutions, N),
format('took ~w msec to find first solution, ~w.~n', [DT, Letters:Money]),
fail.
main.
% S E N D
% + M O S T
% + M O S T
% ---------
% M O N E Y
send_most_money(Letters, Money) :-