Skip to content

Commit dc70f88

Browse files
committed
Redefine the discrete_compile interface a bit
1 parent 24bf381 commit dc70f88

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/systems/systemstructure.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -727,7 +727,7 @@ function structural_simplify!(state::TearingState, io = nothing; simplify = fals
727727
discrete_pass_idx = findfirst(discrete_compile_pass, additional_passes)
728728
discrete_compile = additional_passes[discrete_pass_idx]
729729
deleteat!(additional_passes, discrete_pass_idx)
730-
return discrete_compile(tss, inputs)
730+
return discrete_compile(tss, inputs, ci)
731731
else
732732
# error goes here! this is a purely discrete system
733733
throw(HybridSystemNotSupportedException("Discrete systems without JuliaSimCompiler are currently not supported in ODESystem."))
@@ -749,7 +749,7 @@ function structural_simplify!(state::TearingState, io = nothing; simplify = fals
749749
deleteat!(additional_passes, discrete_pass_idx)
750750
# in the case of a hybrid system, the discrete_compile pass should take the currents of sys.discrete_subsystems
751751
# and modifies discrete_subsystems to bea tuple of the io and anything else, while adding or manipulating the rest of sys as needed
752-
sys = discrete_compile(sys, tss[2:end], inputs)
752+
sys = discrete_compile(sys, tss[[i for i in eachindex(tss) if i != continuous_id]], inputs, ci)
753753
else
754754
throw(HybridSystemNotSupportedException("Hybrid continuous-discrete systems are currently not supported with the standard MTK compiler. This system requires JuliaSimCompiler.jl, see https://help.juliahub.com/juliasimcompiler/stable/"))
755755
end

0 commit comments

Comments
 (0)