Open
Description
The example below creates a discrete-time system with a boolean discrete-time variable, it fails with
julia> prob = DiscreteProblem(sys, [], (0,10))
ERROR: MethodError: no method matching !(::Float64)
function Model(; name)
@variables begin
x(t)::Bool = true
end
equations = [
x(k) ~ !x(k-1)
]
DiscreteSystem(equations, t; name)
end
@mtkbuild sys = Model()
prob = DiscreteProblem(sys, [], (0,10))
sol = solve(prob, FunctionMap())
x = sol[sys.x(k+1)]
@test eltype(x) <: Bool