Hello!
This is my first post here, so please forgive me if I do not master all conventions yet.
I plan to add units verification of my model using the available tools from ModelingToolkit.
I was trying to reproduce the example given in ModelingToolkit documentation here :
And in particular the function ModelingToolkit.validate() .
To what I remember, the following example should return TRUE which is not the case, neither from my results nor from the automated REPL of the documentation.
using ModelingToolkit, DynamicQuantities
@parameters τ [unit = u"ms"]
@variables t [unit = u"ms"] E(t) [unit = u"kJ"] P(t) [unit = u"MW"]
D = Differential(t)
eqs = eqs = [D(E) ~ P - E / τ,
0 ~ P]
ModelingToolkit.validate(eqs)
I also tried with a smaller example:
using ModelingToolkit, DynamicQuantities
@parameters τ [unit = u"ms"]
@variables t [unit = u"ms"] E(t) [unit = u"kJ"] P(t) [unit = u"MW"]
D = Differential(t)
eqs = eqs = [t ~ t]
ModelingToolkit.validate(eqs)
Which also returns FALSE.
Should I raise an issue, is it a known error or I am doing something wrong?
Thank you!