Skip to content

Commit 9c92817

Browse files
add a few missing methods for a patch
1 parent a4180ed commit 9c92817

File tree

4 files changed

+5
-2
lines changed

4 files changed

+5
-2
lines changed

Diff for: Project.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "ModelingToolkit"
22
uuid = "961ee093-0014-501f-94e3-6117800e7a78"
33
authors = ["Chris Rackauckas <[email protected]>"]
4-
version = "1.1.1"
4+
version = "1.1.2"
55

66
[deps]
77
DiffEqBase = "2b5f629d-d688-5b77-993f-72d75c75574e"

Diff for: src/operations.jl

+1
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ Base.isequal(::Constant , ::Operation) = false
5757
Base.show(io::IO, O::Operation) = print(io, convert(Expr, O))
5858

5959
# For inv
60+
Base.convert(::Type{Operation}, x::Bool) = Operation(identity, Expression[Constant(x)])
6061
Base.convert(::Type{Operation}, x::Number) = Operation(identity, Expression[Constant(x)])
6162
Base.convert(::Type{Operation}, x::Operation) = x
6263
Base.convert(::Type{Operation}, x::Expression) = Operation(identity, Expression[x])

Diff for: src/systems/diffeqs/diffeqsystem.jl

+1-1
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@ Create an `ODEFunction` from the [`ODESystem`](@ref). The arguments `dvs` and `p
217217
are used to set the order of the dependent variable and parameter vectors,
218218
respectively.
219219
"""
220-
function DiffEqBase.ODEFunction{iip}(sys::ODESystem, dvs, ps;
220+
function DiffEqBase.ODEFunction{iip}(sys::ODESystem, dvs = sys.dvs, ps = sys.ps;
221221
version = nothing,
222222
jac = false, Wfact = false) where {iip}
223223
f_oop,f_iip = generate_function(sys, dvs, ps, Val{false})

Diff for: src/utils.jl

+2
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@ function Base.convert(::Type{Expression}, ex::Expr)
1212
end
1313
Base.convert(::Type{Expression}, x::Expression) = x
1414
Base.convert(::Type{Expression}, x::Number) = Constant(x)
15+
Base.convert(::Type{Expression}, x::Bool) = Constant(x)
16+
Expression(x::Bool) = Constant(x)
1517

1618
function build_expr(head::Symbol, args)
1719
ex = Expr(head)

0 commit comments

Comments
 (0)