Opened 7 years ago
Closed 7 years ago
#4861 closed defect (fixed)
TimeTable models fail in NF because of lack of function evaluation
Reported by: | Francesco Casella | Owned by: | Per Östlund |
---|---|---|---|
Priority: | high | Milestone: | 2.0.0 |
Component: | New Instantiation | Version: | |
Keywords: | Cc: |
Description
Please check ScalableTestSuite.Elementary.Tables.Models.TimeTable. It fails in the CodeGen phase. Flattening the model with the NF gives declarations such as
final parameter Real tableX[1] = linspace(0.0, 1.0, 10)[1]; parameter Real timeTable.table[1,1] = cat(2, promote(tableX, 2), promote(tableY, 2))[1, 1];
instead of
final parameter Real tableX[1] = 0.0; parameter Real timeTable.table[1,1] = tableX[1] ;
produced by the old FE.
I guess this is also related to the lack of function evaluation.
Change History (3)
comment:1 by , 7 years ago
Summary: | TimeTable models fail in NF because → TimeTable models fail in NF because of lack of function evaluation |
---|
comment:2 by , 7 years ago
comment:3 by , 7 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Fixed in 5feb832, the model now simulates.
This actually had nothing to do with function evaluation, since linspace should rather be inlined (which is what the commit implemented). And the cat expression shouldn't be evaluated since it's a non-structural parameter expression (it should probably be simplified it though).
This model now fails at C compilation, but the issues reported in the ticket about incomplete flattening are still valid.