From d6cc7bf9896e7af2ac58fc1ef2807c2b744f45a7 Mon Sep 17 00:00:00 2001 From: Yingbo Ma Date: Tue, 12 Sep 2023 15:40:04 -0400 Subject: [PATCH] Fix input output handling --- src/ModelingToolkit.jl | 2 +- src/systems/diffeqs/odesystem.jl | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/ModelingToolkit.jl b/src/ModelingToolkit.jl index 89dee632f4..16e9ab6548 100644 --- a/src/ModelingToolkit.jl +++ b/src/ModelingToolkit.jl @@ -3,7 +3,7 @@ $(DocStringExtensions.README) """ module ModelingToolkit using PrecompileTools, Reexport -@recompile_invalidations begin +@recompile_invalidations begin using DocStringExtensions using Compat using AbstractTrees diff --git a/src/systems/diffeqs/odesystem.jl b/src/systems/diffeqs/odesystem.jl index 0abf12d26e..76c6c4a58a 100644 --- a/src/systems/diffeqs/odesystem.jl +++ b/src/systems/diffeqs/odesystem.jl @@ -386,9 +386,8 @@ function build_explicit_observed_function(sys, ts; push!(obsexprs, lhs ← rhs) end - pars = parameters(sys) if inputs !== nothing - pars = setdiff(pars, inputs) # Inputs have been converted to parameters by io_preprocessing, remove those from the parameter list + ps = setdiff(ps, inputs) # Inputs have been converted to parameters by io_preprocessing, remove those from the parameter list end if ps isa Tuple ps = DestructuredArgs.(ps, inbounds = !checkbounds)