#4691 closed defect (fixed)
Issue with smooth() in the NF
Reported by: | Francesco Casella | Owned by: | Per Östlund |
---|---|---|---|
Priority: | high | Milestone: | 2.0.0 |
Component: | New Instantiation | Version: | |
Keywords: | Cc: |
Description
The following error is reported:
Error: Cannot resolve type of expression ' simpleTriac.thyristor.vConmain + smooth(0, ifsimpleTriac.thyristor.iGK < 0.95 .* simpleTriac.thyristor.IGT then 0.0 else ifsimpleTriac.thyristor.iGK < 0.95 .* simpleTriac.thyristor.IGT + 0.001 then 10000.0 .* (simpleTriac.thyristor.iGK - 0.95 .* simpleTriac.thyristor.IGT) .* simpleTriac.thyristor.vAK else 10.0 .* simpleTriac.thyristor.vAK) '. The operands have types ' Real + <RealArrayOrRecord> ' in component : Addition operations involving an array and a scalar are not valid in Modelica. Try using elementwise operator '.+'.
It is not clear to me if the problem is with smooth
or with the if-expression (or both), but clearly the second operand should be Real as well.
It is also not clear why the .*
operator is reported in the error message.
Note:
See TracTickets
for help on using tickets.
Fixed in 105aad9