Modia.jl
Modia.jl copied to clipboard
Issue with equations which have multiplication (solved: set removeSingularities = false)
I have this strange behavior. I use Modia 0.2.3-beta.5 with ModiaMath 0.3.0. The following simple model simulates fine:
using Modia
@model PartialTest begin
a = Float()
b = Float()
c = Float()
d = Float()
e = Float()
@equations begin
a = 0.1
b = 1
d = 0.1
0 = d+e
b+a = c
end
end;
but when I switch the last equation "b+a=c" into "b*a=c", I got this error:
Simulating model: PartialTest
ERROR: The number of scalarized unknowns (= 5) is not equal to the number of scalarized equations (= 6).
Thank you!
If I set 'elaborate' to false in ModelElaboration.jl, then it simulates just fine.
Thank you for pointing this out. This shows an error in a feature to remove singularities for certain models. In this case you can turn off this feature: simulate(PartialTest, 1, logTranslation=true, removeSingularities=false)