Opened 8 years ago

Last modified 9 months ago

#4288 closed defect

A submodel is shown in a model diagram while its pathname is wrong and the model doesn't simulate — at Version 9

Reported by: massimo ceraolo Owned by: Per Östlund
Priority: normal Milestone:
Component: Interactive Environment Version:
Keywords: Cc: Adeel Asghar, Adrian Pop, Per Östlund

Description (last modified by massimo ceraolo)

Consider the model InvPwmPQ in the attached package invPwmPkg.
I'm not sure whether its sub-model PwmPulser has a valid pathname.
But whatever the answer OMEdit seems inconsistent:
1) its icon is visible in the InvPwmPQ diagram
2) when the model is checked the following error is issued:

Error
[invPWMPkg: 12:5-12:156]: Class invPWMPkg.PwmPulser not found in scope invPWMPkg.InvPwmPQ.

I think that if PwmPulser is not in scope, its icon should not be visible.

* A later addition: comment 3 explains that PwmPulser is not in scope, and therefore it should not be visible in InvPwmPQ.

Change History (10)

by massimo ceraolo, 8 years ago

Attachment: invPWMPkg.mo added

comment:1 by Adeel Asghar, 8 years ago

Cc: Per Östlund Adrian Pop added

comment:2 by Adeel Asghar, 8 years ago

Cc: Adeel Asghar added; Per Östlund removed
Owner: changed from Adeel Asghar to Per Östlund
Status: newassigned

comment:3 by Per Östlund, 8 years ago

Cc: Per Östlund added; Adeel Asghar removed

The model is invalid, because looking up invPWMPkg requires going to the scope outside invPWMPkg. But since invPWMPkg is encapsulated that's not allowed. So to fix the model, just remove the invPWMPkg prefix from the pwmPulser component.

The icon lookup doesn't seem to follow those rules though, so that should be fixed.

comment:4 by Per Östlund, 8 years ago

Cc: Adeel Asghar added; Per Östlund removed

comment:5 by massimo ceraolo, 8 years ago

Ah. I did see that removing invPWMPkg prefix made the model solvable, but failed to track down this to the encapsulated keyword.
Naturally, the core of this ticket was consistency in OM behaviour (so perost's last sentence).

I must add that I'me pretty sure that somehow invPWMPkg prefix was created by OMEdit itself. If confirmed, that is another issue. I will try to produce an example to reproduce this.

Last edited 5 years ago by massimo ceraolo (previous) (diff)

comment:6 by Adeel Asghar, 7 years ago

Milestone: 1.12.01.13.0

comment:7 by Francesco Casella, 6 years ago

Milestone: 1.13.01.14.0

Rescheduled to 1.14.0 after 1.13.0 releasee

comment:8 by Francesco Casella, 5 years ago

Milestone: 1.14.01.16.0

Releasing 1.14.0 which is stable and has many improvements w.r.t. 1.13.2. This issue is rescheduled to 1.16.0

comment:9 by massimo ceraolo, 5 years ago

Description: modified (diff)
Summary: A path issueA submodel is shown in a model diagram while its pathname is wrong and the model doesn't simulate
Note: See TracTickets for help on using tickets.