Commit b4d51d66 authored by BARGAIN Orianne's avatar BARGAIN Orianne
Browse files

list sepis with distinct species

parent 11bb6f95
......@@ -57,6 +57,7 @@ merge_restriction(old).
:- initial(option(merge_restriction: no)).
:- initial(option(timeout: 180)).
:- initial(option(all_reductions: no)).
:- initial(option(distinct_species: no)).
:- initial(option(max_nb_reductions: 200)).
:- initial(option(extremal_sepi: no)).
:- initial(option(stats: no)).
......@@ -88,6 +89,8 @@ search_reduction(FileName1, FileName2) :-
option(timeout, number, Timeout, 'timeout for the (Max)SAT solver'),
option(all_reductions, yesno, Reductions,
'specifies if solver is looking for all SEPI reductions or not'),
option(distinct_species, yesno, Distinct_species,
'specifies if solver is looking for all SEPIs with distinct species'),
option(max_nb_reductions, number, MaxReduc,
'limits the number of SEPI reductions the solver is looking for'),
option(extremal_sepi, extremal_sepi, Bottom, 'defines the type of reduction searched'),
......@@ -107,6 +110,7 @@ search_reduction(FileName1, FileName2) :-
merge_restriction: Merge,
timeout: Timeout,
all_reductions: Reductions,
distinct_species: Distinct_species,
max_nb_reductions: MaxReduc,
extremal_sepi: Bottom
],
......
......@@ -148,7 +148,7 @@ m_to_morph(I, G1, G2) :-
% @arg NbSol nb of solutions already found
add_solution(G1, G2, FileIn, Tabint, Extremal_sepi, Merge, NbSol) :-
debug(sepi, "adding solution to input file", []),
G1 = [N1 | _],
G1 = [N1, Ns1 | _],
G2 = [N2 | _],
open(FileIn, update, Stream1),
write_header(G1, G2, Stream1, Extremal_sepi, Merge, NbSol),
......@@ -163,7 +163,14 @@ add_solution(G1, G2, FileIn, Tabint, Extremal_sepi, Merge, NbSol) :-
Top is (N1 + 1),
format(Stream2, "~w ", [Top])
),
write_neg_sol(Stream2, Tabint, N1, N2),
get_option(distinct_species, Distinct_species),
(
Distinct_species = yes
->
write_neg_sol(Stream2, Tabint, Ns1, N2)
;
write_neg_sol(Stream2, Tabint, N1, N2)
),
close(Stream2).
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment