An acausal modeling framework for automatically parallelized scientific machine learning (SciML) in Julia. A computer algebra system for integrated symbolics for physics-informed machine learning and automated transformations of differential equations
Trying to obtain a parameter that doesn't exist gives error: ERROR: ArgumentError: invalid index: nothing of type Nothing, see MWE below.
Would be nice to throw an error that the parameter does not exist at the moment we do
i = SymbolicIndexingInterface.getp(prob, index)
and explicitly include index in the error message.
MWE:
using ModelingToolkit
@variables t
D = Differential(t)
@mtkmodel Roessler begin
@parameters begin
a = 0.2
b = 0.2
c = 5.7
end
@variables begin
x(t) = 1.0
y(t) = 0.0
z(t) = 0.0
nlt(t) # nonlinear term
end
@equations begin
D(x) ~ -y -z
D(y) ~ x + a*y
D(z) ~ b + nlt
nlt ~ z*(x - c)
end
end
@mtkbuild roessler_model = Roessler()
prob = ODEProblem(roessler_model)
ModelingToolkit.getp(prob, :τ)(parameters(prob))
Trying to obtain a parameter that doesn't exist gives error:
ERROR: ArgumentError: invalid index: nothing of type Nothing
, see MWE below.Would be nice to throw an error that the parameter does not exist at the moment we do
and explicitly include
index
in the error message.MWE: