Attention une mise à jour du serveur va être effectuée le lundi 17 mai entre 13h et 13h30. Cette mise à jour va générer une interruption du service de quelques minutes.

Commit 767ab0d1 authored by Mathieu Hemery's avatar Mathieu Hemery

Improve is_polynomial and ode_inference

parent 4affd6ac
......@@ -101,6 +101,7 @@ commands = [
"hybrid_static_simulation",
"import_ode",
"import_reactions_from_graph",
"infer_hidden_molecules",
"influence_graph",
"influence_hypergraph",
"influence_model",
......@@ -186,7 +187,6 @@ commands = [
"polynomial_ODE",
"present",
"prolog",
"put_back_implicit_species",
"quadratic_reduction_ODE",
"quit",
"reaction_graph",
......
......@@ -1709,7 +1709,7 @@ is_polynomial_sr(A + B) :- !, is_polynomial_sr(A), is_polynomial_sr(B).
is_polynomial_sr(A - B) :- !, is_polynomial_sr(A), is_polynomial_sr(B).
is_polynomial_sr(-(A)) :- !, is_polynomial_sr(A).
is_polynomial_sr(A*B) :- !, is_polynomial_sr(A), is_polynomial_sr(B).
is_polynomial_sr(A^N) :- !, is_integer(N), is_polynomial_sr(A).
is_polynomial_sr(A^N) :- !, is_integer(N), N > 0, is_polynomial_sr(A).
is_polynomial_sr(A/N) :- !, is_numeric(N), is_polynomial_sr(A).
is_polynomial_sr(A) :- is_molecule(A).
is_polynomial_sr(A) :- is_numeric(A).
......
......@@ -128,6 +128,7 @@ test('is_polynomial_sr', [nondet]) :-
is_polynomial_sr(a*b + c^3 - 2*b),
is_polynomial_sr(a*(c/4)^2),
is_polynomial_sr(a/(x+y)),
\+(is_polynomial_sr(a*(c/4)^ -2)),
\+(is_polynomial_sr(exp(2*a))),
\+(is_polynomial_sr(2*a/b)).
......
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