Skip to content

Commit ddb385a

Browse files
feat: add ignored_connections field to ODESystem
1 parent a553fd1 commit ddb385a

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/systems/abstractsystem.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -878,6 +878,7 @@ for prop in [:eqs
878878
:assertions
879879
:solved_unknowns
880880
:split_idxs
881+
:ignored_connections
881882
:parent
882883
:is_dde
883884
:tstops

src/systems/diffeqs/odesystem.jl

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,12 @@ struct ODESystem <: AbstractODESystem
189189
"""
190190
split_idxs::Union{Nothing, Vector{Vector{Int}}}
191191
"""
192+
The connections to ignore (since they're removed by analysis point transformations).
193+
The first element of the tuple are systems that can't be in the same connection set,
194+
and the second are variables (for the trivial form of `connect`).
195+
"""
196+
ignored_connections::Union{Nothing, Tuple{Vector{ODESystem}, Vector{BasicSymbolic}}}
197+
"""
192198
The hierarchical parent system before simplification.
193199
"""
194200
parent::Any
@@ -203,7 +209,8 @@ struct ODESystem <: AbstractODESystem
203209
tstops = [], tearing_state = nothing,
204210
substitutions = nothing, complete = false, index_cache = nothing,
205211
discrete_subsystems = nothing, solved_unknowns = nothing,
206-
split_idxs = nothing, parent = nothing; checks::Union{Bool, Int} = true)
212+
split_idxs = nothing, ignored_connections = nothing, parent = nothing;
213+
checks::Union{Bool, Int} = true)
207214
if checks == true || (checks & CheckComponents) > 0
208215
check_independent_variables([iv])
209216
check_variables(dvs, iv)
@@ -221,7 +228,7 @@ struct ODESystem <: AbstractODESystem
221228
initializesystem, initialization_eqs, schedule, connector_type, preface,
222229
cevents, devents, parameter_dependencies, assertions, metadata,
223230
gui_metadata, is_dde, tstops, tearing_state, substitutions, complete, index_cache,
224-
discrete_subsystems, solved_unknowns, split_idxs, parent)
231+
discrete_subsystems, solved_unknowns, split_idxs, ignored_connections, parent)
225232
end
226233
end
227234

0 commit comments

Comments
 (0)