Commit 5537726c authored by HEMERY Mathieu's avatar HEMERY Mathieu
Browse files

Add some operators for parametrize

parent 1df1f7ba
...@@ -1122,6 +1122,8 @@ parametrize_initial_concentration :- ...@@ -1122,6 +1122,8 @@ parametrize_initial_concentration :-
new_parameter(K), new_parameter(K),
command(present(Species, K)), command(present(Species, K)),
command(parameter(K = Value)) command(parameter(K = Value))
;
true
) )
). ).
...@@ -1147,14 +1149,25 @@ parametrize_reaction :- ...@@ -1147,14 +1149,25 @@ parametrize_reaction :-
introduce_param(Kin for Reac, Kin2 for Reac) :- introduce_param(Kin for Reac, Kin2 for Reac) :-
introduce_param(Kin, Kin2). introduce_param(Kin, Kin2).
introduce_param(A*B, A2*B2) :-
introduce_param(A, A2),
introduce_param(B, B2).
introduce_param(A/B, A2/B2) :-
introduce_param(A, A2),
introduce_param(B, B2).
introduce_param(A+B, A2+B2) :- introduce_param(A+B, A2+B2) :-
introduce_param(A, A2), introduce_param(A, A2),
introduce_param(B, B2). introduce_param(B, B2).
introduce_param(A*B, A2*B2) :- introduce_param(A-B, A2-B2) :-
introduce_param(A, A2), introduce_param(A, A2),
introduce_param(B, B2). introduce_param(B, B2).
introduce_param(A^N, A2^N) :-
introduce_param(A, A2).
introduce_param(X, K) :- introduce_param(X, K) :-
number(X), number(X),
new_parameter(K), new_parameter(K),
......
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