Opened 5 years ago
Last modified 4 years ago
#5837 new defect
Unit checking is not performed on operator record equations
Reported by: | Francesco Casella | Owned by: | Per Östlund |
---|---|---|---|
Priority: | blocker | Milestone: | 2.0.0 |
Component: | New Instantiation | Version: | |
Keywords: | Cc: |
Description
Consider the following test case:
partial model M Modelica.SIunits.ComplexVoltage v; Modelica.SIunits.ComplexCurrent i; Modelica.SIunits.ComplexImpedance Z; Modelica.SIunits.ComplexAdmittance Y; Modelica.SIunits.Reactance X; equation i = Z*i; Y = Complex(0,X); Z = Y; Z + Y = Complex(0); end M;
All the equations are obviously wrong, and unit checking could easily allow to spot the errors. Unfortunately, if I check the model in OMEdit I get no error or warning at all.
When doing unit checking of record equations, we should carry out unit inference through all the operators and make sure all the equivalent Real equations are dimensionally consistent.
Note:
See TracTickets
for help on using tickets.