Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


Share this Page URL
Help

Chapter 6 - Organizing the Model with Pa... > 6.2 The Package Diagram - Pg. 104

104 CHAPTER 6 Organizing the Model with Packages Because reuse is so important in modeling, SysML includes the concept of a model library, which is specifically intended to contain model elements that can be shared within and between models. Model libraries are more fully described in Chapter 15. Views and viewpoints can be used to visualize models according to multiple organizing principles. A view is a kind of package used to show a particular perspective on the model, such as performance or security. A viewpoint represents a particular stakeholder perspective that specifies the contents of a view. A view conforms to a viewpoint. 6.2 THE PACKAGE DIAGRAM The model elements contained within a package can be shown on a package diagram. The complete diagram header for a package diagram is as follows: pkg [model element type] package name [diagram name] The diagram kind is pkg, and the model element type can be model, package, model library, or view. An example of a package diagram is shown in Figure 6.1. It shows several levels of the package hierarchy for the Products package of the ACME Surveillance Systems Inc. model. The notation tables for package diagrams are included in Table A.1 in the Appendix. pkg [Package] Products [Nested Packages] Surveillance Systems Cameras Use Cases Requirements Physical Logical Behavior Parametrics Structure FIGURE 6.1 An example package diagram. 6.3 DEFINING PACKAGES USING A PACKAGE DIAGRAM SysML models are organized into a hierarchical tree of packages that are much like folders in a Windows directory structure. Packages are used to partition elements of the model into coherent units that can be subject to access control, model navigation, configuration management, and other considerations. The most significant kinds of packages used to organize models in SysML are models, packages, model libraries, and views.