Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#5565 closed defect (fixed)

OMEdit generates bogus warnings about missing inner declarations when opening MultiBody models

Reported by: Francesco Casella Owned by: Adrian Pop
Priority: blocker Milestone: 1.14.0
Component: NF API Version:
Keywords: Cc: Adrian Pop, Per Östlund

Description

Steps to reproduce:

  • Start OMEdit
  • Open Modelica.Multibody.Examples.Elementary.SpringDamperSystem

The following warnings are reported

[1] 22:59:19 Translation Warning
[Modelica.Mechanics.MultiBody.Parts: 765:5-765:51]: An inner declaration for outer component world could not be found and was automatically generated.

[2] 22:59:20 Translation Warning
[Modelica.Mechanics.MultiBody.Parts: 215:5-215:51]: An inner declaration for outer component world could not be found and was automatically generated.

[3] 22:59:20 Translation Warning
[Modelica.Mechanics.MultiBody.Interfaces: 416:5-416:51]: An inner declaration for outer component world could not be found and was automatically generated.

[4] 22:59:20 Translation Warning
[Modelica.Mechanics.MultiBody.Interfaces: 416:5-416:51]: An inner declaration for outer component world could not be found and was automatically generated.

[5] 22:59:20 Translation Warning
[Modelica.Mechanics.MultiBody.Interfaces: 285:5-285:51]: An inner declaration for outer component world could not be found and was automatically generated.

[6] 22:59:21 Translation Warning
[Modelica.Mechanics.MultiBody.Interfaces: 285:5-285:51]: An inner declaration for outer component world could not be found and was automatically generated.

[7] 22:59:21 Translation Warning
[Modelica.Mechanics.MultiBody.Interfaces: 285:5-285:51]: An inner declaration for outer component world could not be found and was automatically generated.

[8] 22:59:21 Translation Warning
[Modelica.Mechanics.MultiBody.Interfaces: 285:5-285:51]: An inner declaration for outer component world could not be found and was automatically generated.

[9] 22:59:21 Translation Warning
[Modelica.Mechanics.MultiBody.Interfaces: 285:5-285:51]: An inner declaration for outer component world could not be found and was automatically generated.

[10] 22:59:21 Translation Warning
[Modelica.Mechanics.MultiBody.Interfaces: 285:5-285:51]: An inner declaration for outer component world could not be found and was automatically generated.

The following notifications are also reported:

[1] 22:59:19 Translation Notification
[Modelica.Mechanics.MultiBody.Parts: 765:5-765:51]: The diagnostics message for the missing inner is: No "world" component is defined. A default world
component with the default gravity field will be used
(g=9.81 in negative y-axis). If this is not desired,
drag Modelica.Mechanics.MultiBody.World into the top level of your model.

[2] 22:59:20 Translation Notification
[Modelica.Mechanics.MultiBody.Parts: 215:5-215:51]: The diagnostics message for the missing inner is: No "world" component is defined. A default world
component with the default gravity field will be used
(g=9.81 in negative y-axis). If this is not desired,
drag Modelica.Mechanics.MultiBody.World into the top level of your model.

[3] 22:59:20 Translation Notification
[Modelica.Mechanics.MultiBody.Interfaces: 416:5-416:51]: The diagnostics message for the missing inner is: No "world" component is defined. A default world
component with the default gravity field will be used
(g=9.81 in negative y-axis). If this is not desired,
drag Modelica.Mechanics.MultiBody.World into the top level of your model.

[4] 22:59:20 Translation Notification
[Modelica.Mechanics.MultiBody.Interfaces: 416:5-416:51]: The diagnostics message for the missing inner is: No "world" component is defined. A default world
component with the default gravity field will be used
(g=9.81 in negative y-axis). If this is not desired,
drag Modelica.Mechanics.MultiBody.World into the top level of your model.

[5] 22:59:20 Translation Notification
[Modelica.Mechanics.MultiBody.Interfaces: 285:5-285:51]: The diagnostics message for the missing inner is: No "world" component is defined. A default world
component with the default gravity field will be used
(g=9.81 in negative y-axis). If this is not desired,
drag Modelica.Mechanics.MultiBody.World into the top level of your model.

[6] 22:59:21 Translation Notification
[Modelica.Mechanics.MultiBody.Interfaces: 285:5-285:51]: The diagnostics message for the missing inner is: No "world" component is defined. A default world
component with the default gravity field will be used
(g=9.81 in negative y-axis). If this is not desired,
drag Modelica.Mechanics.MultiBody.World into the top level of your model.

[7] 22:59:21 Translation Notification
[Modelica.Mechanics.MultiBody.Interfaces: 285:5-285:51]: The diagnostics message for the missing inner is: No "world" component is defined. A default world
component with the default gravity field will be used
(g=9.81 in negative y-axis). If this is not desired,
drag Modelica.Mechanics.MultiBody.World into the top level of your model.

[8] 22:59:21 Translation Notification
[Modelica.Mechanics.MultiBody.Interfaces: 285:5-285:51]: The diagnostics message for the missing inner is: No "world" component is defined. A default world
component with the default gravity field will be used
(g=9.81 in negative y-axis). If this is not desired,
drag Modelica.Mechanics.MultiBody.World into the top level of your model.

[9] 22:59:21 Translation Notification
[Modelica.Mechanics.MultiBody.Interfaces: 285:5-285:51]: The diagnostics message for the missing inner is: No "world" component is defined. A default world
component with the default gravity field will be used
(g=9.81 in negative y-axis). If this is not desired,
drag Modelica.Mechanics.MultiBody.World into the top level of your model.

[10] 22:59:21 Translation Notification
[Modelica.Mechanics.MultiBody.Interfaces: 285:5-285:51]: The diagnostics message for the missing inner is: No "world" component is defined. A default world
component with the default gravity field will be used
(g=9.81 in negative y-axis). If this is not desired,
drag Modelica.Mechanics.MultiBody.World into the top level of your model.

These messages are totally bogus, since the model indeed contains an inner World world declaration. As usual, this gives an impression of overall sloppiness.

Is it possible to get rid of them?

Change History (17)

comment:1 by Adrian Pop, 5 years ago

I let the -d=nfAPI show all the errors and warnings so we can catch issues. I will suppress them and one could re-show them using -d=nfAPINoise.

in reply to:  1 comment:2 by Francesco Casella, 5 years ago

Owner: changed from Adeel Asghar to Adrian Pop
Status: newassigned

Replying to adrpo:

I let the -d=nfAPI show all the errors and warnings so we can catch issues.

You mean issues with the NF API or issues with the model. In this case, the model should have no issues at all...

I will suppress them and one could re-show them using -d=nfAPINoise.

OK

comment:3 by Adrian Pop, 5 years ago

The errors you are seeing are from fetching all the class information, annotations, type of components, inherited classes. Yes, the model would not give these errors but these are from gathering all the information. You could have a look in the omeditcommunication log to see where they are actually coming from, from which API call.

comment:4 by Francesco Casella, 5 years ago

I still wonder why the compiler complains about the missing world component. Isn't it there?

comment:5 by Adrian Pop, 5 years ago

Because is not for that model those messages are reported, they are reported for:
Modelica.Mechanics.MultiBody.Parts and Modelica.Mechanics.MultiBody.Interfaces.

in reply to:  5 comment:6 by Francesco Casella, 5 years ago

Replying to adrpo:

Because is not for that model those messages are reported, they are reported for:
Modelica.Mechanics.MultiBody.Parts and Modelica.Mechanics.MultiBody.Interfaces.

OK, I see. Then, it's a good idea to just suppress them for good, as you suggested.

comment:7 by Adeel Asghar, 5 years ago

Component: OMEditNF API

comment:8 by Adrian Pop, 5 years ago

Component: NF APIOMEdit

Should be fixed by PR: https://github.com/OpenModelica/OpenModelica/pull/323
Probably some tests need updates, we'll see which.

comment:9 by Adrian Pop, 5 years ago

Component: OMEditNF API
Resolution: fixed
Status: assignedclosed

comment:10 by Francesco Casella, 5 years ago

Very nice, no more bogus warnings :)

comment:11 by Francesco Casella, 5 years ago

Resolution: fixed
Status: closedreopened

Unfortunately, I still get some bogus messages:

[1] 11:00:45 Translation Avvertimento
[Modelica.Mechanics.MultiBody.Parts: 215:5-215:51]: An inner declaration for outer component world could not be found and was automatically generated.

[2] 11:00:45 Translation Notification
[Modelica.Mechanics.MultiBody.Parts: 215:5-215:51]: The diagnostics message for the missing inner is: No "world" component is defined. A default world
component with the default gravity field will be used
(g=9.81 in negative y-axis). If this is not desired,
drag Modelica.Mechanics.MultiBody.World into the top level of your model.

when opening Modelica.Mechanics.MultiBody.Examples.Loops.EngineV6_analytic.

comment:12 by Adrian Pop, 5 years ago

Resolution: fixed
Status: reopenedclosed

comment:13 by Francesco Casella, 5 years ago

More bogus messages: opening Modelica.Fluid.Examples.HeatingSystems gives:

[1] 23:23:07 Translation Error
[Modelica.Fluid.Machines: 400:5-400:82]: 
Medium is partial, name lookup is not allowed in partial classes.

[2] 23:23:07 Translation Error
[Modelica.Fluid.Machines: 400:5-400:82]: 
Medium is partial, name lookup is not allowed in partial classes.

comment:14 by Francesco Casella, 5 years ago

Resolution: fixed
Status: closedreopened

comment:15 by Adrian Pop, 5 years ago

comment:16 by Adrian Pop, 5 years ago

Resolution: fixed
Status: reopenedclosed

comment:17 by Francesco Casella, 5 years ago

Double-checked, all's fine :)

Note: See TracTickets for help on using tickets.