File tree Expand file tree Collapse file tree
sysml.library/Domain Libraries/Geometry Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -102,12 +102,12 @@ package ShapeItems {
102102 * baseRadius, apexRadius and height.
103103 */
104104 item def Cone :> Shell {
105- attribute baseRadius [1] = radius;
106- attribute apexRadius [1] default 0 [m];
105+ attribute baseRadius [1] :> length = radius;
106+ attribute apexRadius [1] :> length default 0 [m];
107107 attribute :>> height [1];
108108
109109 attribute :>> radius [1];
110- attribute isTruncated : Boolean [1] = ( apexRadius > 0) ;
110+ attribute isTruncated : Boolean [1] = apexRadius > 0;
111111
112112 item :>> faces [2..3];
113113 item bf : Disc [1] :> faces;
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ package 'Documentation Example' {
44 */
55
66 part def Automobile {
7- doc /* This documentation of Automobile. */
7+ doc Document1 /* This documentation of Automobile. */
88 }
99
1010 alias Car for Automobile;
Original file line number Diff line number Diff line change 11package 'Metadata Example-1' {
22
33 metadata def SafetyFeature;
4- metadata def SecurityFeature;
4+ metadata def SecurityFeature {
5+ :> annotatedElement : SysML::PartDefinition;
6+ :> annotatedElement : SysML::PartUsage;
7+ }
58
69 metadata SafetyFeature about
710 vehicle::interior::seatBelt,
Original file line number Diff line number Diff line change 1+ package 'Model Library Example' {
2+ import ScalarValues::Real;
3+ import RiskMetadata::Level;
4+
5+ abstract occurrence def Situation;
6+
7+ abstract occurrence situations : Situation[*] nonunique;
8+
9+ abstract occurrence def Cause {
10+ attribute probability : Real;
11+ }
12+
13+ abstract occurrence causes : Cause[*] nonunique :> situations;
14+
15+ abstract occurrence def Failure {
16+ attribute severity : Level;
17+ }
18+
19+ abstract occurrence failures : Failure[*] nonunique :> situations;
20+
21+ abstract connection def Causation :> Occurrences::HappensBefore {
22+ end cause : Situation[*];
23+ end effect : Situation[*];
24+ }
25+
26+ abstract connection causations : Causation[*] nonunique;
27+
28+ item def Scenario {
29+ occurrence :>> situations;
30+ occurrence :>> causes :> situations;
31+ occurrence :>> failures :> situations;
32+ }
33+
34+ item scenarios : Scenario[*] nonunique;
35+ }
Original file line number Diff line number Diff line change 1+ package 'Semantic Metadata Example' {
2+ import 'Model Library Example'::*;
3+ import Metaobjects::SemanticMetadata;
4+
5+ metadata def situation :> SemanticMetadata {
6+ :>> baseType = situations as SysML::Usage;
7+ }
8+
9+ metadata def cause :> SemanticMetadata {
10+ :>> baseType = causes as SysML::Usage;
11+ }
12+
13+ metadata def failure :> SemanticMetadata {
14+ :>> baseType = failures as SysML::Usage;
15+ }
16+
17+ metadata def causation :> SemanticMetadata {
18+ :>> baseType = causations as SysML::Usage;
19+ }
20+
21+ metadata def scenario :> SemanticMetadata {
22+ :>> baseType = scenarios as SysML::Usage;
23+ }
24+
25+ }
Original file line number Diff line number Diff line change 1+ package 'User Keyword Example' {
2+ import 'Semantic Metadata Example'::*;
3+ import RiskMetadata::LevelEnum;
4+
5+ part def Device {
6+ part battery {
7+ attribute power : Real;
8+ }
9+ }
10+
11+ #scenario def DeviceFailure {
12+ ref device : Device;
13+ attribute minPower : Real;
14+
15+ #cause 'battery old' {
16+ :>> probability = 0.01;
17+ }
18+
19+ #causation first 'battery old' then 'power low';
20+
21+ #situation 'power low' {
22+ constraint { device.battery.power < minPower }
23+ }
24+
25+ #causation first 'power low' then 'device shutoff';
26+
27+ #failure 'device shutoff' {
28+ :>> severity = LevelEnum::high;
29+ }
30+ }
31+ }
File renamed without changes.
File renamed without changes.
You can’t perform that action at this time.
0 commit comments