Skip to content

Commit 1c334ac

Browse files
fix: convert constraints to appropriate type
1 parent 0fecf64 commit 1c334ac

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/systems/system.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -235,7 +235,7 @@ function System(eqs::Vector{Equation}, iv; kwargs...)
235235
collect_vars!(allunknowns, ps, eq, iv)
236236
end
237237

238-
cstrs = get(kwargs, :constraints, Equation[])
238+
cstrs = Vector{Union{Equation, Inequality}}(get(kwargs, :constraints, []))
239239
cstrunknowns, cstrps = process_constraint_system(cstrs, allunknowns, ps, iv)
240240
union!(allunknowns, cstrunknowns)
241241
union!(ps, cstrps)
@@ -324,7 +324,7 @@ end
324324
Process variables in constraints of the (ODE) System.
325325
"""
326326
function process_constraint_system(
327-
constraints::Vector{Equation}, sts, ps, iv; consname = :cons)
327+
constraints::Vector{Union{Equation, Inequality}}, sts, ps, iv; consname = :cons)
328328
isempty(constraints) && return Set(), Set()
329329

330330
constraintsts = OrderedSet()

0 commit comments

Comments
 (0)