#4691 closed defect (fixed)
Issue with smooth() in the NF
Reported by: | casella | Owned by: | perost |
---|---|---|---|
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.
Change History (2)
comment:1 Changed 7 years ago by casella
- Resolution set to fixed
- Status changed from new to closed
comment:2 Changed 7 years ago by casella
Some issues are still present, see #4724
Fixed in 105aad9