CML is designed to model time-varying physical systems, such as the movement of a mechanical device or the process of a chemical reaction. In engineering models, the properties and state of such systems are described by variables, parameters, coefficients, and constants. In CML, the term quantity encompasses these notions. A quantity is either a constant, or a unary function, whose argument is a time. While all non-constant quantities are time dependent, in this version of CML, their properties and the distinctions that are made among them could readily be extended to other independent variables such as position. We expect that later versions of CML will support quantities with other independent variables, such as position.
In the syntax of CML, time is left as an implicit parameter to time dependent quantities, functions, and relations. This has been done for several reasons:
All non-constant quantities are restricted to have a finite number of critical points or discontinuous changes over any finite interval. This rules out certain classes of poorly behaved systems, such as oscillators with infinite frequency, that pose problems for numeric integration and qualitative simulation techniques. Since physical systems do not exhibit such behavior, we do not expect this to be a substantial hindrance.
Quantities may be numeric or non-numeric. Non-numeric quantities are simply constants or unary functions of time satisfying the above finite-change requirement. Their values are unrestricted.
A numeric quantity is associated with a single physical dimension, given by the function dimension. CML specifies a core set of fundamental physical dimensions: the seven defined by the System Internationale (mass, length, time, charge, temperature, amount, and luminosity) plus a dimension for dimensionless numbers. Real numbers are dimensionless constant quantities. A dimension is a property that is used to distinguish incompatible quantities. Quantities of the same dimension can be compared, added, multiplied, and so on. These operations are not defined for quantities of different dimensions. A mathematical relation holds on non-constant quantities if it holds on their values at each time that they are defined.
A numeric time dependent quantity is a function of time whose values all have the same dimension. The value of a numeric time-dependent quantity is a numeric constant quantity.
The magnitude of a numeric constant quantity is specified in units of measure. A unit of measure is itself a constant quantity used as a reference for a given dimension. For example, the meter is a unit of measure for the length dimension and the second is a unit of measure for the time dimension. The magnitude of a constant quantity depends on the unit in which it is requested. The binary function magnitude maps a constant quantity and a unit of the same dimension to a real number. For example, the magnitude of 12g in grams is 12 and its magnitude in ounces is about 4.23. A unit of measure defines an absolute scale with a 0 value for quantities of a particular dimension. The real number 0 is dimensionless and therefore is different from other quantities whose magnitude is 0, such as 0 Newtons or 0 feet.
There are several important classes of numeric time dependent quantities that are supported by CML:
Together with the non-numeric quantities, these suffice to model a broad range of physical systems. Figure provides examples of several different kinds of quantities.
Figure: CML quantities encompass variables, parameters, coefficients,
and constants in engineering models. They may have numeric and
non-numeric values.