Opened 7 years ago
Last modified 7 years ago
#4858 closed defect
Issue with String arrays and iterators in NF — at Initial Version
Reported by: | Francesco Casella | Owned by: | Per Östlund |
---|---|---|---|
Priority: | high | Milestone: | 2.0.0 |
Component: | New Instantiation | Version: | |
Keywords: | Cc: |
Description
Please check the model ScalableTestSuite.Electrical.BreakerCircuits.ScaledExperiments.BreakerNetwork_N_10. The compilation with the NF fails in the CodeGen phase, but the root cause is in the NF, as demonstrated by this simple test case, which fails with the same error message:
package Test model M parameter String name; end M; model P parameter Integer N = 2; M m[N](name={String(i) for i in 1:N}); end P; end Test;
Flattening model Test.P with the old FE gives
class Test.P parameter Integer N = 2; parameter String m[1].name = "1"; parameter String m[2].name = "2"; end Test.P;
while the new FE gives
class Test.P parameter Integer N = 2; parameter String m[1].name = array(String(i, 0, true) for i in 1:2)[1]; parameter String m[2].name = array(String(i, 0, true) for i in 1:2)[2]; end Test.P;
Is this because of the still missing function evaluation feature?
Note:
See TracTickets
for help on using tickets.