Opened 8 years ago

#4021 new defect

Incorrect array indexing in for-loop in algorithm section

Reported by: dma@… Owned by: somebody
Priority: high Milestone: Future
Component: *unknown* Version: v1.11.0
Keywords: Cc:

Description

I get an incorrect result when using array indexing inside the algorithm section and also inside a 'when sample()' section (see .mo file attached). If I comment out the loop at line 45 and replace it with the hand indexed lines starting at line 48 I get the correct result (see attached data-wrong.txt and data-correct.txt). Also, if I replace the 'j' inside the loop with a number I will get a correct (although unusable) result.

I'm using: OpenModelica-v1.11.0-dev-54-g4ec62d0-64bit.exe and running from OMEdit. Running on Windows 10.

Attachments (3)

DoublePendulumLoop.mo (2.8 KB) - added by anonymous 8 years ago.
data-correct.txt (6.3 KB) - added by dma@… 8 years ago.
data-incorrect.txt (2.7 KB) - added by anonymous 8 years ago.

Download all attachments as: .zip

Change History (3)

Changed 8 years ago by anonymous

Changed 8 years ago by dma@…

Changed 8 years ago by anonymous

Note: See TracTickets for help on using tickets.