Commit 5029aa41 authored by Mathieu Hemery's avatar Mathieu Hemery

Supposed that undefined parameters live in (1,Inf)

parent 6a023dcf
......@@ -18,6 +18,7 @@
% Insert here for separate compilation and linting
:- use_module(doc).
:- use_module(ode).
:- use_module(util).
:- set_prolog_flag(float_overflow, infinity).
......@@ -722,6 +723,11 @@ determine_boundary(X, N, N) :-
determine_boundary(X, 0, 1.0Inf) :-
atom(X),
ode:is_molecule(X),
!.
determine_boundary(X, 1, 1.0Inf) :- % undefined parameter
atom(X),
!.
determine_boundary(A+B, IAB, UAB) :-
......
......@@ -44,6 +44,22 @@ done
test(
'add_reactions_from_ode_system',
[true(Reactions == [v*a/(a+k) for a => b])]
) :-
clear_model,
new_ode_system,
parameter([v=1, k=1]),
add_ode(da/dt = -v*a/(a+k)),
add_ode(db/dt = v*a/(a+k)),
add_ode(dc/dt = 1),
delete_ode([c]),
add_reactions_from_ode_system,
all_items([kind: reaction], Reactions),
load_reactions_from_ode_system,
all_items([kind: reaction], Reactions).
test(
'add_reactions_from_ode_system_2',
[true(Reactions == [v*a/(a+k) for a => b])]
) :-
clear_model,
new_ode_system,
......
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