Skip to content

Commit 1284f9c

Browse files
authored
Merge pull request #775 from SciML/myb/sl
issymbollike
2 parents c107932 + 94d9887 commit 1284f9c

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

Project.toml

Lines changed: 1 addition & 1 deletion
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 = "5.3.0"
4+
version = "5.3.1"
55

66
[deps]
77
ArrayInterface = "4fba245c-0d91-5ea0-9b3e-6abc04ee57a9"

src/ModelingToolkit.jl

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
module ModelingToolkit
22

3-
using DiffEqBase, Distributed
3+
using DiffEqBase, SciMLBase
4+
using Distributed
45
using StaticArrays, LinearAlgebra, SparseArrays, LabelledArrays
56
using Latexify, Unitful, ArrayInterface
67
using MacroTools
@@ -55,6 +56,8 @@ Num(x::Num) = x # ideally this should never be called
5556
value(x) = x
5657
value(x::Num) = x.val
5758

59+
SciMLBase.issymbollike(::Num) = true
60+
SciMLBase.issymbollike(::SymbolicUtils.Symbolic) = true
5861

5962
SymbolicUtils.@number_methods(Num,
6063
Num(f(value(a))),

test/optimizationsystem.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,4 +53,4 @@ _p = [1.0, 100.0]
5353

5454
f = OptimizationFunction(rosenbrock,ModelingToolkit.AutoModelingToolkit(),x0,_p,grad=true,hess=true)
5555
prob = OptimizationProblem(f,x0,_p)
56-
sol = solve(prob,Optim.Newton()
56+
sol = solve(prob,Optim.Newton())

0 commit comments

Comments
 (0)