diff --git a/Project.toml b/Project.toml index 79b499748c..d4c860a252 100644 --- a/Project.toml +++ b/Project.toml @@ -99,7 +99,7 @@ CommonSolve = "0.2.4" Compat = "3.42, 4" ConstructionBase = "1" DataInterpolations = "7, 8" -DataStructures = "0.17, 0.18" +DataStructures = "0.19" DeepDiffs = "1" DelayDiffEq = "5.50" DiffEqBase = "6.170.1" diff --git a/src/ModelingToolkit.jl b/src/ModelingToolkit.jl index 2c259058b0..af4bc5deed 100644 --- a/src/ModelingToolkit.jl +++ b/src/ModelingToolkit.jl @@ -29,6 +29,7 @@ using LinearAlgebra, SparseArrays using InteractiveUtils using JumpProcesses using DataStructures +import DataStructures: IntDisjointSet using Base.Threads using Latexify, Unitful, ArrayInterface using Setfield, ConstructionBase diff --git a/src/systems/alias_elimination.jl b/src/systems/alias_elimination.jl index f24a2562fe..f23a863782 100644 --- a/src/systems/alias_elimination.jl +++ b/src/systems/alias_elimination.jl @@ -426,20 +426,20 @@ function topsort_equations(eqs, unknowns; check = true) q = Queue{Int}(neqs) for (i, d) in enumerate(degrees) - d == 0 && enqueue!(q, i) + d == 0 && push!(q, i) end idx = 0 ordered_eqs = similar(eqs, 0) sizehint!(ordered_eqs, neqs) while !isempty(q) - 𝑠eq = dequeue!(q) + 𝑠eq = popfirst!(q) idx += 1 push!(ordered_eqs, eqs[𝑠eq]) var = assigns[𝑠eq] for 𝑑eq in 𝑑neighbors(graph, var) degree = degrees[𝑑eq] = degrees[𝑑eq] - 1 - degree == 0 && enqueue!(q, 𝑑eq) + degree == 0 && push!(q, 𝑑eq) end end diff --git a/src/systems/connectiongraph.jl b/src/systems/connectiongraph.jl index 5c5e8716c6..348c4ec659 100644 --- a/src/systems/connectiongraph.jl +++ b/src/systems/connectiongraph.jl @@ -452,7 +452,7 @@ function connectionsets(graph::ConnectionGraph) invmap = graph.invmap # union all of the hyperedges - disjoint_sets = IntDisjointSets(length(invmap)) + disjoint_sets = IntDisjointSet(length(invmap)) for edge_i in 𝑠vertices(bigraph) hyperedge = 𝑠neighbors(bigraph, edge_i) isempty(hyperedge) && continue