Opened 11 years ago

Last modified 7 years ago

#2774 new defect

Vectors are not detected as discrete variables — at Version 1

Reported by: Martin Sjölund Owned by: Willi Braun
Priority: high Milestone: Future
Component: Backend Version: trunk
Keywords: Cc: Lennart Ochel

Description (last modified by Martin Sjölund)

The test whenDiscreteForLoop currently contains code like this:

model testWhenLoopA1
  Real x;
  discrete Real d[2];
  Integer n = 2;
equation
  der(x) = x+1;
algorithm
  when sample(0,0.1) then
    for i in 1:n loop
      d[i] := d[i]+1;
    end for;
  end when;
end testWhenLoopA1;

The discrete keyword was added by me because OpenModelica does not add it for vectors assigned in a when-statement.

Change History (1)

comment:1 by Martin Sjölund, 11 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.