Commit b4e914b5 authored by Hemery Mathieu's avatar Hemery Mathieu
Browse files

Modify is_numeric and is_molecule to handle ODE system alone

parent 8f24de1f
......@@ -1558,11 +1558,24 @@ is_polynomial_sr(A) :- is_molecule(A).
is_polynomial_sr(A) :- is_numeric(A).
is_molecule(A) :-
identifier_kind(_ModelId, A, object).
identifier_kind(_ModelId, A, object),!.
is_molecule(A) :-
% needed when parameters only attached to ode system
get_current_ode_system(Id),
item([parent:Id, kind:ode, item:d(A)/dt=_Derivative]),
!.
is_numeric(N) :-
item([kind:parameter, key:N]);
item([kind:parameter, key:N]),
!.
is_numeric(N) :-
% needed when parameters only attached to ode system
get_current_ode_system(Id),
item([parent:Id, kind:parameter, item:par(N = _Value)]),
!.
is_numeric(N) :-
number(N).
is_numeric(A + B) :- !, is_numeric(A), is_numeric(B).
is_numeric(A - B) :- !, is_numeric(A), is_numeric(B).
is_numeric(-(A)) :- !, is_numeric(A).
......
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