Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[New Model]: Pi10 new model MaterialDemand #404

Merged
merged 14 commits into from
Nov 8, 2023
Merged
313 changes: 313 additions & 0 deletions io.catenax.material_demand/1.0.0/MaterialDemand.ttl
Original file line number Diff line number Diff line change
@@ -0,0 +1,313 @@
#######################################################################
# Copyright (c) 2023 BASF SE
# Copyright (c) 2023 Bayerische Motoren Werke Aktiengesellschaft (BMW AG)
# Copyright (c) 2023 Fraunhofer-Gesellschaft zur Foerderung der angewandten Forschung e.V. (represented by Fraunhofer IML and Fraunhofer ISST)
# Copyright (c) 2023 Henkel AG & Co. KGaA
# Copyright (c) 2023 ISTOS GmbH (a member of the DMG Mori Group)
# Copyright (c) 2023 Mercedes Benz AG
# Copyright (c) 2023 SAP SE
# Copyright (c) 2023 SupplyOn AG
# Copyright (c) 2023 TRUMPF Werkzeugmaschinen SE + Co. KG
# Copyright (c) 2023 Volkswagen AG
# Copyright (c) 2023 ZF Friedrichshafen AG
# Copyright (c) 2023 Contributors to the Eclipse Foundation
#
# See the NOTICE file(s) distributed with this work for additional
# information regarding copyright ownership.
#
# This work is made available under the terms of the
# Creative Commons Attribution 4.0 International (CC-BY-4.0) license,
# which is available at
# https://creativecommons.org/licenses/by/4.0/legalcode.
#
# SPDX-License-Identifier: CC-BY-4.0
#######################################################################

@prefix samm: <urn:samm:org.eclipse.esmf.samm:meta-model:2.0.0#> .
@prefix samm-c: <urn:samm:org.eclipse.esmf.samm:characteristic:2.0.0#> .
@prefix samm-e: <urn:samm:org.eclipse.esmf.samm:entity:2.0.0#> .
@prefix unit: <urn:samm:org.eclipse.esmf.samm:unit:2.0.0#> .
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .
@prefix : <urn:samm:io.catenax.material_demand:1.0.0#> .
@prefix ext-number: <urn:samm:io.catenax.shared.business_partner_number:1.0.0#> .
@prefix ext-quantity: <urn:samm:io.catenax.shared.quantity:1.0.0#> .
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@agg3fe Model aready uses shared.quantity model

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Your model is using it, but in your PR code there is no quantity model present. That is why validation is failing. What you need to do is to update your PR with code from main branch. then locally also you would be able to validate it.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

okay done, branch now contains quantity model

@prefix ext-uuid: <urn:samm:io.catenax.shared.uuid:1.0.0#> .

:MaterialDemand a samm:Aspect ;
samm:preferredName "Material Demand"@en ;
samm:description "The requirements of a customer towards a specific supplier for a specific material. Each material demand is unique by its Customer, Supplier and Material Number."@en ;
samm:properties ( :materialDemandId :demandSeries :customer :supplier [ samm:property :unitOfMeasure; samm:optional true ] :materialNumberCustomer [ samm:property :materialNumberSupplier; samm:optional true ] :materialDescriptionCustomer :changedAt [ samm:property :materialGlobalAssetId; samm:optional true ] :demandRate :unitOfMeasureIsOmitted ) ;
samm:operations ( ) ;
samm:events ( ) .

:materialDemandId a samm:Property ;
samm:preferredName "Material Demand ID"@en ;
samm:description "The Material Demand ID uniquely identifies the material demand within the business relationship between a customer and its supplier."@en ;
samm:characteristic ext-uuid:UuidV4Trait ;
samm:exampleValue "0157ba42-d2a8-4e28-8565-7b07830c1110" .

:demandSeries a samm:Property ;
samm:preferredName "Demand Series"@en ;
samm:description "The demands for a dedicated material in a given time period of a given demand rate, distinguished by their demand location and demand category."@en ;
samm:characteristic :DemandSeriesSet .

:customer a samm:Property ;
samm:preferredName "Customer"@en ;
samm:description "The Business Partner Number Legal Entity (BPNL) of the party requesting materials from a supplier."@en ;
samm:characteristic ext-number:BpnlTrait ;
samm:exampleValue "BPNL8888888888XX" .

:supplier a samm:Property ;
samm:preferredName "Supplier"@en ;
samm:description "The Business Partner Number Legal Entity (BPNL) of the party providing materials to a customer."@en ;
samm:characteristic ext-number:BpnlTrait ;
samm:exampleValue "BPNL6666666666YY" .

:unitOfMeasure a samm:Property ;
samm:preferredName "Unit of Measure"@en ;
samm:description "Unit of measurement for demand quantities."@en ;
samm:characteristic ext-quantity:ItemUnitEnumeration ;
samm:exampleValue "unit:piece"^^samm:curie .

:materialNumberCustomer a samm:Property ;
samm:preferredName "Customer Material Number"@en ;
samm:description "Material identifier as assigned by customer. This material number identifies the material (as planned) in customer's database. Must be unique for each Material Demand in the customer-supplier relationship."@en ;
samm:characteristic :MaterialNumber ;
samm:exampleValue "MNR-7307-AU340474.002" .

:materialNumberSupplier a samm:Property ;
samm:preferredName "Supplier Material Number"@en ;
samm:description "Material identifier as assigned by supplier. This material number identifies the material (as planned) in supplier's database."@en ;
samm:characteristic :MaterialNumber ;
samm:exampleValue "MNR-8101-ID146955.001" .

:materialDescriptionCustomer a samm:Property ;
samm:preferredName "Customer Material Description"@en ;
samm:description "Description of the material."@en ;
samm:characteristic :MaterialDescription ;
samm:exampleValue "Spark Plug" .

:changedAt a samm:Property ;
samm:preferredName "Changed At"@en ;
samm:description "Point in time when the content (any property according to the data model) of the material demand was changed, at the customer, either by a human user or an automated process."@en ;
samm:characteristic :Timestamp ;
samm:exampleValue "2023-11-05T08:15:30.123-05:00"^^xsd:dateTimeStamp .

:materialGlobalAssetId a samm:Property ;
samm:preferredName "Material Number UUID of the Customer's Twin"@en ;
samm:description "Material identifier used uniquely within Catena-X to identify the Material (e.g. PartAsPlanned)."@en ;
samm:characteristic ext-uuid:UuidV4Trait ;
samm:exampleValue "urn:uuid:48878d48-6f1d-47f5-8ded-a441d0d879df" .

:demandRate a samm:Property ;
samm:preferredName "Demand Rate"@en ;
samm:description "Describes the demand rate or granularity of the demand information. It defines how to interpret the point in time."@en ;
samm:characteristic :DemandRateEnumeration .

:unitOfMeasureIsOmitted a samm:Property ;
samm:preferredName "Unit Of Measure Is Omitted"@en ;
samm:description "Explicit indicator of whether the unit of measure is left out of the payload intentionally. If \"true\" it means the sending application sends demand values without unit of measure intentionally and the unit of measure MUST NOT be contained in the payload. If \"false\" a unit of measure MUST be supplied."@en ;
samm:characteristic samm-c:Boolean ;
samm:exampleValue false .

:DemandSeriesSet a samm-c:Set ;
samm:preferredName "Demand Series Set"@en ;
samm:description "A set of demand series belonging to a certain material demand. Each demand series in the set must have a unique combination of customer location and demand category."@en ;
samm:dataType :DemandSeries .

:MaterialNumber a samm:Characteristic ;
samm:preferredName "Material Number"@en ;
samm:description "The material number is a multi-character string, usually assigned by an ERP system."@en ;
samm:dataType xsd:string .

:MaterialDescription a samm:Characteristic ;
samm:preferredName "Material Description"@en ;
samm:description "Description of a material demand."@en ;
samm:dataType xsd:string .

:Timestamp a samm:Characteristic ;
samm:preferredName "Timestamp"@en ;
samm:description "Point in time."@en ;
samm:dataType xsd:dateTimeStamp .

:DemandRateEnumeration a samm-c:Enumeration ;
samm:preferredName "Demand Rate Enumeration"@en ;
samm:description "The demand rate specifies the time horizon of the the demand.\n- day = time between the start of the specified day till the end of the specified day (ISO-8601).\n- calendar week = time between the start of the specified calendar week till the end of the specified calendar week (ISO-8601-1:2019)."@en ;
samm:dataType :DemandRateType ;
samm-c:values ( :DemandRateCalendarWeek :DemandRateDay ) .

:DemandSeries a samm:Entity ;
samm:preferredName "Demand Series"@en ;
samm:description "Encapsulates the demand series related information."@en ;
samm:properties ( :customerLocation :demandCategory :demands [ samm:property :expectedSupplierLocation; samm:optional true ] ) .

:DemandRateType a samm:Entity ;
samm:preferredName "Demand Rate Type"@en ;
samm:description "Type defining the possible demand rates."@en ;
samm:properties ( :demandRateCode [ samm:property :demandRateName; samm:notInPayload true ] ) .

:DemandRateCalendarWeek a :DemandRateType ;
:demandRateCode "WKS" ;
:demandRateName "Calendar Week"@en .

:DemandRateDay a :DemandRateType ;
:demandRateCode "DAY" ;
:demandRateName "Day"@en .

:customerLocation a samm:Property ;
samm:preferredName "Customer Location"@en ;
samm:description "The Business Partner Number Site (BPNS) of the site at which the customer needs the specified material for this demand series."@en ;
samm:characteristic ext-number:BpnsTrait ;
samm:exampleValue "BPNS8888888888XX" .

:demandCategory a samm:Property ;
samm:preferredName "Demand Category"@en ;
samm:description "Type of demand for this demand series."@en ;
samm:characteristic :DemandCategoryCharacteristic .

:demands a samm:Property ;
samm:preferredName "Demands"@en ;
samm:description "A time series with a specified demand rate along a given time period to describe the demand values for this demand series."@en ;
samm:characteristic :DemandDateSeries .

:expectedSupplierLocation a samm:Property ;
samm:preferredName "Expected Supplier Location"@en ;
samm:description "The Business Partner Number Site (BPNS) of the site from where the customer expects the supplier to fulfill the demands of the demand series. The value is used for informational purposes only and is therefore not binding for the supplier."@en ;
samm:characteristic ext-number:BpnsTrait ;
samm:exampleValue "BPNS8888888888XX" .

:demandRateCode a samm:Property ;
samm:preferredName "Demand Rate Code"@en ;
samm:description "Code identifying the demand rate."@en ;
samm:characteristic :DemandRateCodeCharacteristic ;
samm:exampleValue "WKS" .

:demandRateName a samm:Property ;
samm:preferredName "Demand Rate Name"@en ;
samm:description "The name describing the demand rate."@en ;
samm:characteristic :DemandRateNameCharacteristic .

:DemandCategoryCharacteristic a samm-c:Enumeration ;
samm:preferredName "Demand Category Characteristic"@en ;
samm:description "The classification of demands used for prioritization or allocation."@en ;
samm:dataType :DemandCategoryType ;
samm-c:values ( :DemandCategoryDefault :DemandCategoryAfterSales :DemandCategorySeries :DemandCategoryPhaseInPeriod :DemandCategorySingleOrder :DemandCategorySmallSeries :DemandCategoryExtraordinaryDemand :DemandCategoryPhaseOutPeriod ) .

:DemandDateSeries a samm-c:SortedSet ;
samm:preferredName "Demand Date Series"@en ;
samm:description "The demands in a given time period for a given demand rate."@en ;
samm:dataType :Demand .

:DemandRateCodeCharacteristic a samm:Characteristic ;
samm:preferredName "Demand Rate Code Characteristic"@en ;
samm:description "The code that is actually used in the payload to indicate the demand rate."@en ;
samm:dataType xsd:string .

:DemandRateNameCharacteristic a samm:Characteristic ;
samm:preferredName "Demand Rate Name Characteristic"@en ;
samm:description "The name describing the demand rate in the SAMM."@en ;
samm:dataType rdf:langString .

:DemandCategoryType a samm:Entity ;
samm:preferredName "Demand Category Type"@en ;
samm:description "Describes the type of a demand category."@en ;
samm:properties ( :demandCategoryCode [ samm:property :demandCategoryName; samm:notInPayload true ] ) .

:DemandCategoryDefault a :DemandCategoryType ;
:demandCategoryCode "0001" ;
:demandCategoryName "Default"@en .

:DemandCategoryAfterSales a :DemandCategoryType ;
:demandCategoryCode "A1S1" ;
:demandCategoryName "After-Sales"@en .

:DemandCategorySeries a :DemandCategoryType ;
:demandCategoryCode "SR99" ;
:demandCategoryName "Series"@en .

:DemandCategoryPhaseInPeriod a :DemandCategoryType ;
:demandCategoryCode "PI01" ;
:demandCategoryName "Phase-In Period"@en .

:DemandCategorySingleOrder a :DemandCategoryType ;
:demandCategoryCode "OS01" ;
:demandCategoryName "Single Order"@en .

:DemandCategorySmallSeries a :DemandCategoryType ;
:demandCategoryCode "OI01" ;
:demandCategoryName "Small Series"@en .

:DemandCategoryExtraordinaryDemand a :DemandCategoryType ;
:demandCategoryCode "ED01" ;
:demandCategoryName "Extraordinary Demand"@en .

:DemandCategoryPhaseOutPeriod a :DemandCategoryType ;
:demandCategoryCode "PO01" ;
:demandCategoryName "Phase-Out Period"@en .

:Demand a samm:Entity ;
samm:preferredName "Demand"@en ;
samm:description "A single demand for a given point in time according to the demand rate."@en ;
samm:properties ( :demand :pointInTime ) .

:demandCategoryCode a samm:Property ;
samm:preferredName "Demand Category Code"@en ;
samm:description "The code identifying a demand category."@en ;
samm:characteristic :DemandCategoryCodeCharacteristic ;
samm:exampleValue "0001" .

:demandCategoryName a samm:Property ;
samm:preferredName "Demand Category Name"@en ;
samm:description "The name describing a demand category."@en ;
samm:characteristic samm-c:MultiLanguageText ;
samm:exampleValue "Default"@en .

:demand a samm:Property ;
samm:preferredName "Demand"@en ;
samm:description " Quantity of materials required in the specified point in time according specified demand rate. This demand should be as close as possible to demand that is derived from the actual production program."@en ;
samm:characteristic :QuantityTrait ;
samm:exampleValue "1000"^^xsd:decimal .

:pointInTime a samm:Property ;
samm:preferredName "Point in Time"@en ;
samm:description "Defines the start of the demand rate as a point in time. The point in time must be interpreted according to the demand rate."@en ;
samm:characteristic :PointInTimeCharacteristic ;
samm:exampleValue "2023-10-09"^^xsd:date .

:DemandCategoryCodeCharacteristic a samm-c:Code ;
samm:preferredName "Demand Category Code Characteristic"@en ;
samm:description "The code identifying a demand category."@en ;
samm:dataType xsd:string .

:QuantityTrait a samm-c:Trait ;
samm-c:baseCharacteristic :Quantity ;
samm-c:constraint :QuantityRange ;
samm-c:constraint :QuantityFixedPoint .

:PointInTimeCharacteristic a samm:Characteristic ;
samm:preferredName "Point in Time Characteristic"@en ;
samm:description "- If demand rate is \"calendar week\": An ISO calendar week in which a given demand is needed. Must be given as date of the Monday in the week. (ISO-8601-1:2019)\n- If demand rate is \"day\": An ISO day on which a given demand is needed. Must be given as single day (consider the time zone of the customer's location). (ISO-8601)"@en ;
samm:see <https://www.iso.org/iso-8601-date-and-time-format.html> ;
samm:see <https://www.iso.org/standard/70907.html> ;
samm:dataType xsd:date .

:Quantity a samm:Characteristic ;
samm:preferredName "Quantity"@en ;
samm:description "Quantities of demands."@en ;
samm:dataType xsd:decimal .

:QuantityRange a samm-c:RangeConstraint ;
samm:preferredName "Quantity Range"@en ;
samm:description "Constraint to ensure a non-negative value for quantities."@en ;
samm-c:minValue "0"^^xsd:decimal ;
samm-c:maxValue "999999999999999999.999"^^xsd:decimal ;
samm-c:lowerBoundDefinition samm-c:AT_LEAST ;
samm-c:upperBoundDefinition samm-c:AT_MOST .

:QuantityFixedPoint a samm-c:FixedPointConstraint ;
samm:preferredName "Quantity Fixed Point"@en ;
samm:description "Constraint to ensure size of quantities: 12 digits plus 3 decimal places."@en ;
samm-c:integer "15"^^xsd:positiveInteger ;
samm-c:scale "1000"^^xsd:positiveInteger .
1 change: 1 addition & 0 deletions io.catenax.material_demand/1.0.0/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{ "status" : "release" }
7 changes: 7 additions & 0 deletions io.catenax.material_demand/RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# Changelog
All notable changes to this model will be documented in this file.

## [1.0.0] - 2023-10-13
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please change the date to today so that we can go for MS3 today in our meeting.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done


### Added
- initial version of the aspect model for material demand