In this tutorial you will learn how to:
Before we begin, you need to know the one thing that might save you the most time when modelling with MagicDraw UML and MD SysML.
You can drag n' drop any diagram icon from the browser onto any element's symbol
in an active diagram to hyperlink that element to the "dragged" diagram ! Simply super !
For practical systems engineering this means you can link elements to "focus diagrams" and "open up" elements at will. I recommend that you:
It takes seconds. And it may save you days or weeks or months !
<<terminology>>A SysML Internal Block Diagram (IBD) shows the part Properties (and shared and direct reference Properties) of a structured Block, and Connections between them and/or their Ports. It can also show Ports of the structured Block on the boundary frame (Ports are not handled in this trail). An IBD for Blocks in SysML is like a UML2 Composite Structure Diagram for Classes. A SysML <<Block>> is a stereotyped UML2 Class, which is a StructuredClassifier.
In MD SysML an assembly is known as a structured Block, and it has a special creation menu, which automatically assigns an IBD as the default hyperlink target for the block's symbol, so that whenever the block's symbol appears in a diagram you can "open it up" into its IBD. Very useful !
Physical quantities of real-world systems are described using scientific systems of units and dimensions. SysML1.0 extends the UML Property system to include physical values of quantities measured or stated relative to a chosen Unit, as well as industrial quantities. You can define custom ValueTypes (which may be used to type value properties in SysML).
There are two main uses of ValueTypes (which are illustrated in the following pages of this trail):
You may also define custom "industrial" Units and Dimensions for use by a custom ValueType.
You may use a ValueType to indicate and assign a specific Unit (with a Dimension) to a ValueProperty, which represents a named quantity. The value of the quantity is then stated (or measured) relative to that Unit (see the example default value statements). The ValueType is usually named after the symbol of it's fixed Unit.
You may use a ValueType to define a "kind of quantity" that is not bound to a specific block. In the example below, the ClockFrequency ValueType is defined for an entire system. It may then be used to type a specific ValueProperty representing a specific quantity in a block, such as the frequency of a Processor. In this case, the ValueType is named to indicate the kind of quantity (rather than the symbol of the chosen Unit ). The same principle can be used to name a ValueType after its Dimension.
|
|
WARNING: Changes to the chosen Unit will propagate throughout the system, |
After completing this trail you may also like to examine:
I have found the following strategy extremely useful for managing models of real systems. Use a dedicated <<BlockPackage>> (or similarly one can use a <<BlockModel>>) to contain:
A systems engineering block may correspond to a very heavy, expensive, and very real thing. So it often deserves a dedicated <<BlockPackage>>.
Also - since a <<Block>> Class can't own an InstanceSpecification - a <<BlockPackage>> or <<BlockModel>> can be used to group the InstanceSpecifications used in MD SysML to initialise the part Properties managed by a structured <<Block>> Class. (Alternatively, the InstanceSpecifications can be contained in a custom stereotyped sub-package.)
When developing software simulations of MD SysML systems it makes good sense to perform systems engineering with SysML Blocks in dedicated <<BlockModel>>s and software engineering with Classes and Interfaces in matching <<BlockPackage>>s, as illustrated below. This works well under both forward- and reverse-engineering.
The <<BlockModel>> and <<BlockPackage>> strategies can be combined to support software simulation of syseng blocks.
Motto: a system with no values has no value !
We will consider the progressive re-use and re-configuration (or initialisation) of values of blocks used as part properties in various types of vehicles, including inherited configurations. By progressive I mean "one context at a time", as opposed to deep re-configuration of all values of an entire system (which is the subject of another advanced trail).
We will distinguish between the following types of configuration values:
Let us now work through these cases to see how they are assigned and managed in MD SysML
The static (or "Class-level") default values correspond to the values one would get using a noargs constructor. They are managed by the Block that owns the ValueProperty. If not overridden on instantiation of the Block as a part Property when used in a higher context these become the initial
values for the part.
Consider the capacity value in the BDD for the FuelTank block below. The designer of the FuelTank does not know what kind of vehicle (or even another type of Fueled Machine) it might be used in, and assigns a rather generic default value to the capacity of 40.0 L. This may or may not suit designers of specific vehicles.
Property-specific initial values (a.k.a. Property-specific default values(*)) are specific to the usage of a Block as a part Property in a higher context (by a structured block or "assembly"), and if there are many part Properties of the same type, they may have different property-specific default values (i.e. they will be initialised differently). They are managed by the higher context structured block that owns the part Properties, which initialises or configures their (possibly different) values on instantiation. In our example an abstract Vehicle block will configure its tank:FuelTank part Property by initialising it with a new capacity value.
The property-specific initial values of a part Property are carried by the Slots of an InstanceSpecification of the same type. In the example below have stereotyped the InstanceSpecification tank:FuelTank with «initial values», however this is only for illustration. If you have many parts to configure you may also like to group them in a dedicated Model (I have used a Model named parts below, with a custom stereotype «initialisation»).
Next we will see how to assign these property-specific initial values carries by the Slots of the tank:FuelTank InstanceSpecification to override the static (class-level) default for the capacity ValueProperty in the part tank:FuelTank in the Internal Block Diagram (IBD) for Vehicle.
The Property-specific initial values (a.k.a. the Property-specific defaultValue vector) of a part Property can be assigned in MD SysML using Drag n' Drop of an InstanceSpecification (of the same type as the part Property) from the browser onto the part Property in an Internal Block Diagram (IBD), as illustrated below. (You don't have to have the InstanceSpecification on the IBD, nor
show the illustrative <<initialises>> Dependency.)
On instantiation a (concrete subclass of a) Vehicle will (by default) now initialise the capacity value of the tank:FuelTank to 46.0 L, overriding the static ("class-level") primitive default value of 40.0L that was defined in FuelTank. Note that it is the context block Vehicle - the owner of the part Property tank:FuelTank - which "manages" all of the property-specific initial values and the initialisation of each part Property.
The designer of the abstract Vehicle block, has assumed that this property-specific initial value of the capacity value will suit a wide range of vehicles, so we will next see how this value is inherited in a generic Car.
A concrete Car (with 4 wheels) that simply extends the abstract Vehicle will inherit the property-specific initial values of a Vehicle, i.e. when a :Car is instantiated it will initialise its tank:FuelTank Property to the same new capacity value (again overriding the static default value from FuelTank).
The capacity of the inherited property tank:FuelTank will be initialised to the same property-specific initial value 46.0L managed by Vehicle.
Next we'll see how to re-configure the capacity value of the tank:FuelTank Property in a new special context, a TouringCar.
Consider now a TouringCar that extends Car to add a RoofRack and to specify a larger tank:FuelTank (presumably for long trips). When a :TouringCar is instantiated it must now re-initialise its inherited tank:FuelTank with a larger capacity value (overriding the property-specific initial value of tank:FuelTank within Vehicle, which is inherited via Car). In order to this it must redefine the inherited tank:FuelTank Property of Vehicle.
The TouringCar will also override the static (class-level) default values for the length and width values of the RoofRack, by initialising its rack:RoofRack part with property-specific initial values.
Here we see the Internal Block Diagram (IBD) for the special TouringCar. The part Property tank:FuelTank has be re-initialised to configure it with a tank of larger capacity.
The use of an «InitialValues» stereotype as illustrated in this trail is completely optional. It is there to support education and illustration, and to indicate that a given InstanceSpecification is "reserved" for use as a Property.defaultValue of a Property of the same or compatible Type.
Users can choose to assign an «InitialValues» stereotype to an InstanceSpecification using the standard stereotype assignment mechanisms.
The Block of a Property that the «InitialValues» InstanceSpecification initialises will know the «InitialValues» InstanceSpecification simply as the Property.defaultValue of the owned Property (which can be achieved in MD SysML by dragging the InstanceSpecification onto the Property in an IBD, or via the Property specification box default value field).
It does not matter at all:
(*) It has been suggested that the SysML1.0 defaultValue compartment on a part in an IBD should be renamed initial values
This IBD shows how the same InstanceSpecification (optionally stereotyped as <<InitialValues>>) can be assigned to the Property.defaultValue of more than one Property, and to properties from different blocks.
We can handle a wide range of systems engineerings configuration tasks by progressively applying the following:
However, none of these approaches can handle deep re-configuration of complex assemblies, an advanced topic which is the subject of this mini-trail.
Consider the case of a Truck reusing a complex (yet naive) WheelHubAssembly for 3 pairs of Wheels, each with different characteristics. Although the basic WheelHubAssembly might have been suitable for a range of Vehicles (like a Car, a TouringCar, and a MiniVan), it is not nearly suitable for a large Truck.
Many parts and subparts of the WheelHubAssembly required for a Truck will be larger and will need to be stronger to handle heavy loads:
The progressive configuration strategies fail here because the new configuration requirements "cascade" throughout the entire complex WheelHubAssembly, from the outermost context to the deepest part. We could just start with a completely new TruckWheelHubAssembly that configures a completely new TruckWheelAssembly, etc. right down to a TruckLugBoltJoint, however that gives us no reuse at all, not even of the existing block structures.
Instead we could use the SysML PropertySpecificType strategy, a set of "on-the-fly" extensions (subtypes) of each Block used in a complex assembly hierarchy, to afford a point of redefinition of the part Properties and their value Properties as required. It will be demonstrated that this strategy, while offering the widest range of deep redefinition possibilities - including redefinition of operations and constraints - is mostly inefficient and cumbersome for the purposes of merely assigning values deeply to a system used in a given context. In this trail we will learn what a PropertySpecificType is and investigate some of its pros and cons.
Let us consider first the Block Definition Diagram (BDD) of an entire WheelHubAssembly to be re-used with deep reconfiguration in a Truck (overriding many of the static (class-level) default values). We also want to be able to simply display the "value state" of all elements of a used :WheelHubAssembly as the system that uses it evolves.
As always, I recommend (in MagicDraw UML) the use of «composition» wrapper Components to logically and graphically organise the elements.
Let us start by redefining default values using a PropertySpecificType [LugBoltThreadedHole] for a lowest-level block. A higher level PropertySpecificType will then compose a part apparently "typed" by [LugBoltThreadedHole] instead of the base LugBoltThreadedHole (see next pages). In fact one is not supposed to show a a named PropertySpecificType in a Block Definition Diagram (BDD) in this way:
SysML1.0: 8.3.2.8 PropertySpecificType:
Constraint [2] The name of a classifier to which a PropertySpecificType is applied must be missing. (The “name” attribute of the NamedElement metaclass must be empty.)
SysML1.0: 8.3.1.2 Internal Block Diagram:
Property-specific type
Enclosing the type name of an internal property in square brackets specifies that the type is a local specialization of the referenced type, which may be overridden to specify additional values or other customizations that are unique to the property. Redefined or added features of the newly defined type may be shown in compartments for the property.
However for illustration, and for easy illustration in IBDs, we nevertheless use an explicit subtype [LugBoltThreadedHole].
The values are for illustration only (the author is no automotive engineer nor car freak).
The part of a PropertySpecificType is redefined to use a PropertySpecificType specialisation of the composed part of its own Generalization parent, the "cascading" effect.
From the perspective of the parent PropertySpecificType it now has a PropertySpecific instance as a part.
It will take the static (class-level) default values for the values of the part, since no property-specific default values were assigned.
Here we see one level higher up.
Problem: the "cascading" PropertySpecificTypes quickly become unwieldy to manage both graphically (in diagrams) and in the model ! Clearly a very high degree of automation would be required to make this practical for real-world systems engineering.
PROBLEM: connections must be repeated in a new IBD for the PropertySpecificType, and can't be easily typed with existing Associations between the non-PropertySpecificTypes (the true parent blocks of the system).
It has been shown that the SysML PropertySpecificType strategy suffers from many disadvantages. While it admittedly does offer the greatest possibility of redefinition of default values, operations, and constraints, it is fundamentally subject to inefficiency both in modelling and diagramming, primarily because of the "cascading" effect of the implied subtypes of an existing complex assembly. It also presents problems for reuse of existing typed connections between parts.
If we are just interested in deep re-configuration of a complex assembly, or in statement of its evolving "value state", an alternative offers itself. We may use a ValueSlice strategy, which manages a list of InstanceSpecifications, the Slots of which can be mapped efficiently to a values compartment of parts in an IBD for a specific "value slice" usage context of a complex system. The MD SysML team is now working towards practical deep value assignment suited to real-world systems engineering leveraging this technique.