#5674 closed defect (fixed)
The NF does not count variables correctly when conditional components are involved
| Reported by: | Francesco Casella | Owned by: | Per Östlund |
|---|---|---|---|
| Priority: | high | Milestone: | 1.16.0 |
| Component: | New Instantiation | Version: | |
| Keywords: | Cc: |
Description
Consider the following test model
model Test
extends Modelica.Blocks.Interfaces.SO;
parameter Boolean use_u = true;
Modelica.Blocks.Interfaces.RealInput u if use_u;
protected
Modelica.Blocks.Interfaces.RealInput u_internal;
equation
y = u_internal;
connect(u, u_internal) "Automatically removed if u is disabled";
if not use_u then
u_internal = 0;
end if;
end Test;
The model is balanced and works correctly. However, if I check it I get:
Class Test has 2 equation(s) and 1 variable(s).
I understand the reason is that the NF ignores the fact that u_internal is protected and thus incorrectly removes it from the set of unknown variables.
Change History (5)
comment:1 by , 6 years ago
| Component: | New Instantiation → Frontend |
|---|---|
| Status: | new → accepted |
comment:2 by , 6 years ago
| Resolution: | → fixed |
|---|---|
| Status: | accepted → closed |
comment:4 by , 5 years ago
| Milestone: | 1.15.0 → 1.16.0 |
|---|
Release 1.15.0 was scrapped, because replaceable support eventually turned out to be more easily implemented in 1.16.0. Hence, all 1.15.0 tickets are rescheduled to 1.16.0
comment:5 by , 5 years ago
| Component: | Frontend → New Instantiation |
|---|
Note:
See TracTickets
for help on using tickets.

Maybe fixed in #503.
This isn't actually a NF issue, but an issue with CheckModel which operates on the DAE after the NF is done. You get the same result when using the OF in fact.