Commit 50a13085 authored by Hemery Mathieu's avatar Hemery Mathieu
Browse files

Add a simplification layer when reading derivatives

parent 68053144
...@@ -198,9 +198,11 @@ read_xpp_line(Line_raw, _Split, Id) :- ...@@ -198,9 +198,11 @@ read_xpp_line(Line_raw, _Split, Id) :-
atomic_list_concat(['d',Sub.1,'/dt = ',Sub.2], Line) atomic_list_concat(['d',Sub.1,'/dt = ',Sub.2], Line)
), ),
!, !,
read_term_from_codes(Line, Expr, [variable_names(VariableNames), module(ode)]), read_term_from_codes(Line, DX = Expr, [variable_names(VariableNames), module(ode)]),
name_variables_and_anonymous(Expr, VariableNames), name_variables_and_anonymous(DX = Expr, VariableNames),
add_ode(Id, Expr), distribute(Expr, Expanded),
simplify(Expanded, Clear_Expr),
add_ode(Id, DX = Clear_Expr),
fail. fail.
read_xpp_line(Line, _Split, Id) :- read_xpp_line(Line, _Split, Id) :-
......
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