libcellml icon indicating copy to clipboard operation
libcellml copied to clipboard

Validator: units issues should mention both the high level units discrepancies and SI units discrepancies

Open agarny opened this issue 4 years ago • 0 comments

Right now, if two equivalent variables are not unit equivalent, then we will return a message that uses the broken down version of those units, i.e. that uses SI units. For instance, if one variable is in volt and the other in second, then the error message will read something like:

Variable 'v1' in component 'c1' has units of 'volt' and an equivalent variable 'v2' in component 'c2' with non-matching units of 'second'. The mismatch is: ampere^-1, kilogram^1, metre^2, second^-4.

which is not ideal. It would be best to provide both, i.e.

Variable 'v1' in component 'c1' has units of 'volt' (i.e. 'ampere^-1 x kilogram x metre^2 x second^-3') and an equivalent variable 'v2' in component 'c2' with non-matching units of 'second'.

agarny avatar Mar 26 '21 03:03 agarny