Class BaseUnitConcept

  • All Implemented Interfaces:
    java.lang.Cloneable, InequalityTerm, Changeable, Debuggable, DebugListener, Derivable, Instantiable, ModelErrorHandler, MoMLExportable, Moveable, Nameable

    public class BaseUnitConcept
    extends UnitConcept
    A concept in the unitSystem ontology for a specific unit for a specific physical dimension. A unit for a base dimension is defined by the physical dimension it measures and the multiplication factor and offset values required to convert a value in its unit measurement to a unit measurement in the SI unit for this dimension. For example, to represent the units for measuring temperature in degrees Fahrenheit, the multiplication factor and offset are specified as what is needed to convert Fahrenheit to Kelvin:
    • unitFactor = 5.0/9.0
    • unitOffset = 459.67

    To convert a temperature measurement value in degrees F to degrees K, apply the formula:
    value in K = (value in F + unitOffset) * unitFactor

    Inversely, to convert a measurement from the SI unit (K) to this unit (F), apply this formula:
    value in F = (value in K) / unitFactor - unitOffset

    So far temperature is the only dimension that requires an offset. All the other dimensions only require a multiplication factor, so their offset is always zero. For example, To represent the position dimension units in kilometers (km):

    • unitFactor = 1000.0
    • unitOffset = 0.0

    The SI unit for position is meters (m) so the kilometers unitFactor is 1000.0 and there is zero offset.

    This class is an infinite concept so that an arbitrary number of different unit measurements can be represented for any physical dimension. All that is required is specify the name of units and the multiplication factor and offset needed to convert the unit to the SI unit for that dimension.

    Since:
    Ptolemy II 10.0
    Version:
    $Id$
    Author:
    Charles Shelton
    See Also:
    BaseDimensionRepresentativeConcept
    Pt.AcceptedRating:
    Red (cshelton)
    Pt.ProposedRating:
    Red (cshelton)
    • Method Detail

      • createBaseUnitConcept

        public static BaseUnitConcept createBaseUnitConcept​(Ontology ontology,
                                                            BaseDimensionRepresentativeConcept representative,
                                                            RecordToken unitInfo)
                                                     throws IllegalActionException
        Create a new base unit concept, belonging to the given ontology, with an automatically generated name.
        Parameters:
        ontology - The ontology to which this concept belongs.
        representative - The finite concept that represents where the infinite token concepts belong in the ontology lattice.
        unitInfo - The token value for this BaseUnitConcept.
        Returns:
        The newly created RecordConcept.
        Throws:
        IllegalActionException - If the base class throws it.