Key Unit Concepts
Understanding Units
Calculation Consistency
Units allow you to ensure that Calculations are consistent.
As a simple example, it is logically incorrect to sum together two Variables which have a different unit.
Adding a Variable in
GBPto a Variable inUSDhas no real meaning. If you attempt to do this, Models will warn you that it cannot determine the resulting Unit, which will prompt you to correct the Calculation. One of the two Variables should first be converted to the other currency, before summing, using an exchange rate Variable, with UnitGBP/USDor vice versa.
Non-additive operations, such as multiplication, transform Units.
Multiplying an exchange rate with Unit
GBP/USDby a Variable with UnitUSDresults in a Variable with UnitGBP.Squaring a Variable will raise the Unit to a power of 2: e.g., Distance in
metremultiplied by itself will result in a Variable with Unitmetre^2
Models will automatically derive the Units of your Calculations and tell you the resulting Unit, or display a warning if the Unit is not as expected.
Units and Tags
Just like Dimensions and other Taglo concepts, Units are based on Tags. Each Unit component (e.g. GBP, USD, metre) is itself an Abstract Tag.
When you create a new type of Unit, you simply create a new Abstract Tag.
Use the Short Name property of a Tag to determine how the Tag will be displayed within a Unit (e.g., the metre Tag has a Short Name of m).
Inheritance
Unit inheritance analysis is available from Version 0.1.4.0 of Models
Because Units are based on Tags, they have access to all of the relationships you have created between Tags. This allows Models to make more intelligent inferences about the output Unit of a Calculation.
For instance, if you have a Variable with Unit
Apple, and a second Variable with UnitBanana, you should not ordinarily sum these Variables together, as explained above, and Models will warn you about it if you do.However, if the
AppleandBananaTags both have a third tag,Fruitas a common parent Tag, Models can infer that the Calculation is addingFruittogether, rather than Apples and Bananas, resulting in an output Unit ofFruit.
The above example will be represented in the Variable view as in the screenshot below. When a Variable is reliant on inheritance to calculate or correctly match its Unit, as is the case for Total Fruit below, Models will show a warning (1), in the Variable.

Disabling Inheritance
Unit inheritance can be enabled/disabled in the Model settings wizard, as shown below. Open the settings wizard from the Model Settings bar, and select or deselect the Allow Unit inheritance option (1) as required.

Compound Units
Many Units are Compound Units: for example, the exchange rate GBP/USD. In Taglo, we refer to each component of the Unit as a Unit Part.
In the next section, Advanced Units, you will learn how editing each Unit Part adds functionality to Taglo software.
Summary
Units help you achieve logical consistency in your calculations. Models allows you to add extra time and contextual detail to your Units, which provide useful information about how the Variables and Assumptions in your Model should be treated.
As you read more about working in Models, you will see how these concepts are used to enable powerful functionality.
For instance, Dimensions work by automatically applying context Tags to the underlying Unit of a Variable.
Read on to learn how to create Units.
Last updated