Commit 24b80523 authored by FAGES Francois's avatar FAGES Francois
Browse files

test_rate_independence_sources_sinks

parent f1c184b4
......@@ -206,6 +206,7 @@ commands = [
"set_ode_system_name",
"set_p_m_rate",
"test_rate_independence",
"test_rate_independence_sources_sinks",
"transition",
"tropicalize",
"undefined",
......
......@@ -103,7 +103,7 @@ is_sink(M, Molecules):-
is_reactant(M,_)
),
\+ (
is_source(M,_)
is_influence_source(M,_)
).
......
......@@ -3,6 +3,7 @@
[
% Commands
test_rate_independence/0,
test_rate_independence_sources_sinks/0,
test_rate_independence/2,
rate_independence_reduction/2
]
......@@ -36,6 +37,13 @@ test_rate_independence :-
% to generalize to influence models too
test_rate_independence_sources_sinks :-
biocham_command,
doc('Test graphical sufficient conditions for rate independence of the current model for the computation of graph sink species from graph source species.'),
source_species(Inputs),
sink_species(Outputs),
test_rate_independence(Inputs, Outputs).
% Test rate independence for given inputs and outputs by performing rate-independence preserving reduction
test_rate_independence(Inputs, Outputs):-
biocham_command,
......@@ -44,7 +52,8 @@ test_rate_independence(Inputs, Outputs):-
doc('Checks whether the current reaction model is rate independent
for computing the given set of molecular species \\argument{Outputs} from \\argument{Inputs}.
Warning: this command destroys the current model by applying the \\command{rate_independence_reduction}.'),
rate_independence_check(Inputs, Outputs).
rate_independence_reduction(Inputs, Outputs),
test_rate_independence.
% Performs a model reduction which preserves the rate independence property for given inputs and outputs
rate_independence_reduction(Inputs, Outputs):-
......@@ -141,10 +150,6 @@ dfs_no_loop(GraphId, Vertex) :-
assertz(seen(Vertex)).
% Graph rewriting for checking rate independence with respect to Inputs and Outputs
rate_independence_check(Inputs, Outputs):-
simplify(Inputs, Outputs),
check_rate_independence.
% Compression of species with no outgoing fork and trivial loops
simplify(Inputs, Outputs):-
......
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