Skip to content

Commit 37caa8b

Browse files
committed
Add isconnection
1 parent 300f1aa commit 37caa8b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/systems/connectors.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
using Symbolics: StateMachineOperator
2+
isconnection(_) = false
3+
isconnection(_::Connection) = true
24
"""
35
domain_connect(sys1, sys2, syss...)
46
@@ -327,7 +329,7 @@ function generate_connection_set!(connectionsets, domain_csets,
327329
else
328330
if lhs isa Connection && get_systems(lhs) === :domain
329331
connection2set!(domain_csets, namespace, get_systems(rhs), isouter)
330-
elseif lhs isa Connection
332+
elseif isconnection(rhs)
331333
push!(cts, get_systems(rhs))
332334
else
333335
push!(eqs, eq) # split connections and equations

0 commit comments

Comments
 (0)