This is an old revision of the document!
Tools-On-Objects Language, is an interactive language for manipulating structured data objects including multi-dimensioned arrays, sets and geometric objects. TOOL is the only language needed throughout the whatIf? platform.
TOOL inspired by other array languages such as:
One of the main concepts taken from these is that one object can inform another. This is used extensively in TOOL for the dimensions of variables. Each dimension of a variable is one of 3 types of objects: set, category, or sequence.
TOOL is used throughout the whatIf? platform and is the only language the modeller will need to know.
In the process of building and using a model there are 4 places where code is required and typically there are at least 2 languages to accomplish these tasks:
In the whatif platform TOOL is used for all of those tasks, more specifically:
TOOL is fourth-generation programming language (abbreviated 4GL) http://en.wikipedia.org/wiki/4GL specifically designed for handling large arrays of multi-dimensional data. This makes it well suited for model building.
Specialized algorithms for model building are built into TOOL for efficiency and simplicity and they are called tools. There are currently 137 tools in TOOL and this list is ever growing as a need arises. Here are a few common modelling constructs built into TOOL:
TOOL handles multidimensional arrays (objects) in a way that makes the math as simple as working with single value variables. For example to multiply a population stock variable which is broken down by region(reg), gender(gen), time(t) and age(a) by a survival rate by only region time and age the math is simply:
survivors[reg,gen,t,a] = population[reg,gen,t,a] * survivalRate[reg,t,a]
TOOL automatically handles the mismatch of dimensions by using the same survival rate for each gender and produces a 4 dimensional output. All TOOL functions handle multidimensional objects.
explain “shape” and TOOL inheritance
All the data stored in TOOL objects is stored in its primary SI units (International System of Units). The units the data is to be displayed, called the alternate unit of measure (altUom), in is set on the object to simplify viewing data. The relationship between any altUom and SI units are specified in a conversion table for example:
altUom | m | kg | s | C | rad | sterad | conversion |
petajoule | 2 | 1 | -2 | 1e-15 | |||
tonne | 1 | 0.001 |
TOOL is used to read and write data external to the model and it supports various formats and file types:
Formats:
File Types: