#2258 closed defect (fixed)
Code generation does not support multiple iterators
Reported by: | Francesco Casella | Owned by: | Martin Sjölund |
---|---|---|---|
Priority: | high | Milestone: | 1.9.4 |
Component: | Code Generation | Version: | trunk |
Keywords: | Cc: | e.da-silva@… |
Description
Multiple iterators are not supported in OMC. This can be tested by simulating the following simple model:
model foo parameter Integer nRows = 3,nCols = 3; Real hilb[nRows,nCols] = array(1/(i+j-1) for i in 1:nRows, j in 1:nCols); end foo;
which gives the following error:
[CodegenC.tpl:8122:14-8122:14:writable] Error: Template error: Code generation does not support multiple iterators: array(DIVISION(1.0, /*Real*/(i + j + -1), #SHARED_LITERAL_0(String)#) for j in #SHARED_LITERAL_1(Integer[3])#, i in #SHARED_LITERAL_1(Integer[3])#)
Change History (8)
comment:1 by , 12 years ago
comment:2 by , 12 years ago
Maybe we should rewrite multiple iterators to for loops as those are supported already as far as i know.
comment:3 by , 12 years ago
Nah, you can rewrite them to 2 different iterators instead. Or fix them in the runtime (Ceval handles them).
comment:4 by , 12 years ago
Milestone: | Future → 2.0.0 |
---|
comment:6 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
It seems that the problem has been solved in the meantime, as the reported test case works fine with omc v.1.9.4-dev-184-g7bf48ba
But at least I added a nice message saying it's not working, right? ;)