There are two unit of measure parameters included with every TOOL object: the SI unit of measure (SIuom) and the alternate unit of measure (altUom).
SIUom is the “base” unit for the data, used for storage, calculations and interactions with other objects.
altUom is the display and input unit of measure that will be used anytime you interact with the data. Interacting would include: the display tools like table, and graph, entering data manually through these tools, and direct assignment in code in views. Each altUom should be setup in the measures table (see measures tab in Documenter) to specify how the conversion to the related SIUom should be done.
TOOL can handle unit of measure conversions across multiple objects seamlessly provided that the user defines the new measure in Documenter and properly specifies the unit of measure when defining the shape of a variable. The general steps to implement unit of measure conversions are:
The target variable will be displayed in the desired unit of measure.
For this example we are going be importing floor area data in m2 and converting the output to ft2
First we need to define the required altUom measures in Documenter.
To do this:
This will open the Measure Information window
m2
Measure Type - Scientific Measure
Name - m2
SI Signature - m^2
Conversion to SI units - 1
ft2
Measure Type - Scientific Measure
Name - ft2
SI Signature - m^2
Conversion to SI units - 10.7639
Once the altUom's have been created we need to apply them to the shapes of our variables fuelConIn and fuelConOut.
We will need to set the altUom for the variable floorSpaceIn to m2 and the altUom for the variable floorSpaceOut to ft2.
To do this:
Repeat this process for the variable floorSpaceOut with ft2 as the numerator
floorSpaceOut[fs,t]=floorSpaceIn[fs,t]
After loading the model from Documenter into SAMM and importing the source data into SAMM we can see how the source data which is in m2 gets converted to ft2 in the target variable in the tables below