Opened 10 years ago

Last modified 10 years ago

#3230 accepted defect

Initialization handles when-clauses within algorithms wrong

Reported by: Lennart Ochel Owned by: Lennart Ochel
Priority: high Milestone: Future
Component: Backend Version: trunk
Keywords: Cc: Adrian Pop, Mahder Alemseged Gebremedhin

Description

See the following example:

model Test
  Real r[2];
algorithm
  r[1] := 2;
  when time > 0.5 then
    r := zeros(2);
  end when;
end Test;

Output:

Notification: The given system is mixed-determined.   [index > 0]
Notification: The given system is mixed-determined.   [index > 1]
Notification: The given system is mixed-determined.   [index > 2]
Notification: The given system is mixed-determined.   [index > 3]
Error: No system for the symbolic initialization was generated.

Attachments (1)

3230.diff (7.0 KB ) - added by Lennart Ochel 10 years ago.

Download all attachments as: .zip

Change History (3)

comment:1 by Lennart Ochel, 10 years ago

Owner: changed from somebody to Lennart Ochel
Status: newaccepted

comment:2 by Lennart Ochel, 10 years ago

Cc: Adrian Pop Mahder Alemseged Gebremedhin added

I have a fix for this, but cannot commit it since it breaks Adrian’s hack for #3209. I think Mahder wants to fix the expansion of crefs properly. Therewith, my fix for this ticket should work fine.

by Lennart Ochel, 10 years ago

Attachment: 3230.diff added
Note: See TracTickets for help on using tickets.