From ad96d9a25c95eb04b03f3f29f94118533fc8fa5d Mon Sep 17 00:00:00 2001 From: Aayush Sabharwal Date: Wed, 31 Jul 2024 12:05:43 +0530 Subject: [PATCH 1/2] fix: fix syntax error in linearization_function --- src/systems/abstractsystem.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/systems/abstractsystem.jl b/src/systems/abstractsystem.jl index 11292752cc..e8f8f26e99 100644 --- a/src/systems/abstractsystem.jl +++ b/src/systems/abstractsystem.jl @@ -2167,7 +2167,7 @@ function linearization_function(sys::AbstractSystem, inputs, u_getter = isempty(unknowns(initsys)) ? (_...) -> nothing : build_explicit_observed_function( sys, unknowns(initsys); eval_expression, eval_module) - get_initprob_u_p = let p_getter, + get_initprob_u_p = let p_getter = p_getter, p_setter! = setp(initsys, initsys_ps), u_getter = u_getter From beeaab2eda55316f4d606a18599d070a52bb6906 Mon Sep 17 00:00:00 2001 From: Aayush Sabharwal Date: Wed, 31 Jul 2024 13:05:10 +0530 Subject: [PATCH 2/2] fix: fix incorrect function calls in linearization_function --- src/systems/abstractsystem.jl | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/systems/abstractsystem.jl b/src/systems/abstractsystem.jl index e8f8f26e99..eee856f897 100644 --- a/src/systems/abstractsystem.jl +++ b/src/systems/abstractsystem.jl @@ -2172,9 +2172,8 @@ function linearization_function(sys::AbstractSystem, inputs, u_getter = u_getter function (u, p, t) - state = ProblemState(; u, p, t) - p_setter!(oldps, p_getter(state)) - newu = u_getter(state) + p_setter!(oldps, p_getter(u, p..., t)) + newu = u_getter(u, p, t) return newu, oldps end end