Capability (C096):— representing_value_with_unit Date: 2007/08/09 14:58:29
Revision: 1.22

Business overview

This section provides a business level overview of this capability.

This capability describes how a value and its unit is represented in AP239.

It defines four specific use cases, and describes the templates to be used in each:

Information model overview

This section provides an overview of the information model that supports this capability.

The EXPRESS-G for representing value with unit is shown in the figure below and explained in the following sections.



Figure 1 —  Information model overview

Figure 1 —  Information model overview

This capability contains two entities:

Use of External Reference Data for Units

All units are instantiated with th Entity Unit, classified with external reference data using Capability C010: assigning_reference_data. The following is a discussion on how to represent the multitude of subtypes of Unit with external reference data instead of using them explicitly.

The Value_with_unit supertype of Numerical_item_with_unit references a Unit that may be classified as an [SI_unit]
[warning:]Error RDL1: The class SI_unit does not exist in RDL at URI urn:plcs:rdl:std. Check the dexlib/data/refdata/rdl_index.xml
.

The Unit has amongst others the subtypes Length_unit, Mass_unit, Time_unit, Electric_current_unit, Thermodynamic_temperature_unit, Luminous_intensity_unit, Amount_of_substance_unit, Plane_angle_unit, Solid_angle_unit, and Ratio_unit. These subtypes correspond to the seven SI "base units", the plane and solid angle units formerly known as the "supplementary units" (now included with the SI derived units), and quantities defined as the ratios of two quantities of the same kind, which therefore have a dimension which may be expressed by the number one.

EXAMPLE    An example of a ratio unit is: refractive index.

In AP239, the name of the Unit should be given through external reference data, using C010: assigning_reference_data. The use of subtypes of Unit is therefore deprecated, but not forbidden, by this Capability. The use of external reference data combines the detailed structuring of the Unit subtypes in the model with a flexibility in defining new, specific units for particular purposes.

The PLCS Reference Data contains classes which directly corresponds to the subtypes defined by the model:

There are other subtypes of Unit:: Conversion_based_unit, Context_dependent_unit, and Derived_unit.

These are also represented in external reference data, as well as a basic assortment of sub-classes for each.

Conversion_based_units are units that are obtained from the SI base units using standard multiplication factors (such as the kilometre) or are non SI units which can be related back to the relevant SI unit using a conversion factor (such as the avoirdupois pound the imperial mass measurement used widely in the USA and other countries). Reference data that can be used to classify Unit in correspondence with a Conversion_based_unit include:

Derived_units are formed by combining base units.

EXAMPLE    The unit of force is a derivation of the length, mass, and time units.

NOTE    Derived_units may have a name in their own right such as the unit of force: newton or may be expressed purely in terms of base units such as the measurement of velocity: metre/second.

Reference data that can be used to classify Unit in correspondence with a Derived_unit include:

NOTE    The Derived_unit references a set of one or more Derived_unit_element objects which are classified with a dimensional exponent that indicates the mathematical relationship between a Derived_unit and the underlying base unit in SI. A derived imperial unit would be represented as a Conversion_based_unit that was related back to the equivalent SI derived unit. With external reference data assigned to Unit this capability is replaced and no longer possible, but the definition of each unit is carried in the external reference data library instead.

Context_dependent_units are units used in particular industrial, military, organizational or social contexts that do not form part of a formal system of units such as the SI.

EXAMPLE    Months, engine starts, and the item descriptions relating to quantities of items - such as 200 pairs of winter boots

Reference data that can be used to classify Unit in correspondence with a Context_dependent_unit include:

Any Unit classified with external reference data which is not one of the other subtypes described above, is automatically considered to be a Context_dependent_unit.

Capability templates

The following sections define a set of templates for the capability, where a template is a specification of a set of entities that need to be instantiated to represent a given set of information.

Template: representing_value_with_unit (Short name: rep_val_unit)

This section specifies the template representing_value_with_unit.

NOTE  An explanation of a template and the associated instantiation path is provided in the Template overview section.

Description

This template describes how to represent a generic value with unit. It should be used in general cases where a value with unit is required.

EXAMPLE    The geographic coordinates of a part.

NOTE    Where a numerical item (subtypes of Representation_item) is required, e.g. for property values, the template representing_numerical_item should be used instead.

Model diagrams
The EXPRESS-G diagram in Figure 1 shows the templates and EXPRESS entities that are required to represent the template "representing_value_with_unit". The text highlighted in blue shows the template parameters.


Figure 1 —  An EXPRESS-G representation of the Information model for representing_value_with_unit

Figure 1 —  An EXPRESS-G representation of the Information model for representing_value_with_unit

The graphic for the template to be used in other EXPRESS-G diagrams is shown in Figure  2 below.


Figure 2 —  
                      The graphical representation of representing_value_with_unit template

Figure 2 —   The graphical representation of representing_value_with_unit template

Input parameters
The following input parameters are defined for this template:
value (Type= 'SELECT (measure_value)' )
The value of the property. The datatype must also be indicated in this parameter, e.g. "ANY_NUMBER_VALUE(5)".
unit (Type='CLASS')
The class name of the unit in which the value is expressed, defined in external reference data.
The following classes and their sub-classes can be used:
classifications: "Unit" (urn:plcs:rdl:std:Unit)
unit_ecl_id (Default=urn:plcs:rdl:std,Type='URN')
The identifier of the External_class_library storing the definition of the class referenced by the parameter @unit.
si_unit (Type='BOOLEAN')
Value should be set to true if the unit is a SI base unit defined by ISO, i.e. kilogram (kg) for Mass, second (s) for Time, metre (m) for Displacement, ampere (A) for Electrical current, kelvin (K) for Temperature, mole (mol) for Amount of substance, and candela (cd) for Luminous intensity. If this is not the case it should be set to false.
Note that the representation of true and false depends on exchange format. In Part 21 (a STEP file) true is represented by the string ".T.", and false by ".F.", while in Part 28 (XML) they are represented by text strings "true" and "false".
Reference parameters
The following reference parameters are defined for this template:
value(Type='ENTITY (Value_with_unit)')
Allow the Value_with_unit entity instantiated in this path to be referenced when this template is used.
Note: The Value_with_unit entity can be referenced in a template path by:
%^target = $representing_value_with_unit.value%
where target is the parameter to which the Value_with_unit is bound.
unit(Type='ENTITY (Unit)')
Allow the Unit entity instantiated in this path to be referenced when this template is used.
Note: The Unit entity can be referenced in a template path by:
%^target = $representing_value_with_unit.unit%
where target is the parameter to which the Unit is bound.
Uniqueness constraints

The following parameter combinations specify a uniqueness constraint:
Unique constraint: Unique Unit
Each instance of the entity () within the data set shall be uniquely identified by a combination of the following parameters on this template (representing_value_with_unit) namely: unit, unit_ecl_id.
The instance is referenced by the following template parameter: .
Instantiation path
The instantiation path shown below specifies the entities that are to be instantiated by the template.
A description of templates and the syntax for the instantiation path is provided in the Reading Capability Templates help section.
Value_with_unit
%^value = Value_with_unit%

-- Set the Value_with_unit attribute value_component to the
-- value of the input parameter value
Value_with_unit.value_component -> @value

-- Instantiate Unit and assign
-- Value_with_unit to it
Value_with_unit.unit -> Unit

-- Set the Unit attributes
Unit.name = '/IGNORE'
Unit.si_unit -> @si_unit

-- Assign reference data for name of Unit
/assigning_reference_data(
    items=Unit,
    class_name=@unit,
    ecl_id=@unit_ecl_id)/
The following entities are instantiated with attributes as specified:
Entity in path Value Inherited from
Unit.name '/IGNORE'
Instance diagrams
The instance diagram in Figure  3 shows an example of the EXPRESS entities and templates that are instantiated by the template:
/representing_value_with_unit(value='ANY_NUMBER_VALUE(68.84)', si_unit='true', unit='radian', unit_ecl_id='urn:plcs:rdl:std')/
(an illustration of the consolidated representing_value_with_unit template is shown in Figure 4 below.)


Figure 3 —  Entities instantiated by representing_value_with_unit template

Figure 3 —  Entities instantiated by representing_value_with_unit template

The instance diagram in Figure 4 shows the graphic symbol for the template that is to be used in other instance diagrams. The example template is:
/representing_value_with_unit(value='ANY_NUMBER_VALUE(68.84)', si_unit='true', unit='radian', unit_ecl_id='urn:plcs:rdl:std')/


Figure 4 —  Instantiation of template

Figure 4 —  Instantiation of template

Characterizations
No common characterizations of the template representing_value_with_unit have been identified. However, the ISO 10303-239 EXPRESS model may enable other assignments to the entities instantiated by the template.
Template: representing_numerical_item (Short name: rep_num_item)

This section specifies the template representing_numerical_item.

NOTE  An explanation of a template and the associated instantiation path is provided in the Template overview section.

Description

This template describes how to represent a numerical item with unit. A numerical item is referenced from a (subtype of) Representation, as is the case for properties.

EXAMPLE    The value and unit of a product property, e.g. "3.1 kg" for a weight property.

Model diagrams
The EXPRESS-G diagram in Figure 1 shows the templates and EXPRESS entities that are required to represent the template "representing_numerical_item". The text highlighted in blue shows the template parameters.


Figure 1 —  An EXPRESS-G representation of the Information model for representing_numerical_item

Figure 1 —  An EXPRESS-G representation of the Information model for representing_numerical_item

The graphic for the template to be used in other EXPRESS-G diagrams is shown in Figure  2 below.


Figure 2 —  
                      The graphical representation of representing_numerical_item template

Figure 2 —   The graphical representation of representing_numerical_item template

Input parameters
The following input parameters are defined for this template:
value (Type= 'TYPE (any_number_value)' )
The value of the property. The datatype is always 'any_number_value' and should not be registered together with the value, i.e. enter the value as a number, without datatype.
unit (Type='CLASS')
The class name of the unit in which the value is expressed, defined in external reference data.
The following classes and their sub-classes can be used:
classifications: "Unit" (urn:plcs:rdl:std:Unit)
unit_ecl_id (Default=urn:plcs:rdl:std,Type='URN')
The identifier of the External_class_library storing the definition of the class referenced by the parameter @unit.
si_unit (Type='BOOLEAN')
Value should be set to true if the unit is a SI base unit defined by ISO, i.e. kilogram (kg) for Mass, second (s) for Time, metre (m) for Displacement, ampere (A) for Electrical current, kelvin (K) for Temperature, mole (mol) for Amount of substance, and candela (cd) for Luminous intensity. If this is not the case it should be set to false.
Note that the representation of true and false depends on exchange format. In Part 21 (a STEP file) true is represented by the string ".T.", and false by ".F.", while in Part 28 (XML) they are represented by text strings "true" and "false".
Reference parameters
The following reference parameters are defined for this template:
item(Type='ENTITY (Numerical_item_with_unit)')
Allow the Numerical_item_with_unit entity instantiated in this path to be referenced when this template is used.
Note: The Numerical_item_with_unit entity can be referenced in a template path by:
%^target = $representing_numerical_item.item%
where target is the parameter to which the Numerical_item_with_unit is bound.
unit_entity(Type='ENTITY (Unit)')
Allow the Unit entity instantiated in this path to be referenced when this template is used.
Note: The Unit entity can be referenced in a template path by:
%^target = $representing_numerical_item.unit_entity%
where target is the parameter to which the Unit is bound.
Uniqueness constraints

The following parameter combinations specify a uniqueness constraint:
Unique constraint: Unique Unit
Each instance of the entity (Unit) within the data set shall be uniquely identified by a combination of the following parameters on this template (representing_numerical_item) namely: unit, unit_ecl_id.
The instance is referenced by the following template parameter: unit_entity.
Instantiation path
The instantiation path shown below specifies the entities that are to be instantiated by the template.
A description of templates and the syntax for the instantiation path is provided in the Reading Capability Templates help section.
-- Instantiate Numerical_item_with_unit
-- and associate it with reference param ^item
Numerical_item_with_unit
%^item = Numerical_item_with_unit%

-- Set the Numerical_item_with_unit attribute name to be ignored
Numerical_item_with_unit.name = '/IGNORE'

-- Set the Numerical_item_with_unit attribute value_component to the
-- value of the input parameter value
Numerical_item_with_unit.value_component -> @value

-- Instantiate Unit and Bind the Unit to the parameter ^unit_entity.
-- The parameter is a reference parameter so the Unit
-- entity can be referred to when this template is used.
%^unit_entity = Unit%

-- Instantiate assign Numerical_item_with_unit to unit
Numerical_item_with_unit.unit -> ^unit_entity

-- Set the Unit attributes
Unit.name = '/IGNORE'
Unit.si_unit -> @si_unit

-- Assign reference data for name of Unit
/assigning_reference_data(
    items=Unit,
    class_name=@unit,
    ecl_id=@unit_ecl_id)/
The following entities are instantiated with attributes as specified:
Entity in path Value Inherited from
Numerical_item_with_unit.name '/IGNORE' Representation_item.name
Unit.name '/IGNORE'
Instance diagrams
The instance diagram in Figure  3 shows an example of the EXPRESS entities and templates that are instantiated by the template:
/representing_numerical_item(value='any_number_value(3.1)', si_unit='T', unit='Kilogram', unit_ecl_id='urn:plcs:rdl:std')/
(an illustration of the consolidated representing_numerical_item template is shown in Figure 4 below.)


Figure 3 —  Entities instantiated by representing_numerical_item template

Figure 3 —  Entities instantiated by representing_numerical_item template

The instance diagram in Figure 4 shows the graphic symbol for the template that is to be used in other instance diagrams. The example template is:
/representing_numerical_item(value='any_number_value(3.1)', si_unit='T', unit='Kilogram', unit_ecl_id='urn:plcs:rdl:std')/


Figure 4 —  Instantiation of template

Figure 4 —  Instantiation of template

Characterizations
No common characterizations of the template representing_numerical_item have been identified. However, the ISO 10303-239 EXPRESS model may enable other assignments to the entities instantiated by the template.
Template: representing_quantity (Short name: rep_quantity)

This section specifies the template representing_quantity.

NOTE  An explanation of a template and the associated instantiation path is provided in the Template overview section.

Description

This template describes how to represent a quantity.

EXAMPLE    50 litres of petrol.

Model diagrams
The EXPRESS-G diagram in Figure 1 shows the templates and EXPRESS entities that are required to represent the template "representing_quantity". The text highlighted in blue shows the template parameters.


Figure 1 —  An EXPRESS-G representation of the Information model for representing_quantity

Figure 1 —  An EXPRESS-G representation of the Information model for representing_quantity

The graphic for the template to be used in other EXPRESS-G diagrams is shown in Figure  2 below.


Figure 2 —  
                     The graphical representation of representing_quantity template

Figure 2 —   The graphical representation of representing_quantity template

Input parameters
The following input parameters are defined for this template:
value (Type= 'TYPE (any_number_value)' )
The value of the property. The datatype is always 'any_number_value' and should not be registered together with the value, i.e. enter the value as a number, without datatype.
unit_class_name (Type='CLASS')
The class name of the corresponding to the quantity unit.
The following classes and their sub-classes can be used:
classifications: "Unit" (urn:plcs:rdl:std:Unit)
unit_ecl_id (Default=urn:plcs:rdl:std,Type='URN')
The identifier of the External_class_library storing the definition of the class referenced by the parameter @class_name.
si_unit (Default=false,Type='BOOLEAN')
Value should be set to true if the unit is a SI base unit defined by ISO, i.e. kilogram (kg) for Mass, second (s) for Time, metre (m) for Displacement, ampere (A) for Electrical current, kelvin (K) for Temperature, mole (mol) for Amount of substance, and candela (cd) for Luminous intensity. If this is not the case it should be set to false.
Note that the representation of true and false depends on exchange format. In Part 21 (a STEP file) true is represented by the string ".T.", and false by ".F.", while in Part 28 (XML) they are represented by text strings "true" and "false".
Reference parameters
The following reference parameters are defined for this template:
quantity(Type='ENTITY (Value_with_unit)')
Allow the Value_with_unit entity instantiated in this path to be referenced when this template is used.
Note: The Value_with_unit entity can be referenced in a template path by:
%^target = $representing_quantity.quantity%
where target is the parameter to which the Value_with_unit is bound.
unit(Type='ENTITY (Unit)')
Allow the Unit entity instantiated in this path to be referenced when this template is used.
Note: The Unit entity can be referenced in a template path by:
%^target = $representing_quantity.unit%
where target is the parameter to which the Unit is bound.
Uniqueness constraints

The following parameter combinations specify a uniqueness constraint:
Unique constraint: Unique unit
Each instance of the entity (Unit) within the data set shall be uniquely identified by a combination of the following parameters on this template (representing_quantity) namely: unit_class_name, unit_ecl_id.
The instance is referenced by the following template parameter: unit.
Instantiation path
The instantiation path shown below specifies the entities that are to be instantiated by the template.
A description of templates and the syntax for the instantiation path is provided in the Reading Capability Templates help section.
-- Instantiate Value_with_unit entity
Value_with_unit

-- Set the Value_with_unit attributes
Value_with_unit.value_component -> @value

-- Bind the Value_with_unit to the parameter ^quantity.
-- The parameter is a reference parameter so the Value_with_unit
-- entity can be referred to when this template is used.
%^quantity = Value_with_unit%

-- Bind the Unitt to the parameter ^unit.
-- The parameter is a reference parameter so the Uunit
-- entity can be referred to when this template is used.
%^unit = Unit%

-- Instantiate entity Unit and point at it
Value_with_unit.unit -> Unit

-- Set the Unit attributes
Unit.si_unit -> @si_unit
Unit.name = '/IGNORE'

-- Assign reference data for name of Unit
/assigning_reference_data(
    items=Unit,
    class_name=@unit_class_name,
    ecl_id=@unit_ecl_id)/
The following entities are instantiated with attributes as specified:
Entity in path Value Inherited from
Unit.name '/IGNORE'
Instance diagrams
The instance diagram in Figure  3 shows an example of the EXPRESS entities and templates that are instantiated by the template:
/representing_quantity(value='ANY_NUMBER_VALUE(5)', si_unit='false', unit_class_name='Gallon', unit_ecl_id='urn:plcs:rdl:sample')/
(an illustration of the consolidated representing_quantity template is shown in Figure 4 below.)


Figure 3 —  Entities instantiated by representing_quantity template

Figure 3 —  Entities instantiated by representing_quantity template

The instance diagram in Figure 4 shows the graphic symbol for the template that is to be used in other instance diagrams. The example template is:
/representing_quantity(value='ANY_NUMBER_VALUE(5)', si_unit='false', unit_class_name='Gallon', unit_ecl_id='urn:plcs:rdl:sample')/


Figure 4 —  Instantiation of representing_quantity template

Figure 4 —  Instantiation of representing_quantity template

Characterizations
No common characterizations of the template representing_quantity have been identified. However, the ISO 10303-239 EXPRESS model may enable other assignments to the entities instantiated by the template.
Template: representing_count (Short name: rep_count)

This section specifies the template representing_count.

NOTE  An explanation of a template and the associated instantiation path is provided in the Template overview section.

Description

This template describes how to represent a count of items.

EXAMPLE    The number of spark plugs.

Model diagrams
The EXPRESS-G diagram in Figure 1 shows the templates and EXPRESS entities that are required to represent the template "representing_count". The text highlighted in blue shows the template parameters.


Figure 1 —  An EXPRESS-G representation of the Information model for representing_count

Figure 1 —  An EXPRESS-G representation of the Information model for representing_count

The graphic for the template to be used in other EXPRESS-G diagrams is shown in Figure  2 below.


Figure 2 —  
                     The graphical representation of representing_count template

Figure 2 —   The graphical representation of representing_count template

Input parameters
The following input parameters are defined for this template:
value (Default=1,Type= 'TYPE (any_number_value)' )
The value of the quantity. Default value is 1. The datatype is always 'any_number_value' and should not be registered together with the value, i.e. enter the value as a number, without datatype.
Reference parameters
The following reference parameters are defined for this template:
count(Type='ENTITY (Value_with_unit)')
Allow the Value_with_unit entity instantiated in this path to be referenced when this template is used.
Note: The Value_with_unit entity can be referenced in a template path by:
%^target = $representing_count.count%
where target is the parameter to which the Value_with_unit is bound.
unit(Type='ENTITY (Unit)')
Allow the Unit entity instantiated in this path to be referenced when this template is used.
Note: The Unit entity can be referenced in a template path by:
%^target = $representing_count.unit%
where target is the parameter to which the Unit is bound.
Uniqueness constraints

The following parameter combinations specify a uniqueness constraint:
Unique constraint: Unique Count unit
Each instance of the entity (Unit) within the data set shall be uniquely identified by the parameter values set on the following templates instantiated by representing_count namely: template #1 assigning_reference_data(class_name=Count, ecl_id=urn:plcs:std:rdl).
The instance is referenced by the following template parameter: unit.
Instantiation path
The instantiation path shown below specifies the entities that are to be instantiated by the template.
A description of templates and the syntax for the instantiation path is provided in the Reading Capability Templates help section.
-- Instantiate Value_with_unit entity
Value_with_unit

-- Set the Value_with_unit attributes
Value_with_unit.value_component -> @value

-- Instantiate Unit and point at it
Value_with_unit.unit -> Unit

-- Set the Unit attributes
Unit.si_unit = 'false'
Unit.name = '/IGNORE'

-- Bind the Value_with_unit to the parameter ^count.
-- The parameter is a reference parameter so the Value_with_unit
-- entity can be referred to when this template is used.
%^count = Value_with_unit%

-- Bind the Unit to the parameter ^unit.
-- The parameter is a reference parameter so the Unitt
-- entity can be referred to when this template is used.
%^unit = Unit%

-- Assign reference data for name of Unit
/assigning_reference_data(
    items=Unit,
    class_name='Count',
    ecl_id='urn:plcs:rdl:std')/
The following entities are instantiated with attributes as specified:
Entity in path Value Inherited from
Unit.si_unit 'false'
Unit.name '/IGNORE'
Instance diagrams
The instance diagram in Figure  3 shows an example of the EXPRESS entities and templates that are instantiated by the template:
/representing_count(value='ANY_NUMBER_VALUE(5)')/
(an illustration of the consolidated representing_count template is shown in Figure 4 below.)


Figure 3 —  Entities instantiated by representing_count template

Figure 3 —  Entities instantiated by representing_count template

The instance diagram in Figure 4 shows the graphic symbol for the template that is to be used in other instance diagrams. The example template is:
/representing_count(value='ANY_NUMBER_VALUE(5)')/


Figure 4 —  Instantiation of representing_count template

Figure 4 —  Instantiation of representing_count template

Characterizations
No common characterizations of the template representing_count have been identified. However, the ISO 10303-239 EXPRESS model may enable other assignments to the entities instantiated by the template.

© OASIS 2010 — All rights reserved