Application module: Product occurrence ISO/TS 10303-1063:2018-11(E)
© ISO

Cover page
Table of contents
Copyright
Foreword
Introduction
1 Scope
2 Normative references
3 Terms, definitions and abbreviated terms
    3.1 Terms and definitions
    3.2 Abbreviated terms

4 Information requirements
   4.1 Required AM ARMs
   4.2 ARM type definition
   4.3 ARM entity definitions
5 Module interpreted model
   5.1 Mapping specification
   5.2 MIM EXPRESS short listing
     5.2.1 MIM type definition
     5.2.2 MIM function definition
     5.2.3 MIM rule definitions

A MIM short names
B Information object registration
C ARM EXPRESS-G   EXPRESS-G
D MIM EXPRESS-G   EXPRESS-G
E Computer interpretable listings
F Change history
Bibliography
Index

(*
ISO/TC 184/SC 4/WG 12 N9690 - ISO/TS 10303-1063 Product occurrence - EXPRESS MIM
Supersedes ISO/TC 184/SC 4/WG 12 N4267
*)



SCHEMA Product_occurrence_mim;

USE FROM Assembly_structure_mim;    -- ISO/TS 10303-1026

USE FROM Product_view_definition_relationship_mim;    -- ISO/TS 10303-1041

USE FROM Extended_measure_representation_mim;    -- ISO/TS 10303-1106

USE FROM Specified_product_mim;    -- ISO/TS 10303-1104

USE FROM Part_view_definition_mim;    -- ISO/TS 10303-1023

USE FROM product_structure_schema   -- ISO 10303-44
  (product_definition_occurrence,
   product_definition_occurrence_relationship,
   product_definition_specified_occurrence,
   product_definition_occurrence_reference,
   product_definition_occurrence_reference_with_local_representation,
   quantified_assembly_component_usage);

USE FROM product_definition_schema   -- ISO 10303-41
  (product_definition_relationship);

USE FROM product_property_definition_schema   -- ISO 10303-41
  (characterized_product_definition,
   property_definition);

USE FROM product_property_representation_schema   -- ISO 10303-41
  (property_definition_representation);

REFERENCE FROM support_resource_schema   -- ISO 10303-41
  (bag_to_set);


TYPE product_definition_or_assembly_relationship = SELECT
   (assembly_component_usage,
    product_definition);
END_TYPE;

RULE restrict_part_occurrence FOR
(product_definition);
LOCAL
      part_occurrences: SET OF product_definition := QUERY(pd <* product_definition | 
	    ( pd.frame_of_reference.name = 'part occurrence' ));
    END_LOCAL;
WHERE
  WR1: SIZEOF ( QUERY ( pd <* part_occurrences | ( NOT( pd.name IN ['single instance' , 'selected instance' ,'quantified instance' , 'specified instance' ] ) ) ) ) = 0;
  WR2: SIZEOF ( QUERY ( pd <* part_occurrences | (SIZEOF ( QUERY ( pdr <* USEDIN ( pd , 'PRODUCT_DEFINITION_SCHEMA.' + 'PRODUCT_DEFINITION_RELATIONSHIP.RELATED_PRODUCT_DEFINITION' ) | pdr.name = 'definition usage' ) ) <>1 ) AND ( SIZEOF ( QUERY ( cd <* USEDIN ( pd , 'CONFIGURATION_MANAGEMENT_SCHEMA.' + 'CONFIGURATION_DESIGN.DESIGN' ) | ( cd.name = 'occurrence usage definition' ) AND ( NOT ('SPECIFIED_PRODUCT_MIM.' + 'PRODUCT_IDENTIFICATION' IN TYPEOF( cd.configuration ) ) ) ) ) <>1 ) ) ) = 0;
  WR3: SIZEOF ( QUERY ( pd <* part_occurrences | (SIZEOF ( QUERY ( cd <* USEDIN ( pd , 'PRODUCT_DEFINITION_SCHEMA.'+ 'PRODUCT_DEFINITION_RELATIONSHIP.RELATED_PRODUCT_DEFINITION' ) | ( 'PRODUCT_STRUCTURE_SCHEMA.' +'PRODUCT_DEFINITION_USAGE' IN TYPEOF ( cd ) ) ) ) = 0 )AND ( SIZEOF ( USEDIN ( pd , 'PRODUCT_STRUCTURE_SCHEMA.' + 'PRODUCT_DEFINITION_OCCURRENCE_RELATIONSHIP.OCCURRENCE' ) ) = 0 ) ) ) = 0;
  WR4: SIZEOF ( QUERY ( pd <* part_occurrences | ( pd.name = 'selected instance' ) AND NOT valid_selected_instance_representation(pd) ))=0;
  WR5: SIZEOF ( QUERY ( pd <* part_occurrences | ( pd.name = 'quantified instance' ) AND ( SIZEOF ( QUERY (ppd <* USEDIN ( pd , 'PRODUCT_PROPERTY_DEFINITION_SCHEMA.' +'PROPERTY_DEFINITION.DEFINITION' ) | ( ppd.name ='occurrence quantity' ) AND ( SIZEOF ( QUERY ( pdr <*USEDIN ( ppd , 'PRODUCT_PROPERTY_REPRESENTATION_SCHEMA.' +'PROPERTY_DEFINITION_REPRESENTATION.DEFINITION' ) | ( pdr.used_representation.name = 'quantity' ) AND (SIZEOF ( pdr.used_representation.items ) = 1 ) AND (SIZEOF ( QUERY ( i <* pdr.used_representation.items | ('QUALIFIED_MEASURE_SCHEMA.' + 'MEASURE_REPRESENTATION_ITEM' IN TYPEOF ( i ) ) AND ( i.name = 'quantity measure' ) ) ) = 1)))= 1 )))= 0 )))= 0;
  WR6: SIZEOF ( QUERY ( pd <* part_occurrences | ( pd.name = 'specified instance' ) AND ( SIZEOF ( QUERY ( pdor <* USEDIN ( pd , 'PRODUCT_STRUCTURE_SCHEMA.' +'PRODUCT_DEFINITION_OCCURRENCE_RELATIONSHIP.OCCURRENCE' ) | 'PRODUCT_STRUCTURE_SCHEMA.' +'SPECIFIED_HIGHER_USAGE_OCCURRENCE' IN TYPEOF ( pdor.occurrence_usage ) ) ) = 0 ) ) ) = 0;
END_RULE;

RULE restrict_part_occurrence_category FOR
(product_definition);
LOCAL
      part_occurrences: SET OF product_definition := QUERY( pd <* product_definition |(
        pd.frame_of_reference.name = 'part occurrence'));
    END_LOCAL;
WHERE
  WR1: SIZEOF( QUERY( pd <* part_occurrences | (SIZEOF( QUERY( prpc <* USEDIN(pd.formation.of_product, 'PRODUCT_DEFINITION_SCHEMA.PRODUCT_RELATED_PRODUCT_CATEGORY.PRODUCTS') | prpc.name IN ['part','raw material','tool'] )) = 0 ) )) = 0;
END_RULE;

RULE restrict_product_definitions_for_definition_usage FOR
(product_definition_relationship);
WHERE
  WR1: SIZEOF ( QUERY ( pdr <* product_definition_relationship | ( pdr.name = 'definition usage' ) AND ( ( pdr.relating_product_definition.frame_of_reference.name<> 'part definition' ) OR ( pdr.related_product_definition.frame_of_reference.name<>'part occurrence' )))) =0;
END_RULE;

RULE selected_instance_usage_requires_representation FOR
(assembly_component_usage);
LOCAL
      selected_instance_usages: SET OF assembly_component_usage := QUERY( acr <* assembly_component_usage|
        (acr.name = 'selected instance usage'));
    END_LOCAL;
WHERE
  WR1: SIZEOF ( QUERY ( acr <* selected_instance_usages | NOT valid_selected_instance_representation(acr) ))=0;
END_RULE;

FUNCTION valid_selected_instance_representation
 (pd : product_definition_or_assembly_relationship) : LOGICAL;
LOCAL
      properties: SET OF property_definition := bag_to_set(QUERY( prd<* USEDIN ( pd ,'PRODUCT_PROPERTY_DEFINITION_SCHEMA.PROPERTY_DEFINITION.DEFINITION' ) | 
        (prd.name = 'occurrence selection' )));
      property_definition_representations: SET OF property_definition_representation := bag_to_set(QUERY ( pdr <* USEDIN ( properties[1] , 'PRODUCT_PROPERTY_REPRESENTATION_SCHEMA.PROPERTY_DEFINITION_REPRESENTATION.DEFINITION') | 
	    ( pdr.used_representation.name = 'selection criteria' )));
      selected_representation: representation;
    END_LOCAL;
    IF (SIZEOF( properties)<>1) THEN
	  RETURN(FALSE);
    END_IF;
    IF (SIZEOF(property_definition_representations)<>1) THEN
	  RETURN(FALSE);
    END_IF;
    selected_representation := property_definition_representations[1]\property_definition_representation.used_representation;
    IF (SIZEOF(selected_representation\representation.items) <1) OR (SIZEOF(selected_representation\representation.items) >2) THEN
	  RETURN(FALSE);
    END_IF;
    IF (SIZEOF ( QUERY ( i <* selected_representation\representation.items |
	  ( SIZEOF (['QUALIFIED_MEASURE_SCHEMA.MEASURE_REPRESENTATION_ITEM' ,
      'EXTENDED_MEASURE_REPRESENTATION_MIM.VALUE_RANGE']* TYPEOF ( i ) ) = 1) AND
      ( i.name = 'selection quantity' ))) <> 1 ) THEN
      RETURN(FALSE);
    END_IF;
    IF (SIZEOF ( QUERY ( i <* selected_representation\representation.items |
	  ( 'QUALIFIED_MEASURE_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM' IN TYPEOF ( i ) ) AND
 	  ( i.name = 'selection control' )))> 1) THEN
	  RETURN(FALSE);
    END_IF; --the selection control is not specified then the quantity shall be a qualified_representation_item or a value_range
    IF (SIZEOF ( QUERY ( i <* selected_representation\representation.items |
      ( 'QUALIFIED_MEASURE_SCHEMA.DESCRIPTIVE_REPRESENTATION_ITEM' IN TYPEOF( i ) ) AND
      ( i.name = 'selection control' ) ))= 0) AND 
      (SIZEOF ( QUERY ( i <* selected_representation\representation.items |
      ( i.name = 'selection quantity' ) AND  
      ( SIZEOF(['QUALIFIED_MEASURE_SCHEMA.QUALIFIED_REPRESENTATION_ITEM' ,
      'EXTENDED_MEASURE_REPRESENTATION_MIM.VALUE_RANGE']* TYPEOF ( i ) ) =0 ))) > 0 ) THEN
	  RETURN(FALSE);
    END_IF;
    RETURN(TRUE);
END_FUNCTION;

END_SCHEMA;  -- Product_occurrence_mim


© ISO 2018 — All rights reserved