Commit db8c6b42 authored by HEMERY Mathieu's avatar HEMERY Mathieu
Browse files

Rewrite print_alpha_parameter

parent ed8d1066
...@@ -545,14 +545,17 @@ print_event(Reactions_data, Stoch_list, Hybrid_reactants_list, Constraints_list, ...@@ -545,14 +545,17 @@ print_event(Reactions_data, Stoch_list, Hybrid_reactants_list, Constraints_list,
% %
% %
print_alpha_parameters(0, Stream) :-
format(Stream, "parameter(alpha_sum = 0).~n", []),!.
print_alpha_parameters(N_alpha, Stream) :- print_alpha_parameters(N_alpha, Stream) :-
format(Stream, "parameter(alpha~d = 0).~n", [N_alpha]), numlist(1,N_alpha,AlphaList),
Nm_alpha is N_alpha - 1, format(Stream, "parameter(", []),
print_alpha_parameters(Nm_alpha, Stream). print_alpha_parameters_sr(AlphaList, Stream),
format(Stream, "alpha_sum = 0).~n", []).
print_alpha_parameters_sr([N| Tail], Stream) :-
format(Stream, "alpha~d = 0, ", [N]),
print_alpha_parameters_sr(Tail, Stream).
print_alpha_parameters_sr([], Stream).
print_constraints_parameters(Constraints_list, Current_counter, Stream) :- print_constraints_parameters(Constraints_list, Current_counter, Stream) :-
length(Constraints_list, Total_count), length(Constraints_list, Total_count),
......
Markdown is supported
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