Archived OpenModelica forums. Posting is disabled.

Alternative forums include GitHub discussions or StackOverflow (make sure to read the Stack Overflow rules; you need to have well-formed questions)


Forgot password? | Forgot username? | Register

"Not Found in Scope" error

"Not Found in Scope" error

Hi!
I'm trying to create models in OMEdit, but not able to do so properly because it's throwing error - "Not Found in Scope" repeatedly. This was not for just one model, but for different models I tried to create. I'm using linux version of openmodelica - nightly build.
When I tried to create basic electric circuit, I got the set of equations like this - with model name "ele"

model ele
equation
  connect(constantvoltage1.p, ground1.p) annotation(Line(points = {{10, -20}, {-79.9235, -20}, {-79.9235, -29.4455}, {-79.9235, -29.4455}}, color = {0, 0, 255}));
  connect(inductor1.n, constantvoltage1.n) annotation(Line(points = {{50, 40}, {55.8317, 40}, {55.8317, -19.5029}, {30.2103, -19.5029}, {30.2103, -19.5029}}, color = {0, 0, 255}));
  connect(resistor1.n, inductor1.p) annotation(Line(points = {{-10, 40}, {30.5927, 40}, {30.5927, 39.3881}, {30.5927, 39.3881}}, color = {0, 0, 255}));
  connect(ground1.p, resistor1.p) annotation(Line(points = {{-80, -30}, {-80.3059, -30}, {-80.3059, 39.7706}, {-29.8279, 39.7706}, {-29.8279, 39.7706}}, color = {0, 0, 255}));
  annotation(Icon(coordinateSystem(extent = {{-100, -100}, {100, 100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2, 2})), Diagram(coordinateSystem(extent = {{-100, -100}, {100, 100}}, preserveAspectRatio = true, initialScale = 0.1, grid = {2, 2})));
end ele;

I should see the components in the "text view" of model, right? But I'm only seeing equations but not definitions of components.
I'm also attaching the screenshot.
The errors I'm seeing -

[/home/***********/ele.mo:3:3-3:162] Error: Variable constantvoltage1.p not found in scope ele.
[:0:0-0:0] Error: Error occurred while flattening model ele

I remember seeing same kind of errors in different models also, so I suspect this to be a generic problem. Can anybody suggest what i might be doing wrong or is it the problem with OMEdit?
Please let me know.

Thank you in advance.

Re: "Not Found in Scope" error

Please check image of model here -



Edited by: mhire11 - Nov-04-14 00:54:19

Re: "Not Found in Scope" error

Seems related to this bug https://trac.openmodelica.org/OpenModelica/ticket/2943.
Which revision are you using?

Adeel.

Re: "Not Found in Scope" error

Thanks so much for early reply!

I'm not sure if I know correct way to check version of OMEdit.
But in About - I saw this one...
Connected to OpenModelica 1.9.2+dev (r23121)

As I said, I'm using nightly build on debian linux OS, and I do update every now and then. Last time updated was on weekend, Saturday, I think.

Edited by: mhire11 - Nov-04-14 01:11:18

Re: "Not Found in Scope" error

That's the right way to check the revision. So you are in revision 23121 and the bug was fixed in revision 23123.
Time to update again.

Adeel.

Re: "Not Found in Scope" error

I did update, and it seems to be working.. Will let you know if I face problem in future.
thanks so much... current/smile

There are 0 guests and 0 other users also viewing this topic