{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# SysML v2 JupyterBook\n",
"\n",
"*Last update: January 16th, 2023*\n",
"\n",
"This Jupyter Notebook is an exploration of SysML v2 from the user perspective. It shows some SysML v2 basics, but mainly focuses on the special features compared to SysML v1 and how they can be used. For a detailed introduction to the textual syntax of SysML v2, I recommend the following PDF: [Introduction to the SysML v2 Language Textual Notation](https://github.com/Systems-Modeling/SysML-v2-Release/blob/master/doc/Intro%20to%20the%20SysML%20v2%20Language.pdf).\n",
"\n",
"**Please note: This is work in progress. You will see sketchy stuff. If you have any comments, contact me: [tim@mbse4u.com](mailto:tim@mbse4u.com).**\n",
"\n",
"## Table of Contents\n",
"\n",
"* [Introduction](#sysmlv2modintroduction)\n",
"* [Graphical and Textual Notation of SysML v2](#sysmlv2modnotation)\n",
"* [Example and first steps](#sysmlv2modexample)\n",
"* [Parts and PartDefinitions](#sysmlv2modparts)\n",
"* [Specialization and Subsetting](#sysmlv2modspecialization)\n",
"* [Putting the parts together](#sysmlv2modconnect)\n",
"* [Modeling Interfaces](#sysmlv2modinterfaces)\n",
"* [Modeling Activities](#sysmlv2usecasesactivities)\n",
"* [Connection item flows with parameters](#sysmlv2itempara)\n",
"* [Modeling variants](#sysmlv2modvariants)\n",
"* [Modeling requirements](#sysmlv2modrequirements)\n"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Introduction\n",
"\n",
"This section provides \n",
"\n",
"* a brief introduction of the modeling with SysML v2,\n",
"* with a special focus on what is different compared to SysML v1.\n",
"\n",
"The target audience for this Jupyter notebook is SysML v1 modelers. The basic concepts like \"What is a Use Case?\" or \"What is a Part Decomposition?\" are not explained.\n",
"\n",
"It is not (yet) a complete SysML v2 tutorial. It uses the SysML v2 pilot implementation which is not intended as full modeling tool for industrial application. "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Graphical and Textual Notation of SysML v2\n",
"\n",
"SysML v1 is primarily known for its diagrams. Although they are only the visualization of the model information and the real treasure of a real SysML model is the model data behind the diagrams.\n",
"\n",
"SysML v2 also provides graphical visualizations and additionally a textual notation. Both are equivalent notations and tools can provide editors for both.\n",
"\n",
"The SysML v2 pilot implementation has so far only a textual editor and generates the graphical notation. Therefore, some have been under the impression that SysML v2 is primarily textual. This is not the case. Those who wish can use SysML v2 as they would SysML v1 and edit the model using graphical editors only."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Example and first steps\n",
"\n",
"The simple example system is the following electrical vehicle:\n",
"\n",
"![Electrical HSUV](lego-evehicle.jpg)\n",
"\n",
"Let's start with a logical architecture of the vehicle. A first major difference compared to SysML is that there is a textual syntax for SysML v2.\n",
"The following cell shows the textual SysML v2 syntax of the logical architecture. The package statement defines the namespace of the architecture. The eVehicle architecture itself is a simple set of parts."
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Package eVehicle_LogicalArchitecture (82277ca4-ea03-4932-9920-efbf66837aec)\n"
]
},
"execution_count": 1,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"package eVehicle_LogicalArchitecture {\n",
" part eVehicle { \n",
" part body;\n",
" part battery;\n",
" part engine;\n",
" part frontAxis;\n",
" part rearAxis;\n",
" part frontWheel[2];\n",
" part rearWheel[2];\n",
" }\n",
"}"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Run the cell above to create the real model. The text above is only the textual syntax of SysML v2. The show command provides a deep insight into the model structure:"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Package eVehicle_LogicalArchitecture (82277ca4-ea03-4932-9920-efbf66837aec)\n",
" [OwningMembership] PartUsage eVehicle (784dc059-a193-493b-b9f5-cc76f285d52c)\n",
" [Subsetting (implicit)] PartUsage parts (2ff9017b-e54e-4f55-8bf4-b32f6a6479e1)\n",
" [FeatureMembership] PartUsage body (9d3e416f-2abd-4adc-a887-22780d88dbdf)\n",
" [Subsetting (implicit)] PartUsage subparts (6727b1b0-c4ff-4ffd-9bb1-13acd6bca757)\n",
" [OwningMembership] Multiplicity (5ae8da0e-cc9a-4d11-bd0e-3de6c50b20c8)\n",
" [Subsetting (implicit)] MultiplicityRange exactlyOne (0619242c-c834-4036-a488-bf45c9552e6c)\n",
" [FeatureMembership] PartUsage battery (444a8c02-b5bc-47bd-bda0-bfb811381389)\n",
" [Subsetting (implicit)] PartUsage subparts (6727b1b0-c4ff-4ffd-9bb1-13acd6bca757)\n",
" [OwningMembership] Multiplicity (7aacfffc-afc0-4032-8d55-7fd1223ef77a)\n",
" [Subsetting (implicit)] MultiplicityRange exactlyOne (0619242c-c834-4036-a488-bf45c9552e6c)\n",
" [FeatureMembership] PartUsage engine (ab8525db-a1c1-45d3-9342-15676e8d124b)\n",
" [Subsetting (implicit)] PartUsage subparts (6727b1b0-c4ff-4ffd-9bb1-13acd6bca757)\n",
" [OwningMembership] Multiplicity (064dbbec-2047-415d-858f-d7f0c6807522)\n",
" [Subsetting (implicit)] MultiplicityRange exactlyOne (0619242c-c834-4036-a488-bf45c9552e6c)\n",
" [FeatureMembership] PartUsage frontAxis (c6af6a4b-4968-4887-ae6d-3da8b88fbb99)\n",
" [Subsetting (implicit)] PartUsage subparts (6727b1b0-c4ff-4ffd-9bb1-13acd6bca757)\n",
" [OwningMembership] Multiplicity (4b0efe2a-8f83-4833-8318-3847c10bef6e)\n",
" [Subsetting (implicit)] MultiplicityRange exactlyOne (0619242c-c834-4036-a488-bf45c9552e6c)\n",
" [FeatureMembership] PartUsage rearAxis (234e5162-6e97-48c3-9eda-529547d0475e)\n",
" [Subsetting (implicit)] PartUsage subparts (6727b1b0-c4ff-4ffd-9bb1-13acd6bca757)\n",
" [OwningMembership] Multiplicity (8771680e-d9ef-4d21-9497-94ce5c3b6fb5)\n",
" [Subsetting (implicit)] MultiplicityRange exactlyOne (0619242c-c834-4036-a488-bf45c9552e6c)\n",
" [FeatureMembership] PartUsage frontWheel (3066cf83-52f1-4d82-9957-0ce262312a62)\n",
" [Subsetting (implicit)] PartUsage subparts (6727b1b0-c4ff-4ffd-9bb1-13acd6bca757)\n",
" [OwningMembership] MultiplicityRange (1f289ea1-a543-4530-a197-7848917b3c7a)\n",
" [Subsetting (implicit)] Feature naturals (41e1cbaf-102a-403a-ae1e-36d7409b7bd0)\n",
" [OwningMembership] LiteralInteger (f0a0c7f1-aaa4-4f25-8245-9eca902e6517)\n",
" [ReturnParameterMembership] Feature result (83e26187-3d82-467c-a858-22977e15a373)\n",
" [FeatureMembership] PartUsage rearWheel (97a96405-c614-4d88-aaf6-bd94701a7bc6)\n",
" [Subsetting (implicit)] PartUsage subparts (6727b1b0-c4ff-4ffd-9bb1-13acd6bca757)\n",
" [OwningMembership] MultiplicityRange (3fedb3bc-2c8c-44b3-878b-216d0b3a828f)\n",
" [Subsetting (implicit)] Feature naturals (41e1cbaf-102a-403a-ae1e-36d7409b7bd0)\n",
" [OwningMembership] LiteralInteger (5b9c4855-846d-4a8d-bed9-747bb9c21477)\n",
" [ReturnParameterMembership] Feature result (e501ca4c-44f6-4f72-a577-9330a188f700)\n"
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"%show eVehicle_LogicalArchitecture"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"More convenient for the common model user, of course, is the graphical notation presented after the execution of the following cell:"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"data": {
"image/svg+xml": [
""
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"%viz --view=tree eVehicle_LogicalArchitecture"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The diagram is only a view, and not an editor. A graphical editor is not provided in the pilot implementation. Future SysML v2 modeling tools will certainly offer graphical editors."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Changes to SysML v1\n",
"\n",
"SysML v2 is a complete new language with a different foundation than SysML v1. Therefore, there are plenty of differences. Here, I highlight only the changes that are most relevant to the modeler.\n",
"\n",
"If I had modeled the eVehicle in SysML v1, I would have had to first define blocks and then part properties whose types are the blocks.\n",
"\n",
"![eVehicle in SysML v1](evehicle-logical-architecture-sysmlv1.jpg)\n",
"\n",
"Did you notice it in my simple SysML v2 example above? There are no blocks there, only parts. To put it simply, this would be like modeling part properties in SysML v1 without blocks. Basically, it works that in SysML v1 you define a part without a block. But what is not possible in SysML v1 is that the parts themselves define substructures.\n",
"\n",
"However, the parts of the eVehicle also have a type. Above in the output of the %show command you can see \"[Subsetting (implicit)] PartUsage subparts\". \"subparts\" is a special part from the SysML v2 library. This implicit connection is set in the background. By subsetting \"subparts\", the parts of the eVehicle get a generic type \"Part\" from the SysML v2 library."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Parts and PartDefinitions\n",
"\n",
"Modeling a decomposition is a typical capability that an MBSE modeling language must have. The simple example of the eVehicle uses the part decomposition.. For example, there is also the decomposition of functions.\n",
"\n",
"In SysML v2, you can define parts without types, but with substructures, for example, attributes. The following model extends the example and adds a property to the wheel to specify the size. The type of the attribute is Integer. Units are skipped for now. "
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Package eVehicle_LogicalArchitecture (0c9a6990-d41c-4a4f-bab7-95beb2561ab7)\n"
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"package eVehicle_LogicalArchitecture {\n",
" \n",
" import ScalarValues::*;\n",
" \n",
" part eVehicle { \n",
" part body;\n",
" part battery;\n",
" part engine;\n",
" part frontAxis;\n",
" part rearAxis;\n",
" part frontWheel[2] {\n",
" attribute size : Integer;\n",
" }\n",
" part rearWheel[2] {\n",
" attribute size : Integer;\n",
" }\n",
" }\n",
"}"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Run the cell with the SysML v2 model, and visualize the model. If you also would like to see the model structure, execute the %show command as described above."
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"data": {
"image/svg+xml": [
""
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"%viz --view=tree eVehicle_LogicalArchitecture"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"As in SysML v1, a part always needs a context in SysML v2. In our example, the part *eVehicle* is the context of the parts *body*, *battery*, and so forth. No context is explicitly defined for the part *eVehicle*. Then the context is implicitly the most general part definition named *Part* from the SysML v2 model library.\n",
"\n",
"Although it is still very simple, the model already smells of reuse. The size attribute is currently defined twice. Now, we define a type respectively PartDefinition *Wheel* and specify that as the type of the parts. The PartDefinition can be compared to the SysML v1 Block."
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Package eVehicle_LogicalArchitecture (36c4a853-40d1-4f34-aa2b-244ae32da21c)\n"
]
},
"execution_count": 1,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"package eVehicle_LogicalArchitecture {\n",
"\n",
" import ScalarValues::*; \n",
" \n",
" part def Wheel {\n",
" attribute size : Integer;\n",
" }\n",
" \n",
" part eVehicle { \n",
" part body;\n",
" part battery;\n",
" part engine;\n",
" part frontAxis;\n",
" part rearAxis;\n",
" part frontWheel : Wheel[2];\n",
" part rearWheel : Wheel[2];\n",
" }\n",
"}"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {},
"outputs": [
{
"data": {
"image/svg+xml": [
""
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"%viz --view=tree eVehicle_LogicalArchitecture"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The attribute *size* itself can also be defined and reused for several attribute usages. It is a common concept in SysML v2 to separate the definition of elements and the usage of elements. SysML v1 also follows this concept, but not as consequent as SysML v2. \n",
"\n",
"The attribute definition is not mandatory and only partly useful in this example, because the size is only used at one place. But I added it anyhow as an example for attribute definitions. The keyword *attribute* can be omitted as, for example, in the definition of the *size* value. The AttributeDefinition can be compared to the SysML v1 ValueType."
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Package eVehicle_LogicalArchitecture (6233a504-65da-4e54-b11e-0cc11d20d8a6)\n"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"package eVehicle_LogicalArchitecture { \n",
" \n",
" attribute def WheelSize {\n",
" import ScalarValues::*;\n",
" size : Integer;\n",
" deviation : Integer; \n",
" }\n",
" \n",
" part def Wheel {\n",
" attribute sizeOfWheel : WheelSize;\n",
" }\n",
" \n",
" part eVehicle { \n",
" part body;\n",
" part battery;\n",
" part engine;\n",
" part frontAxis;\n",
" part rearAxis;\n",
" part frontWheel : Wheel[2];\n",
" part rearWheel : Wheel[2];\n",
" }\n",
"}"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"data": {
"image/svg+xml": [
""
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"%viz --view=tree eVehicle_LogicalArchitecture"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"SysML v2 provides an extensive model library that also includes geometric figures. We can specialize the PartDefinition \"Wheel\" from a cylinder. As an example, in the following model, a radius is set. The imported SI library contains the unit \"mm\". The \":=\" symbol is an assignment for the initial value of the attribute."
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Package eVehicle_LogicalArchitecture (b55c4410-a91e-47f2-b65b-167558c46c6a)\n"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"package eVehicle_LogicalArchitecture { \n",
"\n",
" import SI::*; \n",
" \n",
" attribute def WheelSize {\n",
" size : LengthValue;\n",
" deviation : LengthValue; \n",
" }\n",
" \n",
" part def Wheel :> ShapeItems::CircularCylinder {\n",
" :>> radius = sizeOfWheel.size;\n",
" attribute sizeOfWheel : WheelSize {\n",
" :>> size := 325 [mm];\n",
" :>> deviation := 1 [mm];\n",
" }\n",
" }\n",
" \n",
" part eVehicle { \n",
" part body;\n",
" part battery;\n",
" part engine;\n",
" part frontAxis;\n",
" part rearAxis;\n",
" part frontWheel : Wheel[2];\n",
" part rearWheel : Wheel[2];\n",
" }\n",
"}"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {},
"outputs": [
{
"data": {
"image/svg+xml": [
""
]
},
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"%viz eVehicle_LogicalArchitecture"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### When to use Parts and when to use PartDefinitions\n",
"\n",
"A simple rule of thumb could be: if you use a thing only once, model it as a part. If it is used multiple times or specializations of it, then model it as a part definition.\n",
"\n",
"Part definition is a classification of things, and parts are usages of part definitions. If you have only one engine in the model, then you can model it directly as a part. As described above, the part still has a part definition, which in this case is implicitly the general part definition *Part* from the system library."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Specialization and Subsetting\n",
"\n",
"Specialization between definition elements is a subclassification relationship. For example, the FrontWheel part definition is a special kind of a Wheel part definition. Specialization between usage elements is a subsetting relationship. For example, the part frontLeftWheel is a subset of the part frontWheel.\n",
"\n"
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Package eVehicle_LogicalArchitecture (6b3577b0-b0ba-40b7-9fa2-1943f61c94bb)\n"
]
},
"execution_count": 18,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"package eVehicle_LogicalArchitecture { \n",
"\n",
" import SI::*; \n",
" \n",
" attribute def WheelSize {\n",
" size : LengthValue;\n",
" deviation : LengthValue; \n",
" }\n",
" \n",
" part def Wheel :> ShapeItems::CircularCylinder {\n",
" :>> radius = sizeOfWheel.size;\n",
" attribute sizeOfWheel : WheelSize {\n",
" :>> size := 325 [mm];\n",
" :>> deviation := 1 [mm];\n",
" }\n",
" \n",
" constraint pressureConstraint : WheelPressureConstraint {\n",
" in currentPressure = pressure;\n",
" in limitPressure = maxPressure;\n",
" }\n",
"\n",
" attribute pressure : PressureValue;\n",
" attribute maxPressure : PressureValue;\n",
" }\n",
" \n",
" part def FrontWheel :> Wheel {\n",
" attribute redefines maxPressure = 200000 [Pa];\n",
" }\n",
" part def RearWheel :> Wheel {\n",
" attribute redefines maxPressure = 200000 [Pa];\n",
" }\n",
" \n",
" constraint def WheelPressureConstraint {\n",
" in currentPressure : PressureValue;\n",
" in limitPressure : PressureValue;\n",
" currentPressure <= limitPressure\n",
" }\n",
" \n",
" part eVehicle {\n",
" part body;\n",
" part battery;\n",
" part engine;\n",
" part frontAxis;\n",
" part rearAxis;\n",
" part frontWheel : FrontWheel[2];\n",
" part frontLeftWheel :> frontWheel {\n",
" redefines pressure = 100000 [Pa];\n",
" }\n",
" part frontRightWheel :> frontWheel {\n",
" redefines pressure = 100000 [Pa];\n",
" }\n",
"\n",
" part rearWheel : RearWheel[2];\n",
" part rearLeftWheel :> rearWheel {\n",
" redefines pressure = 200000 [Pa];\n",
" }\n",
" part rearRightWheel :> rearWheel {\n",
" redefines pressure = 200000 [Pa];\n",
" }\n",
" \n",
" }\n",
"}"
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {},
"outputs": [
{
"data": {
"image/svg+xml": [
""
]
},
"execution_count": 18,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"%viz --view=tree eVehicle_LogicalArchitecture"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Putting the parts together\n",
"\n",
"By now the model only defines the breakdown structure of the vehicle. There is no definition yet of how the parts are connected. The next example model *eVehicle_LogicalArchitecture* connects the parts in a meaningful way.\n"
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Package eVehicle_LogicalArchitecture (55fb3c7e-c9dc-4a47-bf54-db82d97d023f)\n"
]
},
"execution_count": 19,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"package eVehicle_LogicalArchitecture { \n",
"\n",
" import SI::*; \n",
" \n",
" attribute def WheelSize {\n",
" size : LengthValue;\n",
" deviation : LengthValue; \n",
" }\n",
" \n",
" part def Wheel :> ShapeItems::CircularCylinder {\n",
" :>> radius = sizeOfWheel.size;\n",
" attribute sizeOfWheel : WheelSize {\n",
" :>> size := 325 [mm];\n",
" :>> deviation := 1 [mm];\n",
" }\n",
" \n",
" constraint pressureConstraint : WheelPressureConstraint {\n",
" in currentPressure = pressure;\n",
" in limitPressure = maxPressure;\n",
" }\n",
"\n",
" attribute pressure : PressureValue;\n",
" attribute maxPressure : PressureValue;\n",
" }\n",
" \n",
" part def FrontWheel :> Wheel {\n",
" attribute redefines maxPressure = 200000 [Pa];\n",
" }\n",
" part def RearWheel :> Wheel {\n",
" attribute redefines maxPressure = 200000 [Pa];\n",
" }\n",
" \n",
" constraint def WheelPressureConstraint {\n",
" in currentPressure : PressureValue;\n",
" in limitPressure : PressureValue;\n",
" currentPressure <= limitPressure\n",
" }\n",
" \n",
" part eVehicle {\n",
" part body;\n",
" part battery;\n",
" part engine;\n",
" part frontAxis;\n",
" part rearAxis;\n",
" part frontWheel : FrontWheel[2];\n",
" part frontLeftWheel :> frontWheel {\n",
" redefines pressure = 100000 [Pa];\n",
" }\n",
" part frontRightWheel :> frontWheel {\n",
" redefines pressure = 100000 [Pa];\n",
" }\n",
"\n",
" part rearWheel : RearWheel[2];\n",
" part rearLeftWheel :> rearWheel {\n",
" redefines pressure = 200000 [Pa];\n",
" }\n",
" part rearRightWheel :> rearWheel {\n",
" redefines pressure = 200000 [Pa];\n",
" }\n",
" \n",
" connect battery to engine;\n",
" connect engine to frontAxis;\n",
" connect frontAxis to frontWheel;\n",
" connect rearAxis to rearWheel;\n",
" connect body to battery;\n",
" connect body to engine;\n",
" connect body to frontAxis;\n",
" connect body to rearAxis;\n",
" }\n",
"}"
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {},
"outputs": [
{
"data": {
"image/svg+xml": [
""
]
},
"execution_count": 20,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"%viz --view=interconnection eVehicle_LogicalArchitecture::eVehicle"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Modeling interfaces\n",
"\n",
"The interaction points are defined by ports in SysML v2, similar to SysML v1. The following extended example defines the interaction points between the engine and the battery. The connection is changed to connect the ports instead of the parts."
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Package eVehicle_LogicalArchitecture (0d22c33e-d798-4490-84d8-acab23c4935d)\n"
]
},
"execution_count": 20,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"package eVehicle_LogicalArchitecture { \n",
"\n",
" import SI::*; \n",
" \n",
" attribute def WheelSize {\n",
" size : LengthValue;\n",
" deviation : LengthValue; \n",
" }\n",
" \n",
" part def Wheel :> ShapeItems::CircularCylinder {\n",
" :>> radius = sizeOfWheel.size;\n",
" attribute sizeOfWheel : WheelSize {\n",
" :>> size := 325 [mm];\n",
" :>> deviation := 1 [mm];\n",
" }\n",
" \n",
" constraint pressureConstraint : WheelPressureConstraint {\n",
" in currentPressure = pressure;\n",
" in limitPressure = maxPressure;\n",
" }\n",
"\n",
" attribute pressure : PressureValue;\n",
" attribute maxPressure : PressureValue;\n",
" }\n",
" \n",
" part def FrontWheel :> Wheel {\n",
" attribute redefines maxPressure = 200000 [Pa];\n",
" }\n",
" part def RearWheel :> Wheel {\n",
" attribute redefines maxPressure = 200000 [Pa];\n",
" }\n",
" \n",
" constraint def WheelPressureConstraint {\n",
" in currentPressure : PressureValue;\n",
" in limitPressure : PressureValue;\n",
" currentPressure <= limitPressure\n",
" }\n",
" \n",
" part eVehicle {\n",
" part body;\n",
" part battery {\n",
" port powerOut;\n",
" }\n",
" part engine {\n",
" port powerIn;\n",
" }\n",
" part frontAxis;\n",
" part rearAxis;\n",
" part frontWheel : FrontWheel[2];\n",
" part frontLeftWheel :> frontWheel {\n",
" redefines pressure = 100000 [Pa];\n",
" }\n",
" part frontRightWheel :> frontWheel {\n",
" redefines pressure = 100000 [Pa];\n",
" }\n",
"\n",
" part rearWheel : RearWheel[2];\n",
" part rearLeftWheel :> rearWheel {\n",
" redefines pressure = 200000 [Pa];\n",
" }\n",
" part rearRightWheel :> rearWheel {\n",
" redefines pressure = 200000 [Pa];\n",
" }\n",
" \n",
" connect battery.powerOut to engine.powerIn;\n",
" connect engine to frontAxis;\n",
" connect frontAxis to frontWheel;\n",
" connect rearAxis to rearWheel;\n",
" connect body to battery;\n",
" connect body to engine;\n",
" connect body to frontAxis;\n",
" connect body to rearAxis;\n",
" }\n",
"}"
]
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {},
"outputs": [
{
"data": {
"image/svg+xml": [
""
]
},
"execution_count": 21,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"%viz --view=interconnection eVehicle_LogicalArchitecture::eVehicle"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The ports *powerIn* and *powerOut* have no types respectively the SysML v2 library element *Port* as default type. The consistent usage/definition pattern applies here as well. The port is a usage. With a PortDef the interaction point can be defined. In this example it is a good candidate for a model library.\n",
"\n",
"The port only specifies the interaction point. The interface defines the connection between interaction points. The *PowerOutPort* is conjugated for the *consumerPort* port."
]
},
{
"cell_type": "code",
"execution_count": 22,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Package eVehicleLibrary (44ae31fb-d288-483f-bb18-2a3dd86449a5)\n"
]
},
"execution_count": 22,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"package eVehicleLibrary {\n",
" \n",
" import ScalarValues::Integer;\n",
" \n",
" item def ElectricEnergy;\n",
" attribute def BatteryCapacity :> ScalarValues::Integer;\n",
" attribute def Speed :> ScalarValues::Integer;\n",
" \n",
" port def PowerOutPort {\n",
" out energy : ElectricEnergy;\n",
" }\n",
" \n",
" interface def PowerInterface {\n",
" end supplierPort : PowerOutPort;\n",
" end consumerPort : ~PowerOutPort;\n",
" }\n",
"}"
]
},
{
"cell_type": "code",
"execution_count": 24,
"metadata": {},
"outputs": [
{
"data": {
"image/svg+xml": [
""
]
},
"execution_count": 24,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"%viz --view=tree eVehicleLibrary"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Next, the definitions of the port and the interface are applied to the model. **Do not forget to run the eVehicleLibrary cell above.**"
]
},
{
"cell_type": "code",
"execution_count": 32,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Package eVehicle_LogicalArchitecture (3c9f29b0-01ff-4094-bbed-f31576d33e9c)\n"
]
},
"execution_count": 32,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"package eVehicle_LogicalArchitecture { \n",
"\n",
" import SI::*; \n",
" import eVehicleLibrary::*;\n",
" \n",
" attribute def WheelSize {\n",
" size : LengthValue;\n",
" deviation : LengthValue; \n",
" }\n",
" \n",
" part def Wheel :> ShapeItems::CircularCylinder {\n",
" :>> radius = sizeOfWheel.size;\n",
" attribute sizeOfWheel : WheelSize {\n",
" :>> size := 325 [mm];\n",
" :>> deviation := 1 [mm];\n",
" }\n",
" \n",
" constraint pressureConstraint : WheelPressureConstraint {\n",
" in currentPressure = pressure;\n",
" in limitPressure = maxPressure;\n",
" }\n",
"\n",
" attribute pressure : PressureValue;\n",
" attribute maxPressure : PressureValue;\n",
" }\n",
" \n",
" part def FrontWheel :> Wheel {\n",
" attribute redefines maxPressure = 200000 [Pa];\n",
" }\n",
" part def RearWheel :> Wheel {\n",
" attribute redefines maxPressure = 200000 [Pa];\n",
" }\n",
"\n",
" constraint def WheelPressureConstraint {\n",
" in currentPressure : PressureValue;\n",
" in limitPressure : PressureValue;\n",
" currentPressure <= limitPressure\n",
" }\n",
"\n",
" part def Battery {\n",
" attribute capacity : BatteryCapacity;\n",
" port powerOut : PowerOutPort;\n",
" }\n",
"\n",
" part def Engine {\n",
" port powerIn : ~PowerOutPort;\n",
" }\n",
" \n",
" part eVehicle {\n",
" part body;\n",
" part battery : Battery;\n",
" part engine : Engine;\n",
" part frontAxis;\n",
" part rearAxis;\n",
" part frontWheel : FrontWheel[2];\n",
" part frontLeftWheel :> frontWheel {\n",
" redefines pressure = 100000 [Pa];\n",
" }\n",
" part frontRightWheel :> frontWheel {\n",
" redefines pressure = 100000 [Pa];\n",
" }\n",
"\n",
" part rearWheel : RearWheel[2];\n",
" part rearLeftWheel :> rearWheel {\n",
" redefines pressure = 200000 [Pa];\n",
" }\n",
" part rearRightWheel :> rearWheel {\n",
" redefines pressure = 200000 [Pa];\n",
" }\n",
" \n",
" interface : PowerInterface connect \n",
" supplierPort ::> battery.powerOut to \n",
" consumerPort ::> engine.powerIn;\n",
"\n",
" connect engine to frontAxis;\n",
" connect frontAxis to frontWheel;\n",
" connect rearAxis to rearWheel;\n",
" connect body to battery;\n",
" connect body to engine;\n",
" connect body to frontAxis;\n",
" connect body to rearAxis;\n",
" }\n",
"}"
]
},
{
"cell_type": "code",
"execution_count": 26,
"metadata": {},
"outputs": [
{
"data": {
"image/svg+xml": [
""
]
},
"execution_count": 26,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"%viz --view=interconnection eVehicle_LogicalArchitecture::eVehicle"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Modeling Activities"
]
},
{
"cell_type": "code",
"execution_count": 25,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Package eVehicle_Behavior (170d7c5e-e4ee-4427-8a8e-8bcbb96f9bc4)\n"
]
},
"execution_count": 25,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"package eVehicle_Behavior {\n",
" \n",
" action chargeBattery {\n",
" in item power : ElectricalEnergy;\n",
" \n",
" succession flow chargeBattery.power to charge.power;\n",
" \n",
" first start;\n",
" then action 'insert charging plug';\n",
" then action 'secure charging plug';\n",
" then action charge {\n",
" in item power : ElectricalEnergy;\n",
" }\n",
" then action 'unsecure charging plug';\n",
" then action removePlug : 'Remove charging plug';\n",
" then done;\n",
" }\n",
" action def 'Remove charging plug';\n",
" item def ElectricalEnergy;\n",
"}"
]
},
{
"cell_type": "code",
"execution_count": 28,
"metadata": {},
"outputs": [
{
"data": {
"image/svg+xml": [
""
]
},
"execution_count": 28,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"%viz eVehicle_Behavior"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Connection item flows with parameters\n",
"\n",
"Connecting an structural item flow to an input parameter of an action. For simplicity, only the relevant elements are modeled below:"
]
},
{
"cell_type": "code",
"execution_count": 26,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Package eVehicleSystem (0d21321e-efae-4bd4-8fb1-cc159d8f1e9b)\n"
]
},
"execution_count": 26,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"package eVehicleSystem {\n",
" \n",
" part eVehicle {\n",
" port powerPort : PowerInPort;\n",
" \n",
" flow of ElectricalEnergy from eVehicle.powerPort to chargeBattery.power;\n",
" \n",
" action chargeBattery {\n",
" in item power : ElectricalEnergy;\n",
" }\n",
" }\n",
" \n",
" port def PowerInPort {\n",
" in energy : ElectricalEnergy;\n",
" }\n",
" item def ElectricalEnergy;\n",
"}"
]
},
{
"cell_type": "code",
"execution_count": 30,
"metadata": {},
"outputs": [
{
"data": {
"image/svg+xml": [
""
]
},
"execution_count": 30,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"%viz --view=interconnection eVehicleSystem.eVehicle"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Modeling variants\n",
"\n",
"SysML v2 provides model elements for variants. This is a new feature compared to SysML v2. Following the typical approach of SysML, these are only generic concepts, but they form the foundation for tools to provide functions for them and for language extensions to be defined.\n",
"\n",
"Run the cells eVehicleLibrary and eVehicle_LogicalArchitecture above before continuing with the variability model."
]
},
{
"cell_type": "code",
"execution_count": 27,
"metadata": {},
"outputs": [
{
"data": {
"image/svg+xml": [
""
]
},
"execution_count": 27,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"%viz eVehicle_LogicalArchitecture"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Now, the model is prepared to add variability. We define two battery kinds with different capacities, and two engine kinds."
]
},
{
"cell_type": "code",
"execution_count": 33,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Package eVehicle_VariantModel (5b608aaf-c082-43a7-a5ad-bac67be6605d)\n"
]
},
"execution_count": 33,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"package eVehicle_VariantModel {\n",
" \n",
" import eVehicle_LogicalArchitecture::*;\n",
" \n",
" package eVehicle_Configurations {\n",
"\n",
" import eVehicle_Variations::*;\n",
" \n",
" part eVehicleStandard :> eVehicleVariations {\n",
" part redefines engine = standardEngine;\n",
" part redefines battery = batteryLow;\n",
" }\n",
" part eVehiclePremium :> eVehicleVariations {\n",
" part redefines engine = powerEngine;\n",
" part redefines battery = batteryHigh;\n",
" }\n",
" part INVALIDeVehicle :> eVehicleVariations {\n",
" part redefines engine = powerEngine;\n",
" part redefines battery = batteryLow;\n",
" }\n",
" }\n",
" \n",
" package eVehicle_Variations {\n",
" \n",
" import eVehicle_Variants::*;\n",
" \n",
" abstract part eVehicleVariations :> eVehicle {\n",
" \n",
" variation part redefines battery : Battery {\n",
" variant part batterLow;\n",
" variant part batteryHigh; \n",
" }\n",
" variation part redefines engine : Engine {\n",
" variant part standardEngine;\n",
" variant part powerEngine;\n",
" }\n",
" \n",
" abstract constraint { (battery == batteryLow & engine == standardEngine) ^ (battery == batteryHigh) }\n",
" }\n",
" } \n",
" \n",
" package eVehicle_Variants {\n",
" \n",
" part batteryLow : Battery {\n",
" attribute redefines capacity = 40;\n",
" }\n",
" part batteryHigh : Battery {\n",
" attribute redefines capacity = 40;\n",
" }\n",
" \n",
" part powerEngine : Engine;\n",
" part standardEngine : Engine;\n",
" }\n",
"}"
]
},
{
"cell_type": "code",
"execution_count": 38,
"metadata": {},
"outputs": [
{
"data": {
"image/svg+xml": [
""
]
},
"execution_count": 38,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"%viz --view=tree eVehicle_VariantModel::eVehicle_Variations::eVehicleVariations"
]
},
{
"cell_type": "code",
"execution_count": 39,
"metadata": {},
"outputs": [
{
"data": {
"image/svg+xml": [
""
]
},
"execution_count": 39,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"%viz --view=tree eVehicle_VariantModel::eVehicle_Configurations"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### Avoiding the \"variability model explosion\"\n",
"\n",
"When modeling variability with SysML v1, the model can easily explode, i.e., a small variability can lead to the need to model many model elements. I change a bit the structure of the vehicle, for example, I define the wheels as parts of the axis. I also remove the part definition Wheel and define a some lug bolts of the wheels. Finally, we have a deep nested structure: eVehicle owns axis owns wheel owns lug bolt."
]
},
{
"cell_type": "code",
"execution_count": 34,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Package eVehicle_LogicalArchitecture_ExplosionExample (d3369a46-d2c5-45bb-8c3c-1deacb1829ca)\n"
]
},
"execution_count": 34,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
" package eVehicle_LogicalArchitecture_ExplosionExample {\n",
" \n",
" part eVehicle { \n",
" part engine;\n",
"\n",
" part frontAxis {\n",
" part frontWheel[2] {\n",
" part lugBolt[6];\n",
" part boltCircle;\n",
" connect boltCircle to lugBolt;\n",
" }\n",
" part housing; \n",
" connect housing to frontWheel;\n",
" }\n",
" \n",
" part rearAxis {\n",
" part rearWheel[2] {\n",
" part lugBolt[6];\n",
" part boltCircle;\n",
" connect boltCircle to lugBolt;\n",
" }\n",
" part housing; \n",
" connect housing to rearWheel;\n",
" } \n",
" connect engine to frontAxis;\n",
" }\n",
"}"
]
},
{
"cell_type": "code",
"execution_count": 46,
"metadata": {},
"outputs": [
{
"data": {
"image/svg+xml": [
""
]
},
"execution_count": 46,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"%viz --view=interconnection eVehicle_LogicalArchitecture_ExplosionExample"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The structure *eVehicle/axis/wheel/lugBolt* can easily be modeled with SysML v1. It is slightly different in that in SysML v1 we have to use types, i.e. blocks, and cannot model parts directly.\n",
"\n",
"![SysML v1 eVehicle Model](sysmlv1-variability-example-core.jpg)\n",
"\n",
"Now, if we introduce variants of lug bolts, this variance ripples up through the entire structure:\n",
"\n",
"![SysML v1 eVehicle Model - Variability explosion](sysmlv1-variability-example-explosion.jpg)\n",
"\n",
"In SysML v2 it looks like this:"
]
},
{
"cell_type": "code",
"execution_count": 47,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Package eVehicleVariants_ExplosionExample (8e20ff47-3f5a-4d26-81dc-fdcb97fbc015)\n",
"Package eVehicle_LogicalArchitecture_ExplosionExample (978bafa2-516e-4828-9a8a-4cc93af34fd7)\n"
]
},
"execution_count": 47,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"package eVehicleVariants_ExplosionExample {\n",
" part lugBolt42;\n",
" part lugBolt23;\n",
"}\n",
"\n",
"package eVehicle_LogicalArchitecture_ExplosionExample {\n",
" \n",
" import eVehicleVariants_ExplosionExample::*;\n",
" \n",
" part eVehicle { \n",
" part engine;\n",
"\n",
" part frontAxis {\n",
" part frontWheel[2] {\n",
" /*-----------------------------\n",
" * Definition of the variation\n",
" * ----------------------------*/\n",
" variation part lugBolt[6] {\n",
" variant part lugBolt23;\n",
" variant part lugBolt42; \n",
" }\n",
" part boltCircle;\n",
" connect boltCircle to lugBolt;\n",
" }\n",
" part housing; \n",
" connect housing to frontWheel;\n",
" }\n",
" \n",
" part rearAxis {\n",
" part rearWheel[2] {\n",
" part lugBolt[6];\n",
" part boltCircle;\n",
" connect boltCircle to lugBolt;\n",
" }\n",
" part housing; \n",
" connect housing to rearWheel;\n",
" } \n",
" connect engine to frontAxis;\n",
" }\n",
"}"
]
},
{
"cell_type": "code",
"execution_count": 48,
"metadata": {},
"outputs": [
{
"data": {
"image/svg+xml": [
""
]
},
"execution_count": 48,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"%viz --view=tree eVehicle_LogicalArchitecture_ExplosionExample"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"A concrete variant configuration of the eVehicle with lug bolts *42* can be simply created by specialization:"
]
},
{
"cell_type": "code",
"execution_count": 49,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Package eVehicle_Edition42 (f81a8e27-81a9-4caf-9e4e-3aefdf6fb396)\n"
]
},
"execution_count": 49,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"package eVehicle_Edition42 {\n",
" \n",
" import eVehicle_LogicalArchitecture_ExplosionExample::*;\n",
" \n",
" part eVehicle42 :> eVehicle {\n",
" part redefines lugBolt42 = frontAxis.frontWheel.lugBolt;\n",
" }\n",
"}\n",
" "
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Modeling requirements\n",
"\n",
"A requirement definition is a special kind of a constraint definition including parameters and required constraints. **Do not forget to run the eVehicleLibrary cell above.**"
]
},
{
"cell_type": "code",
"execution_count": 59,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Package eVehicleRequirementDefinitions (1a38f855-fb95-486e-bf25-affc959e7b51)\n"
]
},
"execution_count": 59,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"package eVehicleRequirementDefinitions {\n",
" \n",
" import eVehicleLibrary::*;\n",
" \n",
" requirement def BatteryCapacityReqDef {\n",
" doc /* The actual battery capacity shall be greater than or equal\n",
" * to the required capacity. */\n",
" \n",
" attribute capacityActual : BatteryCapacity;\n",
" attribute capacityRequired : BatteryCapacity;\n",
" \n",
" require constraint{ capacityActual <= capacityRequired }\n",
" }\n",
" \n",
" requirement def MaxSpeedReqDef {\n",
" doc /* The maximum speed of the vehicle shall be \n",
" * not greater than the required maximum speed. */\n",
" \n",
" attribute maxSpeedVehicle : Speed;\n",
" attribute maxSpeedRequired : Speed;\n",
" \n",
" require constraint{ maxSpeedVehicle <= maxSpeedRequired }\n",
" }\n",
" \n",
"}"
]
},
{
"cell_type": "code",
"execution_count": 52,
"metadata": {},
"outputs": [
{
"data": {
"image/svg+xml": [
""
]
},
"execution_count": 52,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"%viz eVehicleRequirementDefinitions"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The definition of a requirement provides a reusable structure. Next, the requirement definition *BatteryCapacityRequirementDef* is used to specify a concrete requirement for the *eVehicle*. The requirement *REQ.B.1* redefines the requirement attribute *capacityRequired* with a concrete value.\n",
"\n",
"It is possible to define requirement groups to manage a large set of requirements by defining that a requirement requires other requirements. **Do not forget to run the eVehicleRequirementDefinitions and eVehicle_LogicalArchitecture cells above.**"
]
},
{
"cell_type": "code",
"execution_count": 62,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Package eVehicleRequirements (11c0991f-9cf7-4001-b0aa-510962adcd30)\n"
]
},
"execution_count": 62,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"package eVehicleRequirements {\n",
" \n",
" import eVehicleRequirementDefinitions::*;\n",
" import eVehicle_LogicalArchitecture::*;\n",
" \n",
" requirement eVehicleSpecification {\n",
" doc /* Requirement Specification of the eVehicle */\n",
"\n",
" require eVehicleBatteryCapacity;\n",
" require eVehicleMaxSpeed;\n",
" }\n",
" \n",
" requirement <'REQ.B.1'> eVehicleBatteryCapacity : BatteryCapacityReqDef {\n",
" attribute :>> capacityRequired = 50;\n",
" attribute :>> capacityActual = eVehicle.battery.capacity;\n",
" }\n",
" \n",
" requirement <'REQ.V.1'> eVehicleMaxSpeed : MaxSpeedReqDef {\n",
" attribute :>> maxSpeedRequired = 140;\n",
" attribute :>> maxSpeedVehicle = eVehicle.maxSpeed;\n",
" }\n",
"}"
]
},
{
"cell_type": "code",
"execution_count": 63,
"metadata": {},
"outputs": [
{
"data": {
"image/svg+xml": [
""
]
},
"execution_count": 63,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"%viz eVehicleRequirements"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Finally, we model that the eVehicle satisfies the requirement."
]
},
{
"cell_type": "code",
"execution_count": 65,
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"Package eVehicle_LogicalArchitecture (e28fcc81-b766-45bc-a808-3e37b5e1eb2b)\n"
]
},
"execution_count": 65,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"package eVehicle_LogicalArchitecture {\n",
" \n",
" import eVehicleLibrary::*;\n",
" import eVehicleRequirements::*;\n",
" import eVehicle_LogicalArchitecture::*;\n",
" \n",
" satisfy eVehicleSpecification by eVehicle;\n",
"}"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "SysML",
"language": "sysml",
"name": "sysml"
},
"language_info": {
"codemirror_mode": "sysml",
"file_extension": ".sysml",
"mimetype": "text/x-sysml",
"name": "SysML",
"pygments_lexer": "java",
"version": "1.0.0"
}
},
"nbformat": 4,
"nbformat_minor": 4
}