Commit 0f7523be authored by SOLIMAN Sylvain's avatar SOLIMAN Sylvain
Browse files

M7 continuous…

parent 0ab20881
......@@ -11,6 +11,8 @@
select_ode_system/1,
ode/1,
add_ode/1,
ode_function/1,
ode_parameter/1,
delete_ode/1,
list_ode/0,
ode_system/0,
......@@ -358,7 +360,7 @@ delete_ode(ODERefList) :-
init(InitList) :-
biocham_command,
biocham_command(*),
type(InitList, '*'(name = arithmetic_expression)),
doc('sets the initial value of a variable in the current set of ODEs.'),
\+ (
......@@ -503,6 +505,17 @@ get_ode_initial_state(Id, Variable, present(Value)) :-
ode_parameter(ParamList) :-
biocham_command(*),
type(ParamList, '*'(name = number)),
doc('sets the value of a parameter in the current set of ODEs.'),
get_current_ode_system(Id),
forall(
member(Variable = Value, ParamList),
set_ode_parameters(Id, Variable = Value)
).
set_ode_parameters(Id, K = V) :-
change_item([parent: Id], parameter, K, par(K = V)).
......@@ -516,6 +529,21 @@ ode_parameter_value(K, V) :-
item([parent: Id, kind: parameter, key: K, item: par(K=V)]).
ode_function(FuncList) :-
biocham_command(*),
type(FuncList, '*'(name = arithmetic_expression)),
doc('defines a (parameterless) function in the current set of ODEs.'),
ge
t_current_ode_system(Id),
forall(
member(Function = Definition, FuncList),
set_ode_function(Id, Function = Definition)
).
set_ode_function(Id, Function = Definition) :-
change_item([parent: Id], function, Function, func(Function = Definition)).
......
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