3.7. Effect of units on a variable

  1. The target of the units attribute on a variable is referred to as the “variable units”, and the corresponding unit reduction (see 3.3 Interpretation of units elements) is referred to as the “variable unit reduction”.

See more

Understanding variables and their units

The pairing of variables with units is distinct from every other relationship in CellML in that sometimes it matters, and sometimes it doesn’t. To better understand why this is, we first have to understand the ideas of reusability and modularity that prompted the design of encapsulation.

Each component in a CellML model is a package. That package may in turn contain other packages too, but each one is intended to represent an idea, a functionality, a black-boxed thing which can then be passed around and reused as needed.

Now think about a component from the perspective of another modeller who wants to reuse your component in their model:

  • When variables are passed between components (through equivalent variables) the units of those variables must be checked for consistency; the external modeller does not necessarily have knowledge of the inner workings of the black-box component, only the variables it passes to and fro across the boundaries. There are examples and further details available in 3.10 Interpretation of map_variables elements.

  • When variables are created to operate within a component (its local mathematics) their units are not checked; the modeller does have knowledge of the inner workings, and can control and interpret them as needed. There are examples and further details available in 3.8.3 in {number} {name}.

Thus, CellML deems it important for the component border crossings to have as much information as possible (that is: the units and variable pairs), yet permits modellers the flexibility to make their own decisions about units within components.