Commit 638fd98e authored by Mathieu Hemery's avatar Mathieu Hemery
Browse files

Rename and document add_reactions_from_pivp (ex infer_reactions_from_pivp)

parent 190ee85a
......@@ -18,6 +18,7 @@ commands = [
"add_reaction",
"add_reactions_from_ode",
"add_reactions_from_ode_system",
"add_reactions_from_pivp",
"add_sbml",
"add_time_event",
"add_vertex",
......@@ -95,7 +96,6 @@ commands = [
"hybrid_static_simulation",
"import_ode",
"import_reactions_from_graph",
"infer_reactions_from_pivp",
"influence_graph",
"influence_hypergraph",
"influence_model",
......
......@@ -3,13 +3,13 @@
[
rewrite_ode/2,
%Commands
infer_reactions_from_pivp/1
add_reactions_from_pivp/1
]).
:- use_module(ode).
:- use_module(gpac).
%! infer_reactions_from_PIVP(+PIVP)
%! add_reactions_from_pivp(+PIVP)
%
% biocham command
%
......@@ -18,14 +18,16 @@
%
% Typical usage will be:
% ==
% :- infer_reactions_from_pivp((1,(d(y)/dt=z)); (0,(d(z)/dt= (-1*y)))).
% :- add_reactions_from_pivp((1,(d(y)/dt=z)); (0,(d(z)/dt= (-1*y)))).
% ==
infer_reactions_from_pivp(PIVP) :-
add_reactions_from_pivp(PIVP) :-
biocham_command,
type(PIVP, pivp),
doc('
creates a reaction model to implement the solution of a PIVP, with a lazy use of negative variables.
creates a reaction model to implement a given PIVP (same syntax as compile_from_pivp),
variables that may became negative are splitted x => x_p - x_m, the resulting ODE
is translated in CRN through add_reactions_from_ode_system (see above).
'),
rewrite_ode(PIVP,PIVP_conc),
split_init_ode(PIVP_conc,Init,Ode),
......@@ -40,7 +42,7 @@ infer_reactions_from_pivp(PIVP) :-
\\begin{example} In this example dual species are introduced for x because of its initial negative value but not for y: \n
').
:- biocham_silent(clear_model).
:- biocham(infer_reactions_from_pivp((-1,(d(x)/dt= y-x)); (0,(d(y)/dt=2-y)))).
:- biocham(add_reactions_from_pivp((-1,(d(x)/dt= y-x)); (0,(d(y)/dt=2-y)))).
:- biocham(list_model).
:- biocham(numerical_simulation(time:10)). %, method:msbdf)).
:- biocham(plot).
......
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