Skip to content

Commit 404ef9e

Browse files
committed
Add assign, inv_assign, scc, and partitions
1 parent 8a86729 commit 404ef9e

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

src/systems/systemstructure.jl

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,25 @@ struct SystemStructure
3333
varassoc::Vector{Int}
3434
graph::BipartiteGraph{Int}
3535
solvable_graph::BipartiteGraph{Int}
36+
assign::Vector{Int}
37+
inv_assign::Vector{Int}
38+
scc::Vector{Vector{Int}}
39+
partitions::Vector{NTuple{4, Vector{Int}}}
3640
end
3741

3842
function initialize_system_structure(sys)
3943
sys, dxvar_offset, fullvars, varassoc, graph, solvable_graph = init_graph(flatten(sys))
40-
@set sys.structure = SystemStructure(dxvar_offset, fullvars, varassoc, graph, solvable_graph)
44+
@set sys.structure = SystemStructure(
45+
dxvar_offset,
46+
fullvars,
47+
varassoc,
48+
graph,
49+
solvable_graph,
50+
Int[],
51+
Int[],
52+
Vector{Int}[],
53+
NTuple{4, Vector{Int}}[]
54+
)
4155
end
4256

4357
function Base.show(io::IO, s::SystemStructure)

test/simplify.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ d3 = Differential(x)(d2)
3535
@test ModelingToolkit.substitute(2x + y == 1, Dict(x => 0.0, y => 1.0)) === true
3636

3737
# 699
38-
using SymbolicUtils: value, substitute
38+
using SymbolicUtils: substitute
3939
@parameters t a(t) b(t)
4040

4141
# back and forth substitution does not work for parameters with dependencies

0 commit comments

Comments
 (0)