===== Value Type ===== - In Unit instance it is not possible to reference an already existing quantityKind - How to define literals for enumeration. Presently have used Attributes but not sure how to use it Value Types, sometimes referred to as Data Types comes in three different flavors: - Primitive (e.g. Real, String, Boolean) - Enumeration (e.g. days of week) - Structured (e.g. vectors) We will first address Primitive types ==== Primitive Types ==== There already exist Primitive Types (e.g. Real, Number, String). To create a custom Value Type typing a property of a block do the following: Insert Quantity. In Element Properties -> Run States enter relevant information {{ :bok:eng:mbse:sysml:bbd-ibd:valuetype2.png?300 |}} Insert Unit. In Element Properties -> Run States enter relevant information. In quantityKind field enter the name of the created Quantity Kind. {{ :bok:eng:mbse:sysml:bbd-ibd:valuetype3.png?300 |}} Insert Value Type. In Element Properties -> SysML 1.5 reference the created Quantity Kind and Unit. {{ :bok:eng:mbse:sysml:bbd-ibd:valuetype4.png?300 |}} Insert Block. Drag Property to under the created Block. Select Property and then Element Properties -> Property -> Type. Select the Value Type you just created. {{ :bok:eng:mbse:sysml:bbd-ibd:valuetype5.png?300 |}} How to define a probability distribution for the property? ==== Enumeration ==== Is Attribute the right feature for Enumeration? How to use it? Insert Enumeration to bdd canvas. Right Click -> Features -> Attributes. Add new attributes until list is complete. {{ :bok:eng:mbse:sysml:bbd-ibd:valuetype7.png?500 |}} {{ :bok:eng:mbse:sysml:bbd-ibd:valuetype6.png?500 |}} Insert Block. Drag Property to under the created Block. Select Property and then Element Properties -> Property -> Type. Select the Enumeration you just created. {{ :bok:eng:mbse:sysml:bbd-ibd:valuetype8.png?500 |}} ==== Structured ==== Structured Value Types are a composite of simple Value Types and therefore you need to have tha simple types already defined. Add a new Value Type and add two Property under the Value Type. In each Property go Element Properties -> Property -> Type. Select the simple Value Type that you created earlier. {{ :bok:eng:mbse:sysml:bbd-ibd:valuetype9.png?500 |}} Insert Block. Drag Property to under the created Block. Select Property and then Element Properties -> Property -> Type. Select the structured Value Type you just created. {{ :bok:eng:mbse:sysml:bbd-ibd:valuetype10.png?500 |}} How to define initial values for structured value types?