Skip to content

Commit 0230168

Browse files
fix: make ignored causal connections affect equivalent Equality connections
1 parent 9153443 commit 0230168

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/systems/connectors.jl

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -468,6 +468,16 @@ function _generate_connectionsets!(connection_state::AbstractConnectionState,
468468
[namespace; var_ns], length(var_ns) == 1 || isouter(var_ns[1]), type)
469469
end
470470
add_connection_edge!(connection_state, hyperedge)
471+
472+
# Removed analysis points generate causal connections in the negative graph. These
473+
# should also remove `Equality` connections involving the same variables, so also
474+
# add an `Equality` variant of the edge.
475+
if connection_state isa NegativeConnectionState
476+
hyperedge = map(hyperedge) do cvert
477+
ConnectionVertex(cvert.name, cvert.isouter, Equality)
478+
end
479+
add_connection_edge!(connection_state, hyperedge)
480+
end
471481
end
472482
end
473483

@@ -609,6 +619,7 @@ function generate_connection_set(sys::AbstractSystem)
609619
sys = toggle_namespacing(sys, false)
610620
sys = generate_connection_set!(
611621
connection_state, negative_connection_state, sys, Symbol[])
622+
Main.@infiltrate
612623
remove_negative_connections!(connection_state, negative_connection_state)
613624

614625
return sys, connectionsets(connection_state)

0 commit comments

Comments
 (0)