QUDV
http://www.omg.org/spec/SysML/20150709/QUDV
A_conversionBasedUnit_referenceUnit
conversionBasedUnit
*
A_derivedQuantityKind_factor
derivedQuantityKind
*
A_derivedUnit_factor
derivedUnit
A_dimension_factor
dimension
*
A_generalQuantityKind_specificQuantityKind
specific
*
A_generalUnit_specificUnit
specific
*
A_includedSystemOfQuantities_systemOfQuantities
systemOfQuantities
*
A_includedSystemOfUnits_systemOfUnits
systemOfUnits
*
A_noQuantityKind_prefixedUnit
prefixedUnit
A_prefixedUnit_prefix
prefixedUnit
*
A_quantityKindFactor_quantityKind
quantityKindFactor
*
A_quantityKind_measurementUnit
measurementUnit
*
A_systemOfQuantities_baseQuantityKind
systemOfQuantities
*
A_systemOfQuantities_dimension
systemOfQuantities
*
A_systemOfQuantities_quantityKind
systemOfQuantities
*
A_systemOfUnits_baseUnit
systemOfUnits
*
A_systemOfUnits_prefix
systemOfUnits
*
A_systemOfUnits_systemOfQuantities
systemOfUnits
*
A_systemOfUnits_unit
systemOfUnits
*
A_unitFactor_unit
unitFactor
*
A_usedSystemOfQuantities_systemOfQuantities
systemOfQuantities
*
A_usedSystemOfUnits_systemOfUnits
systemOfUnits
*
AffineConversionUnit
invertible
isInvertible = true
OCL2.0
factor
offset
ConversionBasedUnit
true
isInvertible
referenceUnit
dependsOnUnits
true
A ConversionBasedUnit transitively depends on its referenceUnit and all of the Units that its referenceUnit depends on.
result
*
body
referenceUnit.dependsOnUnits()->including(referenceUnit)->asSet()
OCL2.0
DerivedQuantityKind
factor
*
dependsOnQuantityKinds
true
A DerivedQuantityKind transitively depends on its factors' QuantityKinds and all of the QuantityKinds that its factors' QuantityKinds depend on.
result
*
body
factor.quantityKind.dependsOnQuantityKinds()->flatten()->asSet()->union(factor.quantityKind->flatten()->asSet())->asSet()
OCL2.0
DerivedUnit
mustSpecifyQuantityKind
Since a DerivedUnit is defined as a product factor of one or more other Units, it must specify explicitly its QuantityKinds.
quantityKind <> null and quantityKind->notEmpty()
OCL2.0
factor
*
hasReducedFactors
If true, the UnitFactors specifying the product of powers of other measurement units that define the DerivedUnit cannot be simplified. If false, the DerivedUnit is non-reduced; some UnitFactors can be simplified. A non-reduced DerivedUnit can have as a general unit other DerivedUnits defined in terms of simplified UnitFactors, possibly in reduced form.
true
dependsOnUnits
true
A DerivedUnit transitively depends on its factors' Units and all of the Units that its factors' Units depend on.
result
*
body
factor.unit.dependsOnUnits()->flatten()->asSet()->union(factor.unit->flatten()->asSet())->asSet()
OCL2.0
Dimension
factor
true
*
symbolicExpression
Symbolic expression of the quantity dimension's product of powers, in terms of symbols of the kinds of quantity that represent the base kinds of quantity and their exponents. In tool implementations, the symbolicExpression may automatically derived from the associated factor set.
GeneralConversionUnit
expression
expressionLanguageURI
LinearConversionUnit
invertible
isInvertible = true
OCL2.0
factor
Prefix
factor
symbol
PrefixedUnit
PU1
The referenceUnit shall not be a PrefixedUnit, i.e.,it is not allowed to prefix an already prefixed measurement unit. In general the referenceUnit should be a SimpleUnit.
not referenceUnit.oclIsTypeOf(PrefixedUnit)
OCL2.0
noQuantityKind
prefix
QuantityKind
true
acyclic_quantity_kind_dependencies
A QuantityKind cannot be defined in terms of itself. This follows from the quantity calculus used for expressing a derived QuantityKind in terms of base QuantityKinds chosen for a SystemOfQuantities by means of non-contradictory equations (See ISO 80000-1, 4.3).
dependsOnQuantityKinds->excludes(self)
OCL2.0
dependsOnQuantityKinds
true
true
The set of all QuantityKinds that this QuantityKind directly or indirectly depends on according to its definition.
*
general
*
isNumberOfEntities
If true, indicates that the QuantityKind represents a number of entities (see ISO 80000-1, 3.8, Note 4).
isQuantityOfDimensionOne
If true, indicates that the QuantityKind has dimension one (see ISO 80000-1, 3.8).
dependsOnQuantityKinds
Abstract operation specified in SpecializedQuantityKind, SimpleQuantityKind and DerivedQuantityKind to calculate the value of the derived property QuantityKind:/dependsOnQuantityKinds.
result
*
QuantityKindFactor
exponent
quantityKind
SimpleQuantityKind
dependsOnQuantityKinds
true
A SimpleQuantityKind does not depend on any other QuantityKind.
result
*
body
Set(QuantityKind){}
OCL2.0
SimpleUnit
dependsOnUnits
true
A SimpleUnit, by definition, does not depend on any other Unit.
result
*
body
Set(Unit){}
OCL2.0
SystemOfQuantities
acyclicProvenance
For a QuantityKind to have a provenance to a single SystemOfQuantities, the use and includes relationships among SystemOfQuantities must be acyclic.
allAccessibleSystemOfQuantities()->excludes(self)
OCL2.0
allBaseQuantitiesAreQuantities
The set of all QuantityKinds in a given SystemOfQuantities can be partitioned into two disjoint, covering subsets: the set of base QuantityKinds (typically chosen to be mutually independent) and all its complement, the set of derived QuantityKinds, each of which can be expressed in terms of the base QuantityKinds (See ISO 80000-1, 4.3).
allQuantityKinds()->includesAll(allBaseQuantityKinds())
OCL2.0
includedSystemOfQuantities_transitivelyDisjoint_usedSystemOfQuantities
For a QuantityKind to have a provenance to a single SystemOfQuantities, includedSystemsOfQuantities must be transitively disjoint with usedSystemsOfQuantities
allIncludedSystemOfQuantities()->intersection(self.oclAsSet()->closure(usedSystemOfQuantities))->isEmpty()
OCL2.0
singleProvenance
Every QuantityKind must be defined in only one SystemOfQuantities but it can be in the scope of several SystemOfQuantities. A given QuantityKind is in scope of a SystemOfQuantities either because it is defined or used in a SystemOfQuantities or because it is included from the scope of another SystemOfQuantities.
includedSystemOfQuantities->collect(allQuantityKinds())->intersection(quantityKind)->isEmpty()
OCL2.0
baseQuantityKind
true
*
definitionURI
description
dimension
true
false
true
true
*
includedSystemOfQuantities
*
quantityKind
true
*
symbol
usedSystemOfQuantities
*
allAccessibleQuantityKinds
true
The query accessibleQuantityKinds() gives all the QuantityKinds directly defined in the SystemOfQuantities or transitively in any included or used SystemOfQuantities.
result
*
body
allAccessibleSystemOfQuantities()->collect(quantityKind)->flatten()->asSet()
OCL2.0
allAccessibleSystemOfQuantities
true
The query allAccessibleSystemOfQuantities() gives all the SystemOfQuantities directly or transitively included or used.
result
*
body
self->closure(includedSystemOfQuantities->union(usedSystemOfQuantities))->asSet()
OCL2.0
allBaseQuantityKinds
true
The query allBaseQuantityKinds() gives all the QuantityKinds directly adopted or transitively adopted from any included SystemOfQuantities as base QuantityKinds.
result
*
body
allIncludedSystemOfQuantities()->collect(baseQuantityKind)->flatten()->asSet()->union(baseQuantityKind)->asSet()
OCL2.0
allIncludedSystemOfQuantities
true
The query allIncludedSystemOfQuantities() gives all the SystemOfQuantities directly or transitively included.
result
*
body
self->closure(includedSystemOfQuantities)->asSet()
OCL2.0
allQuantityKinds
true
The query allQuantityKinds() gives all the QuantityKinds in scope of a SystemOfQuantities; that is, each QuantityKind is either directly defined in the SystemOfQuantities, selectively used from another SystemOfQuantities or part of the scope of all the QuantityKinds included from another SystemOfQuantities.
result
*
body
allIncludedSystemOfQuantities()->collect(quantityKind)->flatten()->asSet()->union(quantityKind)->asSet()
OCL2.0
getDimension
qk
result
SystemOfUnits
SoU3_1
In a well-formed SystemOfUnits, all of the prefixes of PrefixedUnits are defined in the SystemOfUnits.
allPrefixes()->includesAll(allUnits()->select(oclIsTypeOf(PrefixedUnit))->collect(oclAsType(PrefixedUnit).prefix))
OCL2.0
SoU3_2
All the dependent Units of a SystemOfUnits must be in the scope of that SystemOfUnits.
allUnits()->includesAll(allUnits()->collect(dependsOnUnits())->flatten()->asSet())
OCL2.0
SoU3_3
All of the quantityKinds that are measurementUnits of Units in the SystemOfUnits are defined in the systemOfQuantities of that SystemOfUnits.
getEffectiveSystemOfQuantities() = null or let aqk : Set(QuantityKind) = getEffectiveSystemOfQuantities().allQuantityKinds() in allUnits()->forAll(u | aqk->includesAll(getKindOfQuantitiesForMeasurementUnit(u)))
OCL2.0
acyclicProvenance
For a Unit to have a provenance to a single SystemOfUnits, the use and includes relationships among SystemOfUnits must be acyclic.
allAccessibleSystemOfUnits()->excludes(self)
OCL2.0
allBaseUnitsAreUnits
The set of all Units in a given SystemOfUnits can be partitioned into two disjoint, covering subsets: the set of base Units (typically chosen to be mutually independent) and all its complement, the set of derived Units, each of which can be expressed in terms of the base Units (See ISO 80000-1, 6.4).
allUnits()->includesAll(allBaseUnits())
OCL2.0
includedSystemOfUnits_transitivelyDisjoint_usedSystemOfUnits
For a Unit to have a provenance to a single SystemOfUnits, all included systems of units must be transitively disjoint with all used systems of units.
allIncludedSystemOfUnits()->intersection(self.oclAsSet()->closure(usedSystemOfUnits))->isEmpty()
OCL2.0
singleProvenance
Every Unit must be defined in only one SystemOfUnits but it can be in the scope of several SystemOfUnits. A given Unit is in scope of a SystemOfUnits either because it is defined or used in a SystemOfUnits or because it is included from the scope of another SystemOfUnits.
includedSystemOfUnits->collect(allUnits())->intersection(unit)->isEmpty()
OCL2.0
systemOfQuantitiesIncludesAllUnitsQuantityKinds
For a Unit to have a provenance to a single SystemOfUnits, includedSystemsOfUnits must be transitively disjoint with usedSystemsOfUnits.
let aqks : Set(QuantityKind) = getEffectiveSystemOfQuantities().allQuantityKinds() in allUnits()->forAll(u | getKindOfQuantitiesForMeasurementUnit(u)->intersection(aqks)->notEmpty())
OCL2.0
baseUnit
true
*
definitionURI
description
includedSystemOfUnits
*
prefix
true
*
symbol
systemOfQuantities
unit
true
*
usedSystemOfUnits
*
allAccessibleSystemOfUnits
true
The query allAccessibleSystemOfUnits() gives all the SystemOfUnits directly or transitively included or used.
result
*
body
self->closure(includedSystemOfUnits->union(usedSystemOfUnits))->asSet()
OCL2.0
allAccessibleUnits
true
The query accessibleUnits() gives all the Units directly defined in a SystemOfUnits or transitively in any included or used SystemOfUnits.
result
*
body
allAccessibleSystemOfUnits()->collect(unit)->flatten()->asSet()
OCL2.0
allBaseQuantityKinds
true
The query allBaseQuantityKinds() gives all the QuantityKinds directly adopted or transitively adopted from any included SystemOfQuantities as base QuantityKinds in the effective SystemOfQuantities associated to a SystemOfUnits.
result
*
result
getEffectiveSystemOfQuantities().allBaseQuantityKinds()->flatten()->asSet()
OCL2.0
allBaseUnits
true
The query allBaseUnits() gives all the Units directly adopted or transitively adopted from any included SystemOfUnits as base Units.
result
*
body
allIncludedSystemOfUnits()->collect(baseUnit)->flatten()->asSet()->union(baseUnit)->asSet()
OCL2.0
allIncludedSystemOfUnits
true
The query allIncludedSystemOfUnits() gives all the SystemOfUnits directly or transitively included.
result
*
body
self->closure(includedSystemOfUnits->union(usedSystemOfUnits))->asSet()
OCL2.0
allMeasurementUnitsDefinedForSomeQuantityKind
true
The predicate allMeasurementUnitsDefinedForSomeQuantityKind() determines whether, in a SystemOfUnits, every Unit must be defined, by convention, as a multiplicable reference for at least one QuantityKind (see ISO 80000-1, 3.9).
result
body
allUnits()->forAll(quantityKind <> null)
OCL2.0
allPrefixes
true
The query allPrefixes() gives all the Prefixes in scope of a SystemOfUnits; that is, each Prefix is either directly defined in the SystemOfUnits or in any accessible SystemOfUnits.
result
*
body
allAccessibleSystemOfUnits()->including(self)->collect(prefix)->flatten()->asSet()
OCL2.0
allUnits
true
The query allUnits() gives all the Units in scope of a SystemOfUnits; that is, each Unit is either directly defined in the SystemOfUnits, selectively used from another SystemOfUnits or part of the scope of all the Units included from another SystemOfUnits.
result
*
body
allIncludedSystemOfUnits()->collect(unit)->flatten()->asSet()->union(unit)->asSet()
OCL2.0
getAdoptedBaseUnitForMeasurementUnit
true
The query getAdoptedBaseUnitForMeasurementUnit() determines for a Unit u in scope of a SystemOfUnits the base Unit, if any, corresponding to u, which can be u itself if it is a baseUnit in that SystemOfUnits or its reference Unit if it is a base Unit and u is a PrefixUnit.
result
u
body
let abu : Set(Unit) = allBaseUnits() in if (abu->includes(u)) then u else if (u.oclIsKindOf(PrefixedUnit)) then abu->intersection(u.oclAsType(PrefixedUnit).referenceUnit->asSet())->any(true) else null endif endif
OCL2.0
getAdoptedQuantityKindForAdoptedBaseUnitOfMeasurementUnit
true
The query getAdoptedQuantityKindForAdoptedBaseUnitOfMeasurementUnit() determines for a Unit u in scope of a SystemOfUnits the base QuantityKind, if any, corresponding to the base Unit of u.
result
*
u
body
let bu : Unit = getAdoptedBaseUnitForMeasurementUnit(u) in if (bu = null) then Set{} else let qks : Set(QuantityKind) = getKindOfQuantitiesForMeasurementUnit(bu) in allBaseQuantityKinds()->intersection(qks) endif
OCL2.0
knownPrimaryQuantityKind
getEffectiveSystemOfQuantities().allBaseQuantityKinds()->includesAll(result)
OCL2.0
baseUnitParameter
allBaseUnits()->includes(u)
OCL2.0
getEffectiveSystemOfQuantities
true
The query getEffectiveSystemOfQuantities() determines for a SystemOfUnits the SystemOfQuantities, if any, that it is directly or indirectly associated with via included SystemOfUnits.
result
body
if systemOfQuantities = null then includedSystemOfUnits->collect(getEffectiveSystemOfQuantities())->flatten()->asSet()->any(true) else systemOfQuantities endif
OCL2.0
atMostOneSystemOfQuantities
systemOfQuantities = null implies includedSystemOfUnits->collect(getEffectiveSystemOfQuantities())->asSet()->size() <= 1
OCL2.0
getKindOfQuantitiesForMeasurementUnit
true
The query getKindOfQuantitiesForMeasurementUnit() determines for a Unit u in scope of a SystemOfUnits the set of QuantityKinds corresponding to u, if specified, or to the Units that u is defined in terms of, if any.
result
*
u
body
if (u.oclIsKindOf(SimpleUnit))
then
u.quantityKind->collect(oclAsType(QuantityKind))->asSet()
else if (u.oclIsKindOf(DerivedUnit))
then let du : DerivedUnit = u.oclAsType(DerivedUnit) in
if (du.quantityKind <> null) then
du.quantityKind->collect(oclAsType(QuantityKind))->asSet()
else
getKindOfQuantitiesForMeasurementUnit(du.factor->any(true).unit)
endif
else if (u.oclIsKindOf(ConversionBasedUnit))
then let cu : ConversionBasedUnit = u.oclAsType(ConversionBasedUnit) in
if (cu.oclIsKindOf(PrefixedUnit))
then
getKindOfQuantitiesForMeasurementUnit(cu.referenceUnit)
else
if (cu.quantityKind <> null) then
cu.quantityKind->collect(oclAsType(QuantityKind))->asSet()
else
getKindOfQuantitiesForMeasurementUnit(cu.referenceUnit)
endif
endif
else
Set(QuantityKind){}
endif
endif
endif
OCL2.0
getUnit
name
result
body
allUnits()->select(u | u.name = name)->any(true)
OCL2.0
isCoherent
result
isCoherent
du
result
Unit
true
acyclic_unit_dependencies
A Unit cannot be defined in terms of itself. This follows from the requirement that, in a coherent SystemOfUnits, the Units of all derived QuantityKinds are expressed in terms of the base Units in accordance with the equations in the SystemOfQuantities (see ISO 80000-1, 6.4).
dependsOnUnits->excludes(self)
OCL2.0
dependsOnUnits
true
true
The set of all Units that this Unit directly or indirectly depends on according to its definition.
*
general
*
isUnitCountOfEntities
If true, indicates that the measurement unit represents a number of entities (see ISO 80000-1, 3.10, Note 3).
isUnitForQuantityOfDimensionOne
If true, indicates that the corresponding QuantityKind has dimension one (see ISO 80000-1, 3.8).
quantityKind
*
dependsOnUnits
Abstract operation specified in ConversionBasedUnit, SimpleUnit and DerivedUnit to calculate the value of the derived property Unit:/dependsOnUnits.
result
*
UnitFactor
exponent
unit
Rational
denominator
numerator
equivalent
r
result
plus
r
result
times
r
result