Opened 7 years ago
Closed 6 years ago
#4965 closed defect (fixed)
The NF does not handle vectorized operations involving Complex arrays
Reported by: | Francesco Casella | Owned by: | Per Östlund |
---|---|---|---|
Priority: | high | Milestone: | 2.0.0 |
Component: | New Instantiation | Version: | |
Keywords: | Cc: | dr.christian.kral@… |
Description
Please check Modelica.Magnetic.QuasiStatic.FundamentalWave.Examples.BasicMachines.InductionMachines.IMC_Characteristics. The following error is reported:
[Modelica 3.2.2/Magnetic/QuasiStatic/FundamentalWave.mo:6594:9-6595:35:writable] Error: Cannot resolve type of expression imcQS.plug_sp.pin.v - imcQS.plug_sn.pin.v. The operands have types Complex[3], Complex[3] in component <NO_COMPONENT>.
Apparently, vectorization of overloaded operators is still not implemented.
This issue affects the entire Modelica.Magnetic.QuasiStatic
library.
Change History (6)
comment:1 by , 7 years ago
Cc: | added |
---|
comment:2 by , 7 years ago
follow-up: 4 comment:3 by , 7 years ago
Please, consider the example discussed in comment 3 of ticket #4835.
Thanks.
comment:4 by , 6 years ago
Replying to ceraolo:
Please, consider the example discussed in comment 3 of ticket #4835.
I report it here for convenience
model ComplexTest1 parameter Integer n = 2; Real R[n,n]=ones(n,n); Real X[n,n]=ones(n,n); Complex Z[n,n]; constant Complex j = Complex(0.0, 1.0); equation Z = R + j*X; end ComplexTest1;
The current output of the NF is
Type mismatch in equation Z = Complex.'+'({Complex.'constructor'.fromReal(R[$i1, $i2], 0.0) for $i2 in 1:2, $i1 in 1:2}, Complex.'*'.multiply(j, {Complex.'constructor'.fromReal(X[$i1, $i2], 0.0) for $i2 in 1:2, $i1 in 1:2})) of type Complex[2, 2] = Complex.
comment:6 by , 6 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Fixed for
+
and-
in 59a9d83. I'll leave this ticket open as a reminder to implement handling for the rest of the operators too, but this should at least take care of the MSL.