﻿id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc
4526	Propagate displayUnits on simple equations	Francesco Casella	Mahder Alemseged Gebremedhin	"After the ban on replaceable base classes in Modelica 3.0, input & output connectors are Real and no longer have units. When building components the typical pattern is the following:
{{{
model M
  Modelica.SIunits.Temperature T;
  Modelica.Blocks.Interfaces.RealOutput T_out;
  ...
equation
  ...
  T_out = T;
  ...
end M;
}}}

It would be great if in this case the unit and displayUnit information was automatically propagated from T to T_out, so that I can see the temperature in degrees Celsius when I'm looking into the connector variable.

This can be trivially implemented by checking all the equations in the form:
{{{
a = b;
a + b = 0;
}}}

where one of the variables (e.g., {{{a}}}) has a non-empty unit string, while the other (e.g., {{{b}}}) has an empty unit string. In this case, {{{b}}} takes the unit and displayUnit attributes of {{{a}}}.

When implementing this feature, please pay attention to efficiency, see #4362"	enhancement	new	high		New Instantiation				
