diff --git a/Project.toml b/Project.toml index d5addf3399..3a005fedec 100644 --- a/Project.toml +++ b/Project.toml @@ -98,7 +98,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.61" DiffEqBase = "6.189.1" diff --git a/src/ModelingToolkit.jl b/src/ModelingToolkit.jl index 4f29c5f428..dd8562340c 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 99110e37e9..27e542c2ab 100644 --- a/src/systems/connectiongraph.jl +++ b/src/systems/connectiongraph.jl @@ -455,7 +455,7 @@ function connectionsets(graph::HyperGraph{V}) where {V} 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