diff --git a/SI_Format.xsd b/SI_Format.xsd index 2f178c9a1f11d91eb311778b9ae5d609eff3376a..8a1e0a247c3ab3a3988a4fe6aad4b36853f566d9 100644 --- a/SI_Format.xsd +++ b/SI_Format.xsd @@ -480,12 +480,325 @@ (m) - id (unique identifier) (o) - label (string) - + (m) - distribution (sub structure distribution) + (m) - unit (string - SI unit) ]]> </xs:documentation> </xs:annotation> </xs:element> + <xs:element name="distribution" type="si:distributionType"> + <xs:annotation> + <xs:documentation xml:lang="en"> + Definition of the structure, that gives the necessary components for stating + distribution, which are used by METAS UncLib. This element must always + be used in the context of a distribution, which is an application within + si:uncInput. + </xs:documentation> + </xs:annotation> + </xs:element> + + <xs:element name="distStandardNormal" type="si:distStandardNormalType"> + <xs:annotation> + <xs:documentation xml:lang="en"> + Definition of the structure, that gives the necessary components for stating + standard normal distribution (mu = 0, sigma = 1), which are used by METAS UncLib. + This element must always be used in the context of a distribution, which is an + application within si:uncInput. + </xs:documentation> + <xs:documentation xml:lang="en"> + <![CDATA[ + The distributiom has the following mean value and standard uncertainty: + + mean = mu + stdunc = sigma + ]]> + </xs:documentation> + </xs:annotation> + </xs:element> + + <xs:element name="distNormal" type="si:distNormalType"> + <xs:annotation> + <xs:documentation xml:lang="en"> + Definition of the structure, that gives the necessary components for stating + normal distribution, which are used by METAS UncLib. This element must always + be used in the context of a distribution, which is an application within + si:uncInput. + </xs:documentation> + <xs:documentation xml:lang="en"> + <![CDATA[ + The element has the following components [(m)-mandatory, (o)-optional]: + + (m) - mu (mean) + (m) - sigma (standard deviation) + + The distributiom has the following mean value and standard uncertainty: + + mean = mu + stdunc = sigma + ]]> + </xs:documentation> + </xs:annotation> + </xs:element> + + <xs:element name="distStandardUniform" type="si:distStandardUniformType"> + <xs:annotation> + <xs:documentation xml:lang="en"> + Definition of the structure, that gives the necessary components for stating + standard uniform distribution (a = 0, b = 1), which are used by METAS UncLib. + This element must always be used in the context of a distribution, which is an + application within si:uncInput. + </xs:documentation> + <xs:documentation xml:lang="en"> + <![CDATA[ + The distributiom has the following mean value and standard uncertainty: + + mean = (a + b) / 2 + stdunc = (b - a) / sqrt(12) + ]]> + </xs:documentation> + </xs:annotation> + </xs:element> + + <xs:element name="distUniform" type="si:distUniformType"> + <xs:annotation> + <xs:documentation xml:lang="en"> + Definition of the structure, that gives the necessary components for stating + uniform distribution, which are used by METAS UncLib. This element must always + be used in the context of a distribution, which is an application within + si:uncInput. + </xs:documentation> + <xs:documentation xml:lang="en"> + <![CDATA[ + The element has the following components [(m)-mandatory, (o)-optional]: + + (m) - a (a) + (m) - b (b) + + The distributiom has the following mean value and standard uncertainty: + + mean = (a + b) / 2 + stdunc = (b - a) / sqrt(12) + ]]> + </xs:documentation> + </xs:annotation> + </xs:element> + + <xs:element name="distCurvilinearTrapezoid" type="si:distCurvilinearTrapezoidType"> + <xs:annotation> + <xs:documentation xml:lang="en"> + Definition of the structure, that gives the necessary components for stating + curvilinear trapezoid distribution, which are used by METAS UncLib. This + element must always be used in the context of a distribution, which is an + application within si:uncInput. + </xs:documentation> + <xs:documentation xml:lang="en"> + <![CDATA[ + The element has the following components [(m)-mandatory, (o)-optional]: + + (m) - a (a) + (m) - b (b) + (m) - d (d) + + The distributiom has the following mean value and standard uncertainty: + + mean = (a + b) / 2 + stdunc = sqrt((b - a)^2 / 12 + d^2 / 9) + ]]> + </xs:documentation> + </xs:annotation> + </xs:element> + + <xs:element name="distTrapezoidal" type="si:distTrapezoidalType"> + <xs:annotation> + <xs:documentation xml:lang="en"> + Definition of the structure, that gives the necessary components for stating + trapezoidal distribution, which are used by METAS UncLib. This element must + always be used in the context of a distribution, which is an application + within si:uncInput. + </xs:documentation> + <xs:documentation xml:lang="en"> + <![CDATA[ + The element has the following components [(m)-mandatory, (o)-optional]: + + (m) - a (a) + (m) - b (b) + (m) - beta (beta) + + The distributiom has the following mean value and standard uncertainty: + + mean = (a + b) / 2 + stdunc = (b - a) * sqrt((1 + beta^2) / 24) + ]]> + </xs:documentation> + </xs:annotation> + </xs:element> + + <xs:element name="distTriangular" type="si:distTriangularType"> + <xs:annotation> + <xs:documentation xml:lang="en"> + Definition of the structure, that gives the necessary components for stating + triangular distribution, which are used by METAS UncLib. This element must + always be used in the context of a distribution, which is an application + within si:uncInput. + </xs:documentation> + <xs:documentation xml:lang="en"> + <![CDATA[ + The element has the following components [(m)-mandatory, (o)-optional]: + + (m) - a (a) + (m) - b (b) + + The distributiom has the following mean value and standard uncertainty: + + mean = (a + b) / 2 + stdunc = (b - a) / sqrt(24) + ]]> + </xs:documentation> + </xs:annotation> + </xs:element> + + <xs:element name="distArcSine" type="si:distArcSineType"> + <xs:annotation> + <xs:documentation xml:lang="en"> + Definition of the structure, that gives the necessary components for stating + arc sin distribution, which are used by METAS UncLib. This element must + always be used in the context of a distribution, which is an application + within si:uncInput. + </xs:documentation> + <xs:documentation xml:lang="en"> + <![CDATA[ + The element has the following components [(m)-mandatory, (o)-optional]: + + (m) - a (a) + (m) - b (b) + + The distributiom has the following mean value and standard uncertainty: + + mean = (a + b) / 2 + stdunc = (b - a) / sqrt(8) + ]]> + </xs:documentation> + </xs:annotation> + </xs:element> + + <xs:element name="distExponential" type="si:distExponentialType"> + <xs:annotation> + <xs:documentation xml:lang="en"> + Definition of the structure, that gives the necessary components for stating + exponential distribution, which are used by METAS UncLib. This element must + always be used in the context of a distribution, which is an application + within si:uncInput. + </xs:documentation> + <xs:documentation xml:lang="en"> + <![CDATA[ + The element has the following components [(m)-mandatory, (o)-optional]: + + (m) - mu (mean) + + The distributiom has the following mean value and standard uncertainty: + + mean = mu + stdunc = mu + ]]> + </xs:documentation> + </xs:annotation> + </xs:element> + + <xs:element name="distGamma" type="si:distGammaType"> + <xs:annotation> + <xs:documentation xml:lang="en"> + Definition of the structure, that gives the necessary components for stating + gamma distribution, which are used by METAS UncLib. This element must + always be used in the context of a distribution, which is an application + within si:uncInput. + </xs:documentation> + <xs:documentation xml:lang="en"> + <![CDATA[ + The element has the following components [(m)-mandatory, (o)-optional]: + + (m) - a (shape) + (m) - b (scale) + + The distributiom has the following mean value and standard uncertainty: + + mean = a * b + stdunc = (sqrt(a) * b + ]]> + </xs:documentation> + </xs:annotation> + </xs:element> + + <xs:element name="distChiSquared" type="si:distChiSquaredType"> + <xs:annotation> + <xs:documentation xml:lang="en"> + Definition of the structure, that gives the necessary components for stating + chi-squared distribution, which are used by METAS UncLib. This element must + always be used in the context of a distribution, which is an application + within si:uncInput. + </xs:documentation> + <xs:documentation xml:lang="en"> + <![CDATA[ + The element has the following components [(m)-mandatory, (o)-optional]: + + (m) - k (degrees of freedom) + + The distributiom has the following mean value and standard uncertainty: + + mean = k + stdunc = sqrt(2 * k) + ]]> + </xs:documentation> + </xs:annotation> + </xs:element> + + <xs:element name="distStudentT" type="si:distStudentTType"> + <xs:annotation> + <xs:documentation xml:lang="en"> + Definition of the structure, that gives the necessary components for stating + student T distribution, which are used by METAS UncLib. This element must + always be used in the context of a distribution, which is an application + within si:uncInput. + </xs:documentation> + <xs:documentation xml:lang="en"> + <![CDATA[ + The element has the following components [(m)-mandatory, (o)-optional]: + + (m) - mu (mean) + (m) - sigma (standard deviation) + (m) - k (degrees of freedom) + + The distributiom has the following mean value and standard uncertainty: + + mean = mu for n > 2 with n = dof + 1 + stdunc = sigma * sqrt((n - 1) / (n - 3)) for n > 3 with n = dof + 1 + ]]> + </xs:documentation> + </xs:annotation> + </xs:element> + + <xs:element name="distStudentTFromSamples" type="si:distStudentTFromSamplesType"> + <xs:annotation> + <xs:documentation xml:lang="en"> + Definition of the structure, that gives the necessary components for stating + student T distribution, which are used by METAS UncLib. This element must + always be used in the context of a distribution, which is an application + within si:uncInput. + </xs:documentation> + <xs:documentation xml:lang="en"> + <![CDATA[ + The element has the following components [(m)-mandatory, (o)-optional]: + + (m) - samples (samples) + + The distributiom has the following mean value and standard uncertainty: + + mean = mean(samples) for n > 2 with n = dof + 1 + stdunc = sigma * sqrt((n - 1) / (n - 3)) for n > 3 with n = length(samples) and sigma = std(samples) / sqrt(n) + ]]> + </xs:documentation> + </xs:annotation> + </xs:element> <!-- ############## D-SI XML TYPE DEFINITIONS #################### --> @@ -965,7 +1278,7 @@ </xs:complexType> <xs:complexType name="uncDependenciesType"> - <!-- the standard uncertainty can be computed on demand by taking the square root of the summed squared Jacobian values --> + <!-- the standard uncertainty can be computed on demand by taking the square root of the summed squared jacobi times input standard uncertainty values --> <xs:sequence> <xs:element minOccurs="0" maxOccurs="unbounded" name="dependency"> <xs:complexType> @@ -982,6 +1295,8 @@ <xs:sequence> <xs:element name="id" type="si:uncInputIdType" /> <xs:element name="label" type="xs:string" minOccurs="0" maxOccurs="1" /> + <xs:element name="distribution" type="si:distributionType" /> + <xs:element name="unit" type="si:unitType"/> </xs:sequence> </xs:complexType> @@ -992,8 +1307,180 @@ </xs:restriction> </xs:simpleType> - + <xs:complexType name="distributionType" abstract="true"/> + + <xs:complexType name="distStandardNormalType"> + <!-- mu = 0, sigma = 1 --> + <!-- mean = mu --> + <!-- stdunc = sigma --> + <xs:complexContent> + <xs:extension base="si:distributionType"> + <xs:sequence> + </xs:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType> + <xs:complexType name="distNormalType"> + <!-- mean = mu --> + <!-- stdunc = sigma --> + <xs:complexContent> + <xs:extension base="si:distributionType"> + <xs:sequence> + <xs:element name="mu" type="si:decimalType" /> + <xs:element name="sigma" type="si:decimalType" /> + </xs:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType> + + <xs:complexType name="distStandardUniformType"> + <!-- a = 0, b = 1 --> + <!-- mean = (a + b) / 2 --> + <!-- stdunc = (b - a) / sqrt(12) --> + <xs:complexContent> + <xs:extension base="si:distributionType"> + <xs:sequence> + </xs:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType> + + <xs:complexType name="distUniformType"> + <!-- mean = (a + b) / 2 --> + <!-- stdunc = (b - a) / sqrt(12) --> + <xs:complexContent> + <xs:extension base="si:distributionType"> + <xs:sequence> + <xs:element name="a" type="si:decimalType" /> + <xs:element name="b" type="si:decimalType" /> + </xs:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType> + + <xs:complexType name="distCurvilinearTrapezoidType"> + <!-- mean = (a + b) / 2 --> + <!-- stdunc = sqrt((b - a)^2 / 12 + d^2 / 9) --> + <xs:complexContent> + <xs:extension base="si:distributionType"> + <xs:sequence> + <xs:element name="a" type="si:decimalType" /> + <xs:element name="b" type="si:decimalType" /> + <xs:element name="d" type="si:decimalType" /> + </xs:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType> + + <xs:complexType name="distTrapezoidalType"> + <!-- mean = (a + b) / 2 --> + <!-- stdunc = (b - a) * sqrt((1 + beta^2) / 24) --> + <xs:complexContent> + <xs:extension base="si:distributionType"> + <xs:sequence> + <xs:element name="a" type="si:decimalType" /> + <xs:element name="b" type="si:decimalType" /> + <xs:element name="beta" type="si:decimalType" /> + </xs:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType> + + <xs:complexType name="distTriangularType"> + <!-- mean = (a + b) / 2 --> + <!-- stdunc = (b - a) / sqrt(24) --> + <xs:complexContent> + <xs:extension base="si:distributionType"> + <xs:sequence> + <xs:element name="a" type="si:decimalType" /> + <xs:element name="b" type="si:decimalType" /> + </xs:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType> + + <xs:complexType name="distArcSineType"> + <!-- mean = (a + b) / 2 --> + <!-- stdunc = (b - a) / sqrt(8) --> + <xs:complexContent> + <xs:extension base="si:distributionType"> + <xs:sequence> + <xs:element name="a" type="si:decimalType" /> + <xs:element name="b" type="si:decimalType" /> + </xs:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType> + + <xs:complexType name="distExponentialType"> + <!-- mean = mu --> + <!-- stdunc = mu --> + <xs:complexContent> + <xs:extension base="si:distributionType"> + <xs:sequence> + <xs:element name="mu" type="si:decimalType" /> + </xs:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType> + + <xs:complexType name="distGammaType"> + <!-- mean = a * b --> + <!-- stdunc = sqrt(a) * b --> + <xs:complexContent> + <xs:extension base="si:distributionType"> + <xs:sequence> + <xs:element name="a" type="si:decimalType" /> + <xs:element name="b" type="si:decimalType" /> + </xs:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType> + + <xs:complexType name="distChiSquaredType"> + <!-- mean = k --> + <!-- stdunc = sqrt(2 * k) --> + <xs:complexContent> + <xs:extension base="si:distributionType"> + <xs:sequence> + <xs:element name="k" type="si:decimalType" /> + </xs:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType> + + <xs:complexType name="distStudentTType"> + <!-- mean = mu for n > 2 with n = dof + 1 --> + <!-- stdunc = sigma * sqrt((n - 1) / (n - 3)) for n > 3 with n = dof + 1 --> + <xs:complexContent> + <xs:extension base="si:distributionType"> + <xs:sequence> + <xs:element name="mu" type="si:decimalType" /> + <xs:element name="sigma" type="si:decimalType" /> + <xs:element name="dof" type="si:decimalType" /> + </xs:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType> + + <xs:complexType name="distStudentTFromSamplesType"> + <!-- mean = mean(samples) for n > 2 with n = dof + 1 --> + <!-- stdunc = sigma * sqrt((n - 1) / (n - 3)) for n > 3 with n = length(samples) and sigma = std(samples) / sqrt(n) --> + <xs:complexContent> + <xs:extension base="si:distributionType"> + <xs:sequence> + <xs:element name="samples"> + <xs:complexType> + <xs:sequence> + <xs:element minOccurs="0" maxOccurs="unbounded" name="sample" type="si:decimalType" /> + </xs:sequence> + </xs:complexType> + </xs:element> + </xs:sequence> + </xs:extension> + </xs:complexContent> + </xs:complexType>