sysml-validate 0.11.0 → 0.14.3
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 +598 -142
- 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,171 +1,171 @@
|
|
|
1
|
-
standard library package TradeStudies {
|
|
2
|
-
doc
|
|
3
|
-
/*
|
|
4
|
-
* This package provides a simple framework for defining trade-off study analysis cases.
|
|
5
|
-
*/
|
|
6
|
-
|
|
7
|
-
private import Base::Anything;
|
|
8
|
-
private import ScalarValues::*;
|
|
9
|
-
private import ScalarFunctions::*;
|
|
10
|
-
private import ControlFunctions::*;
|
|
11
|
-
|
|
12
|
-
abstract calc def EvaluationFunction {
|
|
13
|
-
doc
|
|
14
|
-
/*
|
|
15
|
-
* An EvaluationFunction is a calculation that evaluates a TradeStudy alternative,
|
|
16
|
-
* producing a ScalarValue that can be comparted with the evaluation of other
|
|
17
|
-
* alternatives.
|
|
18
|
-
*/
|
|
19
|
-
|
|
20
|
-
in ref alternative : Anything {
|
|
21
|
-
doc
|
|
22
|
-
/*
|
|
23
|
-
* The alternative to be evaluated.
|
|
24
|
-
*/
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
return attribute result : ScalarValue[1] {
|
|
28
|
-
doc
|
|
29
|
-
/*
|
|
30
|
-
* A ScalarValue representing the evaluation of the given alternative.
|
|
31
|
-
*/
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
abstract requirement def TradeStudyObjective {
|
|
36
|
-
doc
|
|
37
|
-
/*
|
|
38
|
-
* A TradeStudyObjective is the base definition for the objective of a TradeStudy.
|
|
39
|
-
* The requirement is to choose from a given set of alternatives the selectedAlternative
|
|
40
|
-
* for that has the best evaluation according to a given EvaluationFunction. What
|
|
41
|
-
* value is considered "best" is not defined in the abstract base definition but must be
|
|
42
|
-
* computed in any concrete specialization.
|
|
43
|
-
*/
|
|
44
|
-
|
|
45
|
-
subject selectedAlternative : Anything {
|
|
46
|
-
doc
|
|
47
|
-
/*
|
|
48
|
-
* The alternative that should be selected, as evaluated using the given
|
|
49
|
-
* ObjectiveFunction.
|
|
50
|
-
*/
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
in ref alternatives : Anything[1..*] {
|
|
54
|
-
doc
|
|
55
|
-
/*
|
|
56
|
-
* The alternatives being considered in the TradeStudy for which this TradeStudyObjective
|
|
57
|
-
* is the objective.
|
|
58
|
-
*/
|
|
59
|
-
}
|
|
60
|
-
|
|
61
|
-
in calc eval : EvaluationFunction {
|
|
62
|
-
doc
|
|
63
|
-
/*
|
|
64
|
-
* The EvaluationFunction to be used in evaluating the given alternatives.
|
|
65
|
-
*/
|
|
66
|
-
}
|
|
67
|
-
|
|
68
|
-
attribute best : ScalarValue {
|
|
69
|
-
doc
|
|
70
|
-
/*
|
|
71
|
-
* Out of the evaluation results of all the given alternatives, the one that is considered
|
|
72
|
-
* "best", in the sense that it is the value the selectedAlternative should have. This
|
|
73
|
-
* value must be computed in any concrete specialization of TradeStudyObjective.
|
|
74
|
-
*/
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
require constraint { eval(selectedAlternative) == best }
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
requirement def MinimizeObjective :> TradeStudyObjective {
|
|
81
|
-
doc
|
|
82
|
-
/*
|
|
83
|
-
* A MinimizeObjective is a TradeStudyObjective that requires that the
|
|
84
|
-
* selectedAlternative have the minimum ObjectiveFunction value of all the
|
|
85
|
-
* given alternatives.
|
|
86
|
-
*/
|
|
87
|
-
|
|
88
|
-
attribute :>> best = alternatives->minimize {
|
|
89
|
-
doc
|
|
90
|
-
/*
|
|
91
|
-
* For a MinimizeObjective, the best value is the minimum one.
|
|
92
|
-
*/
|
|
93
|
-
|
|
94
|
-
in x; eval(x)
|
|
95
|
-
};
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
requirement def MaximizeObjective :> TradeStudyObjective {
|
|
99
|
-
doc
|
|
100
|
-
/*
|
|
101
|
-
* A MaximizeObjective is a TradeStudyObjective that requires that the
|
|
102
|
-
* selectedAlternative have the maximum ObjectiveFunction value of all the
|
|
103
|
-
* given alternatives.
|
|
104
|
-
*/
|
|
105
|
-
|
|
106
|
-
attribute :>> best = alternatives->maximize {
|
|
107
|
-
doc
|
|
108
|
-
/*
|
|
109
|
-
* For a MinimizeObjective, the best value is the maximum one.
|
|
110
|
-
*/
|
|
111
|
-
|
|
112
|
-
in x; eval(x)
|
|
113
|
-
};
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
abstract analysis def TradeStudy {
|
|
117
|
-
doc
|
|
118
|
-
/*
|
|
119
|
-
* A TradeStudy is an analysis case whose subject is a set of alternatives
|
|
120
|
-
* (at least one) and whose result is a selection of one of those alternatives.
|
|
121
|
-
* The alternatives are evaluated based on a given ObjectiveFunction and the
|
|
122
|
-
* selection is made such that it satisfies the objective of the TradeStudy
|
|
123
|
-
* (which must be a TradeStudyObjective).
|
|
124
|
-
*/
|
|
125
|
-
|
|
126
|
-
subject studyAlternatives : Anything[1..*] {
|
|
127
|
-
doc
|
|
128
|
-
/*
|
|
129
|
-
* The set of alternatives being considered in this TradeStudy.
|
|
130
|
-
*
|
|
131
|
-
* In a TradeStudy usage, bind this feature to the actual collection of
|
|
132
|
-
* alternatives to be considered.
|
|
133
|
-
*/
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
abstract calc evaluationFunction : EvaluationFunction {
|
|
137
|
-
doc
|
|
138
|
-
/*
|
|
139
|
-
* The EvaluationFunction to be used to evaluate the alternatives.
|
|
140
|
-
*
|
|
141
|
-
* In a TradeStudy usage, redefine this feature to provide the desired
|
|
142
|
-
* calculation (or bind it to a calculation usage that does so).
|
|
143
|
-
*/
|
|
144
|
-
}
|
|
145
|
-
|
|
146
|
-
objective tradeStudyObjective : TradeStudyObjective {
|
|
147
|
-
doc
|
|
148
|
-
/*
|
|
149
|
-
* The objective of this TradeStudy.
|
|
150
|
-
*
|
|
151
|
-
* Redefine this feature to give it a definition that is a concrete
|
|
152
|
-
* specialization of TradeStudyObjective. That can either be one of the
|
|
153
|
-
* specializations provided in this package, or a more specific user-
|
|
154
|
-
* defined one.
|
|
155
|
-
*/
|
|
156
|
-
|
|
157
|
-
subject :>> selectedAlternative;
|
|
158
|
-
in ref :>> alternatives = studyAlternatives;
|
|
159
|
-
in calc :>> eval = evaluationFunction;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
return selectedAlternative : Anything = studyAlternatives->selectOne {in ref a {
|
|
163
|
-
doc
|
|
164
|
-
/*
|
|
165
|
-
* The alternative selected by this TradeStudy, which is the one that meets the
|
|
166
|
-
* requirement of the tradeStudyObjective.
|
|
167
|
-
*/
|
|
168
|
-
} tradeStudyObjective(selectedAlternative = a)};
|
|
169
|
-
}
|
|
170
|
-
|
|
1
|
+
standard library package TradeStudies {
|
|
2
|
+
doc
|
|
3
|
+
/*
|
|
4
|
+
* This package provides a simple framework for defining trade-off study analysis cases.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
private import Base::Anything;
|
|
8
|
+
private import ScalarValues::*;
|
|
9
|
+
private import ScalarFunctions::*;
|
|
10
|
+
private import ControlFunctions::*;
|
|
11
|
+
|
|
12
|
+
abstract calc def EvaluationFunction {
|
|
13
|
+
doc
|
|
14
|
+
/*
|
|
15
|
+
* An EvaluationFunction is a calculation that evaluates a TradeStudy alternative,
|
|
16
|
+
* producing a ScalarValue that can be comparted with the evaluation of other
|
|
17
|
+
* alternatives.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
in ref alternative : Anything {
|
|
21
|
+
doc
|
|
22
|
+
/*
|
|
23
|
+
* The alternative to be evaluated.
|
|
24
|
+
*/
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
return attribute result : ScalarValue[1] {
|
|
28
|
+
doc
|
|
29
|
+
/*
|
|
30
|
+
* A ScalarValue representing the evaluation of the given alternative.
|
|
31
|
+
*/
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
abstract requirement def TradeStudyObjective {
|
|
36
|
+
doc
|
|
37
|
+
/*
|
|
38
|
+
* A TradeStudyObjective is the base definition for the objective of a TradeStudy.
|
|
39
|
+
* The requirement is to choose from a given set of alternatives the selectedAlternative
|
|
40
|
+
* for that has the best evaluation according to a given EvaluationFunction. What
|
|
41
|
+
* value is considered "best" is not defined in the abstract base definition but must be
|
|
42
|
+
* computed in any concrete specialization.
|
|
43
|
+
*/
|
|
44
|
+
|
|
45
|
+
subject selectedAlternative : Anything {
|
|
46
|
+
doc
|
|
47
|
+
/*
|
|
48
|
+
* The alternative that should be selected, as evaluated using the given
|
|
49
|
+
* ObjectiveFunction.
|
|
50
|
+
*/
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
in ref alternatives : Anything[1..*] {
|
|
54
|
+
doc
|
|
55
|
+
/*
|
|
56
|
+
* The alternatives being considered in the TradeStudy for which this TradeStudyObjective
|
|
57
|
+
* is the objective.
|
|
58
|
+
*/
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
in calc eval : EvaluationFunction {
|
|
62
|
+
doc
|
|
63
|
+
/*
|
|
64
|
+
* The EvaluationFunction to be used in evaluating the given alternatives.
|
|
65
|
+
*/
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
attribute best : ScalarValue {
|
|
69
|
+
doc
|
|
70
|
+
/*
|
|
71
|
+
* Out of the evaluation results of all the given alternatives, the one that is considered
|
|
72
|
+
* "best", in the sense that it is the value the selectedAlternative should have. This
|
|
73
|
+
* value must be computed in any concrete specialization of TradeStudyObjective.
|
|
74
|
+
*/
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
require constraint { eval(selectedAlternative) == best }
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
requirement def MinimizeObjective :> TradeStudyObjective {
|
|
81
|
+
doc
|
|
82
|
+
/*
|
|
83
|
+
* A MinimizeObjective is a TradeStudyObjective that requires that the
|
|
84
|
+
* selectedAlternative have the minimum ObjectiveFunction value of all the
|
|
85
|
+
* given alternatives.
|
|
86
|
+
*/
|
|
87
|
+
|
|
88
|
+
attribute :>> best = alternatives->minimize {
|
|
89
|
+
doc
|
|
90
|
+
/*
|
|
91
|
+
* For a MinimizeObjective, the best value is the minimum one.
|
|
92
|
+
*/
|
|
93
|
+
|
|
94
|
+
in x; eval(x)
|
|
95
|
+
};
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
requirement def MaximizeObjective :> TradeStudyObjective {
|
|
99
|
+
doc
|
|
100
|
+
/*
|
|
101
|
+
* A MaximizeObjective is a TradeStudyObjective that requires that the
|
|
102
|
+
* selectedAlternative have the maximum ObjectiveFunction value of all the
|
|
103
|
+
* given alternatives.
|
|
104
|
+
*/
|
|
105
|
+
|
|
106
|
+
attribute :>> best = alternatives->maximize {
|
|
107
|
+
doc
|
|
108
|
+
/*
|
|
109
|
+
* For a MinimizeObjective, the best value is the maximum one.
|
|
110
|
+
*/
|
|
111
|
+
|
|
112
|
+
in x; eval(x)
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
abstract analysis def TradeStudy {
|
|
117
|
+
doc
|
|
118
|
+
/*
|
|
119
|
+
* A TradeStudy is an analysis case whose subject is a set of alternatives
|
|
120
|
+
* (at least one) and whose result is a selection of one of those alternatives.
|
|
121
|
+
* The alternatives are evaluated based on a given ObjectiveFunction and the
|
|
122
|
+
* selection is made such that it satisfies the objective of the TradeStudy
|
|
123
|
+
* (which must be a TradeStudyObjective).
|
|
124
|
+
*/
|
|
125
|
+
|
|
126
|
+
subject studyAlternatives : Anything[1..*] {
|
|
127
|
+
doc
|
|
128
|
+
/*
|
|
129
|
+
* The set of alternatives being considered in this TradeStudy.
|
|
130
|
+
*
|
|
131
|
+
* In a TradeStudy usage, bind this feature to the actual collection of
|
|
132
|
+
* alternatives to be considered.
|
|
133
|
+
*/
|
|
134
|
+
}
|
|
135
|
+
|
|
136
|
+
abstract calc evaluationFunction : EvaluationFunction {
|
|
137
|
+
doc
|
|
138
|
+
/*
|
|
139
|
+
* The EvaluationFunction to be used to evaluate the alternatives.
|
|
140
|
+
*
|
|
141
|
+
* In a TradeStudy usage, redefine this feature to provide the desired
|
|
142
|
+
* calculation (or bind it to a calculation usage that does so).
|
|
143
|
+
*/
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
objective tradeStudyObjective : TradeStudyObjective {
|
|
147
|
+
doc
|
|
148
|
+
/*
|
|
149
|
+
* The objective of this TradeStudy.
|
|
150
|
+
*
|
|
151
|
+
* Redefine this feature to give it a definition that is a concrete
|
|
152
|
+
* specialization of TradeStudyObjective. That can either be one of the
|
|
153
|
+
* specializations provided in this package, or a more specific user-
|
|
154
|
+
* defined one.
|
|
155
|
+
*/
|
|
156
|
+
|
|
157
|
+
subject :>> selectedAlternative;
|
|
158
|
+
in ref :>> alternatives = studyAlternatives;
|
|
159
|
+
in calc :>> eval = evaluationFunction;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
return selectedAlternative : Anything = studyAlternatives->selectOne {in ref a {
|
|
163
|
+
doc
|
|
164
|
+
/*
|
|
165
|
+
* The alternative selected by this TradeStudy, which is the one that meets the
|
|
166
|
+
* requirement of the tradeStudyObjective.
|
|
167
|
+
*/
|
|
168
|
+
} tradeStudyObjective(selectedAlternative = a)};
|
|
169
|
+
}
|
|
170
|
+
|
|
171
171
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
{
|
|
2
|
-
"index": {
|
|
3
|
-
"CausationConnections": "CausationConnections.sysml",
|
|
4
|
-
"CauseAndEffect": "CauseAndEffect.sysml"
|
|
5
|
-
},
|
|
6
|
-
"created": "2025-03-13T00:00:00Z",
|
|
7
|
-
"metamodel": "https://www.omg.org/spec/SysML/20250201"
|
|
1
|
+
{
|
|
2
|
+
"index": {
|
|
3
|
+
"CausationConnections": "CausationConnections.sysml",
|
|
4
|
+
"CauseAndEffect": "CauseAndEffect.sysml"
|
|
5
|
+
},
|
|
6
|
+
"created": "2025-03-13T00:00:00Z",
|
|
7
|
+
"metamodel": "https://www.omg.org/spec/SysML/20250201"
|
|
8
8
|
}
|
|
@@ -1,23 +1,23 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "SysML Cause and Effect Library",
|
|
3
|
-
"version": "2.0.0",
|
|
4
|
-
"description": "Standard cause-and-effect domain library for the Systems Modeling Language (SysML)",
|
|
5
|
-
"usage": [
|
|
6
|
-
{
|
|
7
|
-
"resource": "https://www.omg.org/spec/KerML/20250201/Semantic-Library.kpar",
|
|
8
|
-
"versionConstraint": "1.0.0"
|
|
9
|
-
},
|
|
10
|
-
{
|
|
11
|
-
"resource": "https://www.omg.org/spec/KerML/20250201/Data-Type-Library.kpar",
|
|
12
|
-
"versionConstraint": "1.0.0"
|
|
13
|
-
},
|
|
14
|
-
{
|
|
15
|
-
"resource": "https://www.omg.org/spec/KerML/20250201/Function-Library.kpar",
|
|
16
|
-
"versionConstraint": "1.0.0"
|
|
17
|
-
},
|
|
18
|
-
{
|
|
19
|
-
"resource": "https://www.omg.org/spec/SysML/20250201/Systems-Library.kpar",
|
|
20
|
-
"versionConstraint": "2.0.0"
|
|
21
|
-
}
|
|
22
|
-
]
|
|
1
|
+
{
|
|
2
|
+
"name": "SysML Cause and Effect Library",
|
|
3
|
+
"version": "2.0.0",
|
|
4
|
+
"description": "Standard cause-and-effect domain library for the Systems Modeling Language (SysML)",
|
|
5
|
+
"usage": [
|
|
6
|
+
{
|
|
7
|
+
"resource": "https://www.omg.org/spec/KerML/20250201/Semantic-Library.kpar",
|
|
8
|
+
"versionConstraint": "1.0.0"
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
"resource": "https://www.omg.org/spec/KerML/20250201/Data-Type-Library.kpar",
|
|
12
|
+
"versionConstraint": "1.0.0"
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
"resource": "https://www.omg.org/spec/KerML/20250201/Function-Library.kpar",
|
|
16
|
+
"versionConstraint": "1.0.0"
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
"resource": "https://www.omg.org/spec/SysML/20250201/Systems-Library.kpar",
|
|
20
|
+
"versionConstraint": "2.0.0"
|
|
21
|
+
}
|
|
22
|
+
]
|
|
23
23
|
}
|
package/resources/sysml.library/Domain Libraries/Cause and Effect/CausationConnections.sysml
CHANGED
|
@@ -1,83 +1,83 @@
|
|
|
1
|
-
standard library package CausationConnections {
|
|
2
|
-
doc
|
|
3
|
-
/*
|
|
4
|
-
* This package provides a library model modeling causes, effects, and causation connections
|
|
5
|
-
* between them.
|
|
6
|
-
*/
|
|
7
|
-
|
|
8
|
-
private import SequenceFunctions::isEmpty;
|
|
9
|
-
private import SequenceFunctions::size;
|
|
10
|
-
private import SequenceFunctions::intersection;
|
|
11
|
-
|
|
12
|
-
abstract occurrence causes[*] {
|
|
13
|
-
doc /* Occurrences that are causes. */
|
|
14
|
-
}
|
|
15
|
-
|
|
16
|
-
abstract occurrence effects[*] {
|
|
17
|
-
doc /* Occurrences that are effects. */
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
abstract connection def Multicausation {
|
|
21
|
-
doc
|
|
22
|
-
/*
|
|
23
|
-
* A Multicausation connection models the situation in which one set of
|
|
24
|
-
* occurrences causes another.
|
|
25
|
-
*
|
|
26
|
-
* To create a Multicausation connection, specialize this connection definition
|
|
27
|
-
* adding specific end features of the relavent types. Ends representing causes
|
|
28
|
-
* should subset 'causes', while ends representing effects should subset 'effects'.
|
|
29
|
-
* There must be at least one cause and at least one effect.
|
|
30
|
-
*/
|
|
31
|
-
|
|
32
|
-
abstract constant ref occurrence causes[1..*] :>> causes :> participant {
|
|
33
|
-
doc
|
|
34
|
-
/*
|
|
35
|
-
* The causing occurrences. (Constant for each Multicausation instance.)
|
|
36
|
-
*/
|
|
37
|
-
}
|
|
38
|
-
abstract constant ref occurrence effects[1..*] :>> effects :> participant {
|
|
39
|
-
doc
|
|
40
|
-
/*
|
|
41
|
-
* The effect occurrences caused by the causing occurrences.
|
|
42
|
-
* (Constant for each Multicausation instance.)
|
|
43
|
-
*/
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
private assert constraint disjointCauseEffect {
|
|
47
|
-
doc /* causes must be disjoint from effects. */
|
|
48
|
-
isEmpty(intersection(causes, effects))
|
|
49
|
-
}
|
|
50
|
-
|
|
51
|
-
private succession causalOrdering first [nCauses] causes.startShot then [nEffects] effects {
|
|
52
|
-
doc /* All causes must exist before all effects. */
|
|
53
|
-
attribute nCauses = size(causes);
|
|
54
|
-
attribute nEffects = size(effects);
|
|
55
|
-
}
|
|
56
|
-
}
|
|
57
|
-
|
|
58
|
-
abstract connection multicausations : Multicausation[*] {
|
|
59
|
-
doc /* multicausations is the base feature for Multicausation ConnectionUsages. */
|
|
60
|
-
}
|
|
61
|
-
|
|
62
|
-
connection def Causation :> Multicausation {
|
|
63
|
-
doc
|
|
64
|
-
/*
|
|
65
|
-
* A Causation is a binary Multicausation in which a single cause occurrence
|
|
66
|
-
* causes a single effect occurrence. (However, a single cause can separately
|
|
67
|
-
* have multiple effects, and a single effect can have separate Causation
|
|
68
|
-
* connections with multiple causes.)
|
|
69
|
-
*/
|
|
70
|
-
|
|
71
|
-
end theCauses [*] occurrence theCause :> causes :>> source {
|
|
72
|
-
doc /* The single causing occurrence. */
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
end theEffects [*] occurrence theEffect :> effects :>> target {
|
|
76
|
-
doc /* The single effect occurrence resulting from the cause. */
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
|
|
80
|
-
abstract connection causations : Causation[*] :> multicausations {
|
|
81
|
-
doc /* causations is the base feature for Causation ConnectionUsages. */
|
|
82
|
-
}
|
|
1
|
+
standard library package CausationConnections {
|
|
2
|
+
doc
|
|
3
|
+
/*
|
|
4
|
+
* This package provides a library model modeling causes, effects, and causation connections
|
|
5
|
+
* between them.
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
private import SequenceFunctions::isEmpty;
|
|
9
|
+
private import SequenceFunctions::size;
|
|
10
|
+
private import SequenceFunctions::intersection;
|
|
11
|
+
|
|
12
|
+
abstract occurrence causes[*] {
|
|
13
|
+
doc /* Occurrences that are causes. */
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
abstract occurrence effects[*] {
|
|
17
|
+
doc /* Occurrences that are effects. */
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
abstract connection def Multicausation {
|
|
21
|
+
doc
|
|
22
|
+
/*
|
|
23
|
+
* A Multicausation connection models the situation in which one set of
|
|
24
|
+
* occurrences causes another.
|
|
25
|
+
*
|
|
26
|
+
* To create a Multicausation connection, specialize this connection definition
|
|
27
|
+
* adding specific end features of the relavent types. Ends representing causes
|
|
28
|
+
* should subset 'causes', while ends representing effects should subset 'effects'.
|
|
29
|
+
* There must be at least one cause and at least one effect.
|
|
30
|
+
*/
|
|
31
|
+
|
|
32
|
+
abstract constant ref occurrence causes[1..*] :>> causes :> participant {
|
|
33
|
+
doc
|
|
34
|
+
/*
|
|
35
|
+
* The causing occurrences. (Constant for each Multicausation instance.)
|
|
36
|
+
*/
|
|
37
|
+
}
|
|
38
|
+
abstract constant ref occurrence effects[1..*] :>> effects :> participant {
|
|
39
|
+
doc
|
|
40
|
+
/*
|
|
41
|
+
* The effect occurrences caused by the causing occurrences.
|
|
42
|
+
* (Constant for each Multicausation instance.)
|
|
43
|
+
*/
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
private assert constraint disjointCauseEffect {
|
|
47
|
+
doc /* causes must be disjoint from effects. */
|
|
48
|
+
isEmpty(intersection(causes, effects))
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
private succession causalOrdering first [nCauses] causes.startShot then [nEffects] effects {
|
|
52
|
+
doc /* All causes must exist before all effects. */
|
|
53
|
+
attribute nCauses = size(causes);
|
|
54
|
+
attribute nEffects = size(effects);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
abstract connection multicausations : Multicausation[*] {
|
|
59
|
+
doc /* multicausations is the base feature for Multicausation ConnectionUsages. */
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
connection def Causation :> Multicausation {
|
|
63
|
+
doc
|
|
64
|
+
/*
|
|
65
|
+
* A Causation is a binary Multicausation in which a single cause occurrence
|
|
66
|
+
* causes a single effect occurrence. (However, a single cause can separately
|
|
67
|
+
* have multiple effects, and a single effect can have separate Causation
|
|
68
|
+
* connections with multiple causes.)
|
|
69
|
+
*/
|
|
70
|
+
|
|
71
|
+
end theCauses [*] occurrence theCause :> causes :>> source {
|
|
72
|
+
doc /* The single causing occurrence. */
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
end theEffects [*] occurrence theEffect :> effects :>> target {
|
|
76
|
+
doc /* The single effect occurrence resulting from the cause. */
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
abstract connection causations : Causation[*] :> multicausations {
|
|
81
|
+
doc /* causations is the base feature for Causation ConnectionUsages. */
|
|
82
|
+
}
|
|
83
83
|
}
|