#2258 closed defect (fixed)
Code generation does not support multiple iterators
Reported by: | casella | Owned by: | sjoelund.se |
---|---|---|---|
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 Changed 11 years ago by sjoelund.se
comment:2 Changed 11 years ago by adrpo
Maybe we should rewrite multiple iterators to for loops as those are supported already as far as i know.
comment:3 Changed 11 years ago by sjoelund.se
Nah, you can rewrite them to 2 different iterators instead. Or fix them in the runtime (Ceval handles them).
comment:4 Changed 11 years ago by sjoelund.se
- Milestone changed from Future to 2.0.0
comment:5 Changed 9 years ago by sjoelund.se
- Milestone changed from 1.9.3 to 1.9.4
Moved to new milestone 1.9.4
comment:6 Changed 9 years ago by casella
- Resolution set to fixed
- Status changed from new to 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
comment:7 Changed 8 years ago by sjoelund.se
- Milestone changed from 1.9.4 to 1.9.4-1.9.x
Milestone renamed
comment:8 Changed 8 years ago by sjoelund.se
- Milestone changed from 1.9.4-1.9.x to 1.9.4
Milestone renamed
But at least I added a nice message saying it's not working, right? ;)