Opened 17 years ago
Last modified 17 years ago
#1009 closed defect (fixed)
Termination of vector-valued flow connections not flattened
Reported by: | rruusu | Owned by: | rruusu |
---|---|---|---|
Priority: | critical | Milestone: | |
Component: | Version: | ||
Keywords: | Cc: | rruusu, Adrian Pop |
Description
Equations for setting vector-valued flow variables to zero in externally unconnected connectors are not flattened.
A simple test case:
{{{connector A
flow Real[3] flow_vector;
end A;
model B
A a, b;
equation
connect(a, b);
end B;}}}
The resulting flattening is:
{{{fclass B
Real a.flow_vector[1];
Real a.flow_vector[2];
Real a.flow_vector[3];
Real b.flow_vector[1];
Real b.flow_vector[2];
Real b.flow_vector[3];
equation
-a.flow_vector[1] + -b.flow_vector[1] = 0.0;
-a.flow_vector[2] + -b.flow_vector[2] = 0.0;
-a.flow_vector[3] + -b.flow_vector[3] = 0.0;
b.flow_vector = fill(0.0,3);
a.flow_vector = fill(0.0,3);
end B;}}}
fixed in revision 3584.