sysml-validate 0.10.18 → 0.14.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +27 -27
- package/README.md +200 -200
- package/out/main.js +596 -141
- package/out/main.js.map +4 -4
- package/package.json +57 -57
- package/resources/sysml.dimension-table.json +1 -1
- package/resources/sysml.library/Domain Libraries/Analysis/.meta.json +9 -9
- package/resources/sysml.library/Domain Libraries/Analysis/.project.json +26 -26
- package/resources/sysml.library/Domain Libraries/Analysis/AnalysisTooling.sysml +33 -33
- package/resources/sysml.library/Domain Libraries/Analysis/SampledFunctions.sysml +118 -118
- package/resources/sysml.library/Domain Libraries/Analysis/StateSpaceRepresentation.sysml +143 -143
- package/resources/sysml.library/Domain Libraries/Analysis/TradeStudies.sysml +170 -170
- package/resources/sysml.library/Domain Libraries/Cause and Effect/.meta.json +7 -7
- package/resources/sysml.library/Domain Libraries/Cause and Effect/.project.json +22 -22
- package/resources/sysml.library/Domain Libraries/Cause and Effect/CausationConnections.sysml +82 -82
- package/resources/sysml.library/Domain Libraries/Cause and Effect/CauseAndEffect.sysml +81 -81
- package/resources/sysml.library/Domain Libraries/Geometry/.meta.json +7 -7
- package/resources/sysml.library/Domain Libraries/Geometry/.project.json +26 -26
- package/resources/sysml.library/Domain Libraries/Geometry/ShapeItems.sysml +898 -898
- package/resources/sysml.library/Domain Libraries/Geometry/SpatialItems.sysml +167 -167
- package/resources/sysml.library/Domain Libraries/Metadata/.meta.json +9 -9
- package/resources/sysml.library/Domain Libraries/Metadata/.project.json +18 -18
- package/resources/sysml.library/Domain Libraries/Metadata/ImageMetadata.sysml +77 -77
- package/resources/sysml.library/Domain Libraries/Metadata/ModelingMetadata.sysml +142 -142
- package/resources/sysml.library/Domain Libraries/Metadata/ParametersOfInterestMetadata.sysml +38 -38
- package/resources/sysml.library/Domain Libraries/Metadata/RiskMetadata.sysml +99 -99
- package/resources/sysml.library/Domain Libraries/Quantities and Units/.meta.json +28 -28
- package/resources/sysml.library/Domain Libraries/Quantities and Units/.project.json +22 -22
- package/resources/sysml.library/Domain Libraries/Quantities and Units/ISQ.sysml +42 -42
- package/resources/sysml.library/Domain Libraries/Quantities and Units/ISQAcoustics.sysml +439 -439
- package/resources/sysml.library/Domain Libraries/Quantities and Units/ISQAtomicNuclear.sysml +2726 -2726
- package/resources/sysml.library/Domain Libraries/Quantities and Units/ISQBase.sysml +206 -206
- package/resources/sysml.library/Domain Libraries/Quantities and Units/ISQCharacteristicNumbers.sysml +1991 -1991
- package/resources/sysml.library/Domain Libraries/Quantities and Units/ISQChemistryMolecular.sysml +1353 -1353
- package/resources/sysml.library/Domain Libraries/Quantities and Units/ISQCondensedMatter.sysml +1223 -1223
- package/resources/sysml.library/Domain Libraries/Quantities and Units/ISQElectromagnetism.sysml +2333 -2333
- package/resources/sysml.library/Domain Libraries/Quantities and Units/ISQInformation.sysml +958 -958
- package/resources/sysml.library/Domain Libraries/Quantities and Units/ISQLight.sysml +1537 -1537
- package/resources/sysml.library/Domain Libraries/Quantities and Units/ISQMechanics.sysml +1564 -1564
- package/resources/sysml.library/Domain Libraries/Quantities and Units/ISQSpaceTime.sysml +1169 -1169
- package/resources/sysml.library/Domain Libraries/Quantities and Units/ISQThermodynamics.sysml +1256 -1256
- package/resources/sysml.library/Domain Libraries/Quantities and Units/MeasurementRefCalculations.sysml +30 -30
- package/resources/sysml.library/Domain Libraries/Quantities and Units/MeasurementReferences.sysml +526 -526
- package/resources/sysml.library/Domain Libraries/Quantities and Units/Quantities.sysml +107 -107
- package/resources/sysml.library/Domain Libraries/Quantities and Units/QuantityCalculations.sysml +70 -70
- package/resources/sysml.library/Domain Libraries/Quantities and Units/SI.sysml +378 -378
- package/resources/sysml.library/Domain Libraries/Quantities and Units/SIPrefixes.sysml +48 -48
- package/resources/sysml.library/Domain Libraries/Quantities and Units/TensorCalculations.sysml +49 -49
- package/resources/sysml.library/Domain Libraries/Quantities and Units/Time.sysml +274 -274
- package/resources/sysml.library/Domain Libraries/Quantities and Units/USCustomaryUnits.sysml +260 -260
- package/resources/sysml.library/Domain Libraries/Quantities and Units/VectorCalculations.sysml +62 -62
- package/resources/sysml.library/Domain Libraries/Requirement Derivation/.meta.json +7 -7
- package/resources/sysml.library/Domain Libraries/Requirement Derivation/.project.json +18 -18
- package/resources/sysml.library/Domain Libraries/Requirement Derivation/DerivationConnections.sysml +62 -62
- package/resources/sysml.library/Domain Libraries/Requirement Derivation/RequirementDerivation.sysml +38 -38
- package/resources/sysml.library/Kernel Libraries/Kernel Data Type Library/.meta.json +8 -8
- package/resources/sysml.library/Kernel Libraries/Kernel Data Type Library/.project.json +10 -10
- package/resources/sysml.library/Kernel Libraries/Kernel Data Type Library/Collections.kerml +176 -176
- package/resources/sysml.library/Kernel Libraries/Kernel Data Type Library/ScalarValues.kerml +23 -23
- package/resources/sysml.library/Kernel Libraries/Kernel Data Type Library/VectorValues.kerml +63 -63
- package/resources/sysml.library/Kernel Libraries/Kernel Function Library/.meta.json +22 -22
- package/resources/sysml.library/Kernel Libraries/Kernel Function Library/.project.json +14 -14
- package/resources/sysml.library/Kernel Libraries/Kernel Function Library/BaseFunctions.kerml +79 -79
- package/resources/sysml.library/Kernel Libraries/Kernel Function Library/BooleanFunctions.kerml +22 -22
- package/resources/sysml.library/Kernel Libraries/Kernel Function Library/CollectionFunctions.kerml +68 -68
- package/resources/sysml.library/Kernel Libraries/Kernel Function Library/ComplexFunctions.kerml +47 -47
- package/resources/sysml.library/Kernel Libraries/Kernel Function Library/ControlFunctions.kerml +116 -116
- package/resources/sysml.library/Kernel Libraries/Kernel Function Library/DataFunctions.kerml +42 -42
- package/resources/sysml.library/Kernel Libraries/Kernel Function Library/IntegerFunctions.kerml +43 -43
- package/resources/sysml.library/Kernel Libraries/Kernel Function Library/NaturalFunctions.kerml +27 -27
- package/resources/sysml.library/Kernel Libraries/Kernel Function Library/NumericalFunctions.kerml +42 -42
- package/resources/sysml.library/Kernel Libraries/Kernel Function Library/OccurrenceFunctions.kerml +153 -153
- package/resources/sysml.library/Kernel Libraries/Kernel Function Library/RationalFunctions.kerml +49 -49
- package/resources/sysml.library/Kernel Libraries/Kernel Function Library/RealFunctions.kerml +56 -56
- package/resources/sysml.library/Kernel Libraries/Kernel Function Library/ScalarFunctions.kerml +32 -32
- package/resources/sysml.library/Kernel Libraries/Kernel Function Library/SequenceFunctions.kerml +110 -110
- package/resources/sysml.library/Kernel Libraries/Kernel Function Library/StringFunctions.kerml +25 -25
- package/resources/sysml.library/Kernel Libraries/Kernel Function Library/TrigFunctions.kerml +34 -34
- package/resources/sysml.library/Kernel Libraries/Kernel Function Library/VectorFunctions.kerml +272 -272
- package/resources/sysml.library/Kernel Libraries/Kernel Semantic Library/.meta.json +21 -21
- package/resources/sysml.library/Kernel Libraries/Kernel Semantic Library/.project.json +14 -14
- package/resources/sysml.library/Kernel Libraries/Kernel Semantic Library/Base.kerml +94 -94
- package/resources/sysml.library/Kernel Libraries/Kernel Semantic Library/Clocks.kerml +155 -155
- package/resources/sysml.library/Kernel Libraries/Kernel Semantic Library/ControlPerformances.kerml +134 -134
- package/resources/sysml.library/Kernel Libraries/Kernel Semantic Library/FeatureReferencingPerformances.kerml +189 -189
- package/resources/sysml.library/Kernel Libraries/Kernel Semantic Library/KerML.kerml +483 -483
- package/resources/sysml.library/Kernel Libraries/Kernel Semantic Library/Links.kerml +66 -66
- package/resources/sysml.library/Kernel Libraries/Kernel Semantic Library/Metaobjects.kerml +57 -57
- package/resources/sysml.library/Kernel Libraries/Kernel Semantic Library/Objects.kerml +212 -212
- package/resources/sysml.library/Kernel Libraries/Kernel Semantic Library/Observation.kerml +160 -160
- package/resources/sysml.library/Kernel Libraries/Kernel Semantic Library/Occurrences.kerml +992 -992
- package/resources/sysml.library/Kernel Libraries/Kernel Semantic Library/Performances.kerml +292 -292
- package/resources/sysml.library/Kernel Libraries/Kernel Semantic Library/SpatialFrames.kerml +196 -196
- package/resources/sysml.library/Kernel Libraries/Kernel Semantic Library/StatePerformances.kerml +144 -144
- package/resources/sysml.library/Kernel Libraries/Kernel Semantic Library/Transfers.kerml +280 -280
- package/resources/sysml.library/Kernel Libraries/Kernel Semantic Library/TransitionPerformances.kerml +65 -65
- package/resources/sysml.library/Kernel Libraries/Kernel Semantic Library/Triggers.kerml +187 -187
- package/resources/sysml.library/LICENSE +276 -276
- package/resources/sysml.library/NOTICE.md +20 -20
- package/resources/sysml.library/Systems Library/Actions.sysml +556 -556
- package/resources/sysml.library/Systems Library/Allocations.sysml +28 -28
- package/resources/sysml.library/Systems Library/AnalysisCases.sysml +37 -37
- package/resources/sysml.library/Systems Library/Attributes.sysml +24 -24
- package/resources/sysml.library/Systems Library/Calculations.sysml +36 -36
- package/resources/sysml.library/Systems Library/Cases.sysml +70 -70
- package/resources/sysml.library/Systems Library/Connections.sysml +59 -59
- package/resources/sysml.library/Systems Library/Constraints.sysml +43 -43
- package/resources/sysml.library/Systems Library/Flows.sysml +125 -125
- package/resources/sysml.library/Systems Library/Interfaces.sysml +88 -88
- package/resources/sysml.library/Systems Library/Items.sysml +152 -152
- package/resources/sysml.library/Systems Library/Metadata.sysml +31 -31
- package/resources/sysml.library/Systems Library/Parts.sysml +80 -80
- package/resources/sysml.library/Systems Library/Ports.sysml +53 -53
- package/resources/sysml.library/Systems Library/Requirements.sysml +193 -193
- package/resources/sysml.library/Systems Library/StandardViewDefinitions.sysml +123 -123
- package/resources/sysml.library/Systems Library/States.sysml +102 -102
- package/resources/sysml.library/Systems Library/SysML.sysml +539 -539
- package/resources/sysml.library/Systems Library/UseCases.sysml +56 -56
- package/resources/sysml.library/Systems Library/VerificationCases.sysml +102 -102
- package/resources/sysml.library/Systems Library/Views.sysml +163 -163
- package/resources/sysml.library.index.json +1 -1
|
@@ -1,107 +1,107 @@
|
|
|
1
|
-
standard library package Quantities {
|
|
2
|
-
doc
|
|
3
|
-
/*
|
|
4
|
-
* This package defines the root representations for quantities and their values.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
private import Collections::*;
|
|
8
|
-
private import ScalarValues::NumericalValue;
|
|
9
|
-
private import ScalarValues::Number;
|
|
10
|
-
private import ScalarValues::Real;
|
|
11
|
-
private import ScalarValues::Natural;
|
|
12
|
-
private import ScalarValues::Boolean;
|
|
13
|
-
private import ScalarValues::String;
|
|
14
|
-
private import VectorValues::NumericalVectorValue;
|
|
15
|
-
private import VectorValues::ThreeVectorValue;
|
|
16
|
-
|
|
17
|
-
abstract attribute def TensorQuantityValue :> Array {
|
|
18
|
-
doc
|
|
19
|
-
/*
|
|
20
|
-
* The value of a quantity is a tuple of one or more numbers (i.e. mathematical number values) and a reference to a measurement reference.
|
|
21
|
-
* The most general case is a multi-dimensional, tensor quantity of any order. In engineering, the majority of quantities used are
|
|
22
|
-
* scalar and vector quantities, that are tensor quantities of order 0 and 1 respectively.
|
|
23
|
-
* The measurement reference used to express a quantity value must have a type, dimensions and order that match the quantity, i.e.,
|
|
24
|
-
* a TensorQuantityValue must use a TensorMeasurementReference, a VectorQuantityValue a VectorMeasurementReference,
|
|
25
|
-
* and a ScalarQuantityValue a ScalarMeasurementReference. See package MeasurementReferences for details.
|
|
26
|
-
*/
|
|
27
|
-
|
|
28
|
-
attribute isBound: Boolean;
|
|
29
|
-
attribute num: Number[1..*] ordered nonunique :>> elements;
|
|
30
|
-
attribute mRef: MeasurementReferences::TensorMeasurementReference;
|
|
31
|
-
attribute :>> dimensions = mRef.dimensions;
|
|
32
|
-
attribute order :>> rank;
|
|
33
|
-
attribute contravariantOrder: Natural;
|
|
34
|
-
attribute covariantOrder: Natural;
|
|
35
|
-
|
|
36
|
-
assert constraint orderSum { contravariantOrder + covariantOrder == order }
|
|
37
|
-
assert constraint boundMatch { (isBound == mRef.isBound) or (not isBound and mRef.isBound) }
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
abstract attribute def VectorQuantityValue :> TensorQuantityValue, NumericalVectorValue {
|
|
41
|
-
attribute :>> mRef: MeasurementReferences::VectorMeasurementReference;
|
|
42
|
-
}
|
|
43
|
-
|
|
44
|
-
abstract attribute def ScalarQuantityValue :> VectorQuantityValue, NumericalValue {
|
|
45
|
-
attribute :>> mRef: MeasurementReferences::ScalarMeasurementReference;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
abstract attribute tensorQuantities: TensorQuantityValue[*] nonunique {
|
|
49
|
-
doc
|
|
50
|
-
/*
|
|
51
|
-
* Quantities are defined as self-standing features that can be used to consistently specify quantities as
|
|
52
|
-
* features of occurrences. Each single quantity feature is subsetting the root feature tensorQuantities.
|
|
53
|
-
* In other words, the codomain of a quantity feature is a suitable specialization of TensorQuantityValue.
|
|
54
|
-
*/
|
|
55
|
-
}
|
|
56
|
-
abstract attribute vectorQuantities: VectorQuantityValue[*] nonunique :> tensorQuantities;
|
|
57
|
-
abstract attribute scalarQuantities: ScalarQuantityValue[*] nonunique :> vectorQuantities;
|
|
58
|
-
|
|
59
|
-
abstract attribute def '3dVectorQuantityValue' :> VectorQuantityValue, ThreeVectorValue {
|
|
60
|
-
doc
|
|
61
|
-
/*
|
|
62
|
-
* Most general representation of real 3-vector quantities
|
|
63
|
-
*/
|
|
64
|
-
|
|
65
|
-
attribute :>> num: Real[3];
|
|
66
|
-
}
|
|
67
|
-
alias ThreeDVectorQuantityValue for '3dVectorQuantityValue';
|
|
68
|
-
|
|
69
|
-
/*
|
|
70
|
-
* Define generic aliases QuantityValue and quantities for the top level quantity attribute def and attribute.
|
|
71
|
-
*/
|
|
72
|
-
alias QuantityValue for TensorQuantityValue;
|
|
73
|
-
alias quantities for tensorQuantities;
|
|
74
|
-
|
|
75
|
-
attribute def SystemOfQuantities {
|
|
76
|
-
doc
|
|
77
|
-
/*
|
|
78
|
-
* A SystemOfQuantities represents the essentials of [VIM] concept "system of quantities" (https://jcgm.bipm.org/vim/en/1.3.html), defined as a
|
|
79
|
-
* "set of quantities together with a set of noncontradictory equations relating those quantities".
|
|
80
|
-
* In order to establish such a set of noncontradictory equations a set of base quantities is selected. Subsequently the system of quantities is
|
|
81
|
-
* completed by adding derived quantities which are products of powers of the base quantities.
|
|
82
|
-
*/
|
|
83
|
-
|
|
84
|
-
attribute baseQuantities: ScalarQuantityValue[*] ordered :> scalarQuantities;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
attribute def QuantityPowerFactor {
|
|
88
|
-
doc
|
|
89
|
-
/*
|
|
90
|
-
* Representation of a quantity power factor, being the combination of a quantity and an exponent.
|
|
91
|
-
*
|
|
92
|
-
* A sequence of QuantityPowerFactors for the baseQuantities of a SystemOfQuantities define the QuantityDimension of a scalar quantity.
|
|
93
|
-
*/
|
|
94
|
-
|
|
95
|
-
attribute quantity: ScalarQuantityValue[1];
|
|
96
|
-
attribute exponent: Real[1];
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
attribute def QuantityDimension {
|
|
100
|
-
doc
|
|
101
|
-
/*
|
|
102
|
-
* Representation of quantity dimension, which is the product of powers of the set of base quantities defined for a particular system of quantities, units and scales.
|
|
103
|
-
*/
|
|
104
|
-
|
|
105
|
-
attribute quantityPowerFactors: QuantityPowerFactor[*] ordered;
|
|
106
|
-
}
|
|
107
|
-
}
|
|
1
|
+
standard library package Quantities {
|
|
2
|
+
doc
|
|
3
|
+
/*
|
|
4
|
+
* This package defines the root representations for quantities and their values.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
private import Collections::*;
|
|
8
|
+
private import ScalarValues::NumericalValue;
|
|
9
|
+
private import ScalarValues::Number;
|
|
10
|
+
private import ScalarValues::Real;
|
|
11
|
+
private import ScalarValues::Natural;
|
|
12
|
+
private import ScalarValues::Boolean;
|
|
13
|
+
private import ScalarValues::String;
|
|
14
|
+
private import VectorValues::NumericalVectorValue;
|
|
15
|
+
private import VectorValues::ThreeVectorValue;
|
|
16
|
+
|
|
17
|
+
abstract attribute def TensorQuantityValue :> Array {
|
|
18
|
+
doc
|
|
19
|
+
/*
|
|
20
|
+
* The value of a quantity is a tuple of one or more numbers (i.e. mathematical number values) and a reference to a measurement reference.
|
|
21
|
+
* The most general case is a multi-dimensional, tensor quantity of any order. In engineering, the majority of quantities used are
|
|
22
|
+
* scalar and vector quantities, that are tensor quantities of order 0 and 1 respectively.
|
|
23
|
+
* The measurement reference used to express a quantity value must have a type, dimensions and order that match the quantity, i.e.,
|
|
24
|
+
* a TensorQuantityValue must use a TensorMeasurementReference, a VectorQuantityValue a VectorMeasurementReference,
|
|
25
|
+
* and a ScalarQuantityValue a ScalarMeasurementReference. See package MeasurementReferences for details.
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
attribute isBound: Boolean;
|
|
29
|
+
attribute num: Number[1..*] ordered nonunique :>> elements;
|
|
30
|
+
attribute mRef: MeasurementReferences::TensorMeasurementReference;
|
|
31
|
+
attribute :>> dimensions = mRef.dimensions;
|
|
32
|
+
attribute order :>> rank;
|
|
33
|
+
attribute contravariantOrder: Natural;
|
|
34
|
+
attribute covariantOrder: Natural;
|
|
35
|
+
|
|
36
|
+
assert constraint orderSum { contravariantOrder + covariantOrder == order }
|
|
37
|
+
assert constraint boundMatch { (isBound == mRef.isBound) or (not isBound and mRef.isBound) }
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
abstract attribute def VectorQuantityValue :> TensorQuantityValue, NumericalVectorValue {
|
|
41
|
+
attribute :>> mRef: MeasurementReferences::VectorMeasurementReference;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
abstract attribute def ScalarQuantityValue :> VectorQuantityValue, NumericalValue {
|
|
45
|
+
attribute :>> mRef: MeasurementReferences::ScalarMeasurementReference;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
abstract attribute tensorQuantities: TensorQuantityValue[*] nonunique {
|
|
49
|
+
doc
|
|
50
|
+
/*
|
|
51
|
+
* Quantities are defined as self-standing features that can be used to consistently specify quantities as
|
|
52
|
+
* features of occurrences. Each single quantity feature is subsetting the root feature tensorQuantities.
|
|
53
|
+
* In other words, the codomain of a quantity feature is a suitable specialization of TensorQuantityValue.
|
|
54
|
+
*/
|
|
55
|
+
}
|
|
56
|
+
abstract attribute vectorQuantities: VectorQuantityValue[*] nonunique :> tensorQuantities;
|
|
57
|
+
abstract attribute scalarQuantities: ScalarQuantityValue[*] nonunique :> vectorQuantities;
|
|
58
|
+
|
|
59
|
+
abstract attribute def '3dVectorQuantityValue' :> VectorQuantityValue, ThreeVectorValue {
|
|
60
|
+
doc
|
|
61
|
+
/*
|
|
62
|
+
* Most general representation of real 3-vector quantities
|
|
63
|
+
*/
|
|
64
|
+
|
|
65
|
+
attribute :>> num: Real[3];
|
|
66
|
+
}
|
|
67
|
+
alias ThreeDVectorQuantityValue for '3dVectorQuantityValue';
|
|
68
|
+
|
|
69
|
+
/*
|
|
70
|
+
* Define generic aliases QuantityValue and quantities for the top level quantity attribute def and attribute.
|
|
71
|
+
*/
|
|
72
|
+
alias QuantityValue for TensorQuantityValue;
|
|
73
|
+
alias quantities for tensorQuantities;
|
|
74
|
+
|
|
75
|
+
attribute def SystemOfQuantities {
|
|
76
|
+
doc
|
|
77
|
+
/*
|
|
78
|
+
* A SystemOfQuantities represents the essentials of [VIM] concept "system of quantities" (https://jcgm.bipm.org/vim/en/1.3.html), defined as a
|
|
79
|
+
* "set of quantities together with a set of noncontradictory equations relating those quantities".
|
|
80
|
+
* In order to establish such a set of noncontradictory equations a set of base quantities is selected. Subsequently the system of quantities is
|
|
81
|
+
* completed by adding derived quantities which are products of powers of the base quantities.
|
|
82
|
+
*/
|
|
83
|
+
|
|
84
|
+
attribute baseQuantities: ScalarQuantityValue[*] ordered :> scalarQuantities;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
attribute def QuantityPowerFactor {
|
|
88
|
+
doc
|
|
89
|
+
/*
|
|
90
|
+
* Representation of a quantity power factor, being the combination of a quantity and an exponent.
|
|
91
|
+
*
|
|
92
|
+
* A sequence of QuantityPowerFactors for the baseQuantities of a SystemOfQuantities define the QuantityDimension of a scalar quantity.
|
|
93
|
+
*/
|
|
94
|
+
|
|
95
|
+
attribute quantity: ScalarQuantityValue[1];
|
|
96
|
+
attribute exponent: Real[1];
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
attribute def QuantityDimension {
|
|
100
|
+
doc
|
|
101
|
+
/*
|
|
102
|
+
* Representation of quantity dimension, which is the product of powers of the set of base quantities defined for a particular system of quantities, units and scales.
|
|
103
|
+
*/
|
|
104
|
+
|
|
105
|
+
attribute quantityPowerFactors: QuantityPowerFactor[*] ordered;
|
|
106
|
+
}
|
|
107
|
+
}
|
package/resources/sysml.library/Domain Libraries/Quantities and Units/QuantityCalculations.sysml
CHANGED
|
@@ -1,70 +1,70 @@
|
|
|
1
|
-
standard library package QuantityCalculations {
|
|
2
|
-
doc
|
|
3
|
-
/*
|
|
4
|
-
* This package package defines calculations for the construction of and computations on ScalarQuantityValues.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
private import ScalarValues::*;
|
|
8
|
-
private import Quantities::ScalarQuantityValue;
|
|
9
|
-
private import MeasurementReferences::ScalarMeasurementReference;
|
|
10
|
-
private import MeasurementReferences::DimensionOneValue;
|
|
11
|
-
|
|
12
|
-
calc def '[' specializes BaseFunctions::'[' {
|
|
13
|
-
in num: Number[1];
|
|
14
|
-
in mRef: ScalarMeasurementReference[1];
|
|
15
|
-
return quantity : ScalarQuantityValue[1];
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
calc def isZero specializes NumericalFunctions::isZero {
|
|
19
|
-
in x: ScalarQuantityValue[1];
|
|
20
|
-
return : Boolean[1] = NumericalFunctions::isZero(x.num);
|
|
21
|
-
}
|
|
22
|
-
calc def isUnit specializes NumericalFunctions::isUnit {
|
|
23
|
-
in x: ScalarQuantityValue[1];
|
|
24
|
-
return : Boolean[1] = NumericalFunctions::isUnit(x.num);
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
calc def abs specializes NumericalFunctions::abs { in x: ScalarQuantityValue[1]; return : ScalarQuantityValue[1]; }
|
|
28
|
-
|
|
29
|
-
calc def '+' specializes NumericalFunctions::'+' { in x: ScalarQuantityValue[1]; in y: ScalarQuantityValue[0..1]; return : ScalarQuantityValue; }
|
|
30
|
-
calc def '-' specializes NumericalFunctions::'-' { in x: ScalarQuantityValue; in y: ScalarQuantityValue[0..1]; return : ScalarQuantityValue[1]; }
|
|
31
|
-
calc def '*' specializes NumericalFunctions::'*' { in x: ScalarQuantityValue[1]; in y: ScalarQuantityValue[1]; return : ScalarQuantityValue[1]; }
|
|
32
|
-
calc def '/' specializes NumericalFunctions::'/' { in x: ScalarQuantityValue[1]; in y: ScalarQuantityValue[1]; return : ScalarQuantityValue[1]; }
|
|
33
|
-
calc def '**' specializes NumericalFunctions::'**' { in x: ScalarQuantityValue[1]; in y: Real[1]; return : ScalarQuantityValue[1]; }
|
|
34
|
-
calc def '^' specializes NumericalFunctions::'^' { in x: ScalarQuantityValue[1]; in y: Real[1]; return : ScalarQuantityValue[1]; }
|
|
35
|
-
|
|
36
|
-
calc def '<' specializes NumericalFunctions::'<' { in x: ScalarQuantityValue[1]; in y: ScalarQuantityValue[1]; return : Boolean[1]; }
|
|
37
|
-
calc def '>' specializes NumericalFunctions::'>' { in x: ScalarQuantityValue[1]; in y: ScalarQuantityValue[1]; return : Boolean[1]; }
|
|
38
|
-
calc def '<=' specializes NumericalFunctions::'<=' { in x: ScalarQuantityValue[1]; in y: ScalarQuantityValue[1]; return : Boolean[1]; }
|
|
39
|
-
calc def '>=' specializes NumericalFunctions::'>=' { in x: ScalarQuantityValue[1]; in y: ScalarQuantityValue[1]; return : Boolean[1]; }
|
|
40
|
-
|
|
41
|
-
calc def max specializes NumericalFunctions::max { in x: ScalarQuantityValue[1]; in y: ScalarQuantityValue[1]; return : ScalarQuantityValue[1]; }
|
|
42
|
-
calc def min specializes NumericalFunctions::min { in x: ScalarQuantityValue[1]; in y: ScalarQuantityValue[1]; return : ScalarQuantityValue[1]; }
|
|
43
|
-
|
|
44
|
-
calc def '==' specializes DataFunctions::'==' { in x: ScalarQuantityValue[1]; in y: ScalarQuantityValue[1]; return : Boolean[1]; }
|
|
45
|
-
|
|
46
|
-
calc def sqrt{ in x: ScalarQuantityValue[1]; return : ScalarQuantityValue[1]; }
|
|
47
|
-
|
|
48
|
-
calc def floor { in x: ScalarQuantityValue[1]; return : ScalarQuantityValue[1]; }
|
|
49
|
-
calc def round { in x: ScalarQuantityValue[1]; return : ScalarQuantityValue[1]; }
|
|
50
|
-
|
|
51
|
-
calc def ToString specializes BaseFunctions::ToString { in x: ScalarQuantityValue[1]; return : String; }
|
|
52
|
-
calc def ToInteger { in x: ScalarQuantityValue[1]; return : Integer[1]; }
|
|
53
|
-
calc def ToRational { in x: ScalarQuantityValue[1]; return : Rational[1]; }
|
|
54
|
-
calc def ToReal { in x: ScalarQuantityValue[1]; return : Real[1]; }
|
|
55
|
-
calc def ToDimensionOneValue { in x: Real[1]; return : DimensionOneValue[1]; }
|
|
56
|
-
|
|
57
|
-
calc def sum specializes NumericalFunctions::sum { in collection: ScalarQuantityValue[0..*];
|
|
58
|
-
private attribute zero : ScalarQuantityValue[1];
|
|
59
|
-
assert constraint { isZero(zero) }
|
|
60
|
-
return : ScalarQuantityValue = NumericalFunctions::sum0(collection, zero);
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
calc def product specializes NumericalFunctions::product { in collection: ScalarQuantityValue[0..*];
|
|
64
|
-
private attribute one : ScalarQuantityValue[1];
|
|
65
|
-
assert constraint { isUnit(one) }
|
|
66
|
-
return : ScalarQuantityValue = NumericalFunctions::product1(collection, one);
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
calc def ConvertQuantity{ in x: ScalarQuantityValue[1]; in targetMRef: ScalarMeasurementReference[1]; return : ScalarQuantityValue[1]; }
|
|
70
|
-
}
|
|
1
|
+
standard library package QuantityCalculations {
|
|
2
|
+
doc
|
|
3
|
+
/*
|
|
4
|
+
* This package package defines calculations for the construction of and computations on ScalarQuantityValues.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
private import ScalarValues::*;
|
|
8
|
+
private import Quantities::ScalarQuantityValue;
|
|
9
|
+
private import MeasurementReferences::ScalarMeasurementReference;
|
|
10
|
+
private import MeasurementReferences::DimensionOneValue;
|
|
11
|
+
|
|
12
|
+
calc def '[' specializes BaseFunctions::'[' {
|
|
13
|
+
in num: Number[1];
|
|
14
|
+
in mRef: ScalarMeasurementReference[1];
|
|
15
|
+
return quantity : ScalarQuantityValue[1];
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
calc def isZero specializes NumericalFunctions::isZero {
|
|
19
|
+
in x: ScalarQuantityValue[1];
|
|
20
|
+
return : Boolean[1] = NumericalFunctions::isZero(x.num);
|
|
21
|
+
}
|
|
22
|
+
calc def isUnit specializes NumericalFunctions::isUnit {
|
|
23
|
+
in x: ScalarQuantityValue[1];
|
|
24
|
+
return : Boolean[1] = NumericalFunctions::isUnit(x.num);
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
calc def abs specializes NumericalFunctions::abs { in x: ScalarQuantityValue[1]; return : ScalarQuantityValue[1]; }
|
|
28
|
+
|
|
29
|
+
calc def '+' specializes NumericalFunctions::'+' { in x: ScalarQuantityValue[1]; in y: ScalarQuantityValue[0..1]; return : ScalarQuantityValue; }
|
|
30
|
+
calc def '-' specializes NumericalFunctions::'-' { in x: ScalarQuantityValue; in y: ScalarQuantityValue[0..1]; return : ScalarQuantityValue[1]; }
|
|
31
|
+
calc def '*' specializes NumericalFunctions::'*' { in x: ScalarQuantityValue[1]; in y: ScalarQuantityValue[1]; return : ScalarQuantityValue[1]; }
|
|
32
|
+
calc def '/' specializes NumericalFunctions::'/' { in x: ScalarQuantityValue[1]; in y: ScalarQuantityValue[1]; return : ScalarQuantityValue[1]; }
|
|
33
|
+
calc def '**' specializes NumericalFunctions::'**' { in x: ScalarQuantityValue[1]; in y: Real[1]; return : ScalarQuantityValue[1]; }
|
|
34
|
+
calc def '^' specializes NumericalFunctions::'^' { in x: ScalarQuantityValue[1]; in y: Real[1]; return : ScalarQuantityValue[1]; }
|
|
35
|
+
|
|
36
|
+
calc def '<' specializes NumericalFunctions::'<' { in x: ScalarQuantityValue[1]; in y: ScalarQuantityValue[1]; return : Boolean[1]; }
|
|
37
|
+
calc def '>' specializes NumericalFunctions::'>' { in x: ScalarQuantityValue[1]; in y: ScalarQuantityValue[1]; return : Boolean[1]; }
|
|
38
|
+
calc def '<=' specializes NumericalFunctions::'<=' { in x: ScalarQuantityValue[1]; in y: ScalarQuantityValue[1]; return : Boolean[1]; }
|
|
39
|
+
calc def '>=' specializes NumericalFunctions::'>=' { in x: ScalarQuantityValue[1]; in y: ScalarQuantityValue[1]; return : Boolean[1]; }
|
|
40
|
+
|
|
41
|
+
calc def max specializes NumericalFunctions::max { in x: ScalarQuantityValue[1]; in y: ScalarQuantityValue[1]; return : ScalarQuantityValue[1]; }
|
|
42
|
+
calc def min specializes NumericalFunctions::min { in x: ScalarQuantityValue[1]; in y: ScalarQuantityValue[1]; return : ScalarQuantityValue[1]; }
|
|
43
|
+
|
|
44
|
+
calc def '==' specializes DataFunctions::'==' { in x: ScalarQuantityValue[1]; in y: ScalarQuantityValue[1]; return : Boolean[1]; }
|
|
45
|
+
|
|
46
|
+
calc def sqrt{ in x: ScalarQuantityValue[1]; return : ScalarQuantityValue[1]; }
|
|
47
|
+
|
|
48
|
+
calc def floor { in x: ScalarQuantityValue[1]; return : ScalarQuantityValue[1]; }
|
|
49
|
+
calc def round { in x: ScalarQuantityValue[1]; return : ScalarQuantityValue[1]; }
|
|
50
|
+
|
|
51
|
+
calc def ToString specializes BaseFunctions::ToString { in x: ScalarQuantityValue[1]; return : String; }
|
|
52
|
+
calc def ToInteger { in x: ScalarQuantityValue[1]; return : Integer[1]; }
|
|
53
|
+
calc def ToRational { in x: ScalarQuantityValue[1]; return : Rational[1]; }
|
|
54
|
+
calc def ToReal { in x: ScalarQuantityValue[1]; return : Real[1]; }
|
|
55
|
+
calc def ToDimensionOneValue { in x: Real[1]; return : DimensionOneValue[1]; }
|
|
56
|
+
|
|
57
|
+
calc def sum specializes NumericalFunctions::sum { in collection: ScalarQuantityValue[0..*];
|
|
58
|
+
private attribute zero : ScalarQuantityValue[1];
|
|
59
|
+
assert constraint { isZero(zero) }
|
|
60
|
+
return : ScalarQuantityValue = NumericalFunctions::sum0(collection, zero);
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
calc def product specializes NumericalFunctions::product { in collection: ScalarQuantityValue[0..*];
|
|
64
|
+
private attribute one : ScalarQuantityValue[1];
|
|
65
|
+
assert constraint { isUnit(one) }
|
|
66
|
+
return : ScalarQuantityValue = NumericalFunctions::product1(collection, one);
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
calc def ConvertQuantity{ in x: ScalarQuantityValue[1]; in targetMRef: ScalarMeasurementReference[1]; return : ScalarQuantityValue[1]; }
|
|
70
|
+
}
|