Commit d1214d39 authored by FAGES Francois's avatar FAGES Francois
Browse files

still under debugging

parent 24b80523
......@@ -5,6 +5,7 @@
test_rate_independence/0,
test_rate_independence_sources_sinks/0,
test_rate_independence/2,
rate_independence_reduction_sources_sinks/0,
rate_independence_reduction/2
]
).
......@@ -42,6 +43,8 @@ test_rate_independence_sources_sinks :-
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),
write('sources: '), writeln(Inputs),
write('sinks: '), writeln(Outputs),
test_rate_independence(Inputs, Outputs).
% Test rate independence for given inputs and outputs by performing rate-independence preserving reduction
......@@ -60,8 +63,19 @@ rate_independence_reduction(Inputs, Outputs):-
biocham_command,
type(Inputs, {object}),
type(Outputs, {object}),
doc('Reduces the current reaction model while preserving rate indepence for computing \\argument{Outputs} species from \\argument{Inputs} species.'),
simplify(Inputs, Outputs).
doc('Reduces the current reaction model while preserving rate independence for computing \\argument{Outputs} species from \\argument{Inputs} species.'),
simplify(Inputs, Outputs),
!,
list_model.
rate_independence_reduction_sources_sinks:-
biocham_command,
doc('Reduces the current reaction model while preserving rate independence for computing sink species from source species.'),
source_species(Inputs),
sink_species(Outputs),
write('sources: '), writeln(Inputs),
write('sinks: '), writeln(Outputs),
rate_independence_reduction(Inputs, Outputs).
% API
......@@ -205,6 +219,7 @@ simpl(M):-
add_merge_reactions(M, Reaction1, Reaction2).
% Todo: accept reversible reactions with syntax <=>
% Elimination of M in 2 loops alpha 1<=>3 M (4<)=>2 gamma rewritten alpha (<)=> gamma
simpl(M):-
reactions_with_reactant([M], [Reaction1, Reaction2]),
......
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