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
Describe the bug 🐞
I'm really sorry for spamming your issue tracker, but I'll provide MWEs at least...
A simplified system has weird behaviour for hasproperty and getproperty: namely it might lie about properties being present or not present!
Expected behavior
hasproperty true => getproperty does not error
hasproperty false => getproperty errors
Minimal Reproducible Example 👇
using ModelingToolkit
using ModelingToolkit: t_nounits as t, D_nounits as Dt
@mtkmodel Inner begin
@parameters begin
p
end
end
@mtkmodel Outer begin
@components begin
inner = Inner()
end
@variables begin
x(t)
end
@equations begin
x ~ inner.p
end
end
@named outer = Outer()
simp = structural_simplify(outer)
hasproperty(outer, :inner) # true
outer.inner # works
hasproperty(outer, :inner₊p) # false
outer.inner₊p # errors as expected
hasproperty(simp, :inner) # false
simp.inner # still works
hasproperty(simp, :inner₊p) # true
inner.inner₊p # errors despite hasproperty true
Describe the bug 🐞 I'm really sorry for spamming your issue tracker, but I'll provide MWEs at least...
A simplified system has weird behaviour for
hasproperty
andgetproperty
: namely it might lie about properties being present or not present!Expected behavior
Minimal Reproducible Example 👇
Error & Stacktrace ⚠️
Environment (please complete the following information):
using Pkg; Pkg.status()
versioninfo()