Opened 6 years ago
Last modified 6 years ago
#5572 new defect
Delay operator in a for loop of an algorithm section
| Reported by: | Owned by: | Lennart Ochel | |
|---|---|---|---|
| Priority: | high | Milestone: | Future |
| Component: | Backend | Version: | |
| Keywords: | Cc: | alireza.masoom@…, ni.ding@…, Karim Adbdelhak, Andreas Heuermann |
Description (last modified by )
The following simple model using a delay operator in a for-loop inside an algorithm section is not handled by OpenModelica.
model test3 Real x=sin(377*time); Real z; parameter Real tau[:]={0.01,0.02}; equation algorithm for k in 1: 2 loop z:=delay(x,tau[k]); end for; end test3;
original post:
https://stackoverflow.com/questions/56916012/error-due-to-delay-operator-in-algorithm-section
Change History (3)
comment:1 by , 6 years ago
comment:2 by , 6 years ago
| Description: | modified (diff) |
|---|
comment:3 by , 6 years ago
| Cc: | added |
|---|---|
| Component: | *unknown* → Backend |
| Owner: | changed from to |
The problem with this is that we fetch the delay expressions to be given to storeDelayedExpression but in our case the expressions are part of a for loop and contain iterators. Maybe the backend developers have an idea on how to fix this.
Note:
See TracTickets
for help on using tickets.

Is is possible to use
equationinstead ofalgorithm?