- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » OM rev13094 seems to have an issue...
OM rev13094 seems to have an issue with asserts
OM rev13094 seems to have an issue with asserts
Hello,
I updated to rev13094 and suddenly models with assert statements assert(condition, message); do not simulate any more. There appears the following message:
Error: Variable AssertionLevel.error not found in scope myModel containing the assert statement
After commenting the assert statement the model works again!
In rev12691 everything is working fine.
Anybody else having the same problem?
Thanks, Fritz
Re: OM rev13094 seems to have an issue with asserts
Hi again ,
just found out that this error message has something to do with encapsulated packages:
try the following test model which is located inside the encapsulated package "OMTest":
Hence assuming a library structure you would have a folder containing
- a file "package.mo":
encapsulated package OMTest "OpenModelica Test Library"
end OMTest;
- and a file "AssertTest.mo":
within OMTest;
model AssertTest
Real x;
equation
assert(x>1,"message");
x = 10;
end AssertTest;
when trying to simulate, following error comes:
Error: Variable AssertionLevel.error not found in scope OMTest.AssertTest
Error: Error occurred while flattening model OMTest.AssertTest
by removing "encapsulated" everything works.
Re: OM rev13094 seems to have an issue with asserts
- sjoelund.se
- 1700 Posts
- Index
- » Usage and Applications
- » OpenModelica Usage and Applications
- » OM rev13094 seems to have an issue...