Skip to content

Commit 18a3117

Browse files
committed
SYSML2_-416 Updated SysML example models for new cross feature syntax.
1 parent 51c284a commit 18a3117

7 files changed

Lines changed: 25 additions & 25 deletions

File tree

sysml/src/examples/Simple Tests/ConstraintTest.sysml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,9 @@ package ConstraintTest {
2727
}
2828

2929
bind massAnalysis.totalMass = mass;
30-
bind massAnalysis.componentMasses[1] = engine.mass;
31-
bind massAnalysis.componentMasses[1] = frontAxleAssembly.mass;
32-
bind massAnalysis.componentMasses[1] = rearAxleAssembly.mass;
30+
bind massAnalysis.componentMasses = engine.mass;
31+
bind massAnalysis.componentMasses = frontAxleAssembly.mass;
32+
bind massAnalysis.componentMasses = rearAxleAssembly.mass;
3333
}
3434

3535
part vehicle1b :> vehicle {
@@ -50,9 +50,9 @@ package ConstraintTest {
5050
assert constraint massConstraint : MassAnalysis2;
5151

5252
bind massConstraint.totalMass = mass;
53-
bind massConstraint.componentMasses[1] = engine.mass;
54-
bind massConstraint.componentMasses[1] = frontAxleAssembly.mass;
55-
bind massConstraint.componentMasses[1] = rearAxleAssembly.mass;
53+
bind massConstraint.componentMasses = engine.mass;
54+
bind massConstraint.componentMasses = frontAxleAssembly.mass;
55+
bind massConstraint.componentMasses = rearAxleAssembly.mass;
5656
}
5757

5858
part vehicle2b :> vehicle {

sysml/src/examples/Vehicle Example/SysML v2 Spec Annex A SimpleVehicleModel.sysml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -637,9 +637,9 @@ package SimpleVehicleModel{
637637
connect differential.rightDiffPort to rearAxle.rightHalfAxle.rightAxleToDiffPort;
638638

639639
interface wheelToleftHalAxleInterface:WheelHubInterface
640-
connect rearWheel1.lugNutCompositePort [1] to rearAxle.leftHalfAxle.shankCompositePort [1];
640+
connect [1] rearWheel1.lugNutCompositePort to [1] rearAxle.leftHalfAxle.shankCompositePort;
641641
interface wheelTorightHalAxleInterface:WheelHubInterface
642-
connect rearWheel2.lugNutCompositePort [1] to rearAxle.rightHalfAxle.shankCompositePort [1];
642+
connect [1] rearWheel2.lugNutCompositePort to [1] rearAxle.rightHalfAxle.shankCompositePort;
643643

644644
}
645645
part starterMotor:StarterMotor;
@@ -950,7 +950,7 @@ package SimpleVehicleModel{
950950
}
951951
}
952952
interface wheelHubInterface:WheelHubInterface
953-
connect wheel1.lugNutCompositePort [1] to hub1.shankCompositePort [1];
953+
connect [1] wheel1.lugNutCompositePort to [1] hub1.shankCompositePort;
954954
}
955955
// alternative 2 - w multiple nesxted interfaces
956956
part wheelHubAssy2{
@@ -965,9 +965,9 @@ package SimpleVehicleModel{
965965
}
966966
}
967967
interface wheelHubInterface:WheelHubInterface
968-
connect lugNutCompositePort ::> wheel1.lugNutCompositePort [1] to shankCompositePort ::> hub1.shankCompositePort [1] {
968+
connect [1] lugNutCompositePort ::> wheel1.lugNutCompositePort to [1] shankCompositePort ::> hub1.shankCompositePort {
969969
interface wheelFastenerInterface1 :> wheelFastenerInterface
970-
connect lugNutPort ::> lugNutCompositePort.lugNutPort [5] to shankPort ::> shankCompositePort.shankPort [5];
970+
connect [5] lugNutPort ::> lugNutCompositePort.lugNutPort to [5] shankPort ::> shankCompositePort.shankPort;
971971
}
972972
}
973973
// alternative 3 - w explicit nesxted interfaces
@@ -996,7 +996,7 @@ package SimpleVehicleModel{
996996
}
997997
}
998998
interface wheelHubInterface:WheelHubInterface
999-
connect lugNutCompositePort ::> wheel1.lugNutCompositePort [1] to shankCompositePort ::> hub1.shankCompositePort [1] {
999+
connect [1] lugNutCompositePort ::> wheel1.lugNutCompositePort to [1] shankCompositePort ::> hub1.shankCompositePort {
10001000
interface wheelFastenerInterface1 :> wheelFastenerInterface
10011001
connect lugNutPort ::> lugNutCompositePort.lugNutPort1 to shankPort ::> shankCompositePort.shankPort1 {
10021002
attribute :>> maxTorque = 90 * 1.356 [N*m];

sysml/src/training/09. Connections/Connections Example.sysml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ package 'Connections Example' {
3535
part hub : Hub[1] {
3636
part h : LugBoltThreadableHole[5];
3737
}
38-
connect lugBoltJoints[0..1] to wheel.w.mountingHoles[1];
39-
connect lugBoltJoints[0..1] to hub.h[1];
38+
connect [0..1] lugBoltJoints to [1] wheel.w.mountingHoles;
39+
connect [0..1] lugBoltJoints to [1] hub.h;
4040
}
4141

4242
}

sysml/src/training/11. Interfaces/Interface Decomposition Example.sysml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@ package 'Interface Decomposition Example' {
77
port def FaucetInlet;
88

99
interface def WaterDelivery {
10-
end suppliedBy : SpigotBank[1] {
10+
end [1] port suppliedBy : SpigotBank {
1111
port hot : Spigot;
1212
port cold : Spigot;
1313
}
14-
end deliveredTo : Faucet[1..*] {
14+
end [1..*] port deliveredTo : Faucet {
1515
port hot : FaucetInlet;
1616
port cold : FaucetInlet;
1717
}

sysml/src/training/40. Language Extension/Model Library Example.sysml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@ library package 'Model Library Example' {
1919
abstract occurrence failures : Failure[*] nonunique :> situations;
2020

2121
abstract connection def Causation :> Occurrences::HappensBefore {
22-
end cause : Situation[*];
23-
end effect : Situation[*];
22+
end [*] ref cause : Situation;
23+
end [*] ref effect : Situation;
2424
}
2525

2626
abstract connection causations : Causation[*] nonunique;

sysml/src/validation/07-Variant Configuration/7a1-Variant Configuration - General Concept-a.sysml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ package '7a1-Variant Configuration - General Concept-a' {
5050
}
5151
}
5252

53-
connect subsystemA.part3.p1[0..1] to subsystemB.part5.p2[1];
53+
connect [0..1] subsystemA.part3.p1 to [1] subsystemB.part5.p2;
5454

5555
assert constraint {
5656
subsystemA != subsystemA.subsystem2 |

sysml/src/validation/14-Language Extensions/14c-Language Extensions.sysml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,8 @@ package '14c-Language-Extensions' {
3636
abstract item fmeaItems : FMEAItem[*] nonunique;
3737

3838
connection def Causation :> Occurrences::HappensBefore {
39-
end cause[*]: Situation;
40-
end effect[*]: Situation;
39+
end [*] ref cause: Situation;
40+
end [*] ref effect: Situation;
4141
}
4242

4343
abstract connection causations : Causation[*] nonunique;
@@ -53,15 +53,15 @@ package '14c-Language-Extensions' {
5353
enum def SIL { A; B; C; }
5454

5555
connection def Violation {
56-
end sit[*]: Situation;
57-
end req[*]: FMEARequirement;
56+
end [*] ref sit: Situation;
57+
end [*] ref req: FMEARequirement;
5858
}
5959

6060
abstract connection violations : Violation[*] nonunique;
6161

6262
abstract connection def ControllingMeasure {
63-
end sit[*]: Situation;
64-
end req[*]: FMEARequirement;
63+
end [*] ref sit: Situation;
64+
end [*] ref req: FMEARequirement;
6565
}
6666

6767
connection def Prevention :> ControllingMeasure;

0 commit comments

Comments
 (0)