Opened 8 years ago

Last modified 3 years ago

#4412 accepted defect

Error with Protected Elements

Reported by: timo.lask@… Owned by: Lennart Ochel
Priority: high Milestone:
Component: Backend Version: v1.12.0
Keywords: protected, PNlib Cc:

Description

In the following model

model ProtectedError
  Real var1;
protected
  Real var2 = 1;
equation
  var1 = var2;
end ProtectedError;

should be prevented by the keyword protected that the variable var2 is displayed in the output of OMEdit.

However, both variables var1 and var2 are displayed.

Change History (10)

comment:1 by Lennart Ochel, 8 years ago

Component: *unknown*Backend
Milestone: Future1.12.0
Status: newaccepted

comment:2 by Jan Kokert, 8 years ago

Good ticket!
Observation: if in line 6 var1 = var2; is replaced with var1 = 42; the variable is not shown (correctly protected).

There is a somewhat related ticket: #4346

comment:3 by Lennart Ochel, 8 years ago

I’ve fixed this partially (OMCompiler#1644). There is still one case in which a protected variable is dumped to the result file: The correspondent variable to an alias variable having protected=false is always dumped to the result file in order to allow the lookup of the alias variable.

Is this behaviour acceptable?

comment:4 by timo.lask@…, 8 years ago

It greatly reduces the number of variables displayed in my models and is therefore, in my opinion, acceptable.

comment:5 by Francesco Casella, 7 years ago

Milestone: 1.12.01.13.0

Milestone moved to 1.13.0 due to 1.12.0 already being released.

comment:6 by Francesco Casella, 6 years ago

Milestone: 1.13.01.14.0

Rescheduled to 1.14.0 after 1.13.0 releasee

comment:7 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:8 by Francesco Casella, 4 years ago

Milestone: 1.16.01.17.0

Retargeted to 1.17.0 after 1.16.0 release

comment:9 by Francesco Casella, 4 years ago

Milestone: 1.17.01.18.0

Retargeted to 1.18.0 because of 1.17.0 timed release.

comment:10 by Francesco Casella, 3 years ago

Milestone: 1.18.0

Ticket retargeted after milestone closed

Note: See TracTickets for help on using tickets.