Opened 7 years ago
Last modified 7 years ago
#4588 assigned discussion
Unit propagation and deduction.
Reported by: | massimo ceraolo | Owned by: | Lennart Ochel |
---|---|---|---|
Priority: | normal | Milestone: | Future |
Component: | Backend | Version: | |
Keywords: | Cc: |
Description
Consider the model units.mo (attached).
It contains a feedback fed by two inputs with known units (m/s)
Shouldn't they be propagated to the feedback inputs and also, by deduction, to the feedback output?
Dymola shows for the two feedback inputs m/s, as expected, while for the output, unexpectedly, no unit.
OM (1.13-dev 89) shows no unit for feedback inputs and output.
Attachments (1)
Change History (4)
by , 7 years ago
comment:1 by , 7 years ago
Component: | *unknown* → Backend |
---|---|
Owner: | changed from | to
Status: | new → assigned |
comment:3 by , 7 years ago
The discussion on unit checking is interesting and it may have an interesting outcome in the long term. That said, I don't think there will be any conflicts with this simple rule:
For each set of alias variables, if a subset of them have the same unit string and the remaining elements have an empty unit string, then they also get the same unit string automatically.
My suggestion is that this simple rule is implemented. It shouldn't take much time. If a = b or a + b = 0 there is no question whatsoever that a and b have the same unit, so I am sure this rule won't conflict with anything that could come out of the on-going discussion.
Following the Modelica discussions about unit checking, there will be no unit propagation soon. The idea is to only spot structural errors by using the given unit information. Unit propagation may hide such errors.
Therefore, I am not sure whether I will fix this or not.