Opened 14 years ago
Closed 12 years ago
#1694 closed defect (fixed)
Tuple values in initial equations cause code generator to fail
| Reported by: | Martin Sjölund | Owned by: | Martin Sjölund | 
|---|---|---|---|
| Priority: | high | Milestone: | |
| Component: | Backend | Version: | |
| Keywords: | Cc: | Martin Sjölund, Frenkel, TUD, Willi Braun | 
Description (last modified by )
model M function f input Real i1,i2,i3; output Real o1:=i1,o2:=i2,o3:=i3; end f; Real i1=1,i2=1,i3=1,o1,o2,o3; initial equation (o1,o2,o3) = f(i1,i2,i3); equation der(o1) = 1; der(o2) = 1; der(o3) = 1; end M;
If we evaluate an equation like the function call above, we need to scalarize the tuples since you cannot create anonymous tuples in the C runtime.
o1 = i1; o2 = i2; o3 = i3;
For a larger example using this, see Modelica 3.2.Blocks.Examples.Filter
Change History (2)
comment:1 by , 12 years ago
| Cc: | added; removed | 
|---|---|
| Component: | → Run-time | 
| Description: | modified (diff) | 
comment:2 by , 12 years ago
| Component: | Run-time → Backend | 
|---|---|
| Resolution: | → fixed | 
| Status: | new → closed | 
  Note:
 See   TracTickets
 for help on using tickets.
    
