ENES 489P Hands-On Systems Engineering Projects
Introduction to UML and SysML
Mark Austin
E-mail: austin@isr.umd.edu
Institute for Systems Research, University of Maryland, College Park
– p. 1/75
Introduction to UML and SysML Mark Austin E-mail: - - PowerPoint PPT Presentation
ENES 489P Hands-On Systems Engineering Projects Introduction to UML and SysML Mark Austin E-mail: austin@isr.umd.edu Institute for Systems Research, University of Maryland, College Park p. 1/75 Systems Engineering with UML and SysML
E-mail: austin@isr.umd.edu
– p. 1/75
– p. 2/75
ambiguous. WORKING WITH UML / SysML TRADITIONAL MODEL −− Textual requirements can be
– p. 3/75
System Complexity Time
Validation Productivity Design Productivity Gaps in Capability Upper limit for complexity
– p. 4/75
– p. 5/75
– p. 6/75
– p. 7/75
– p. 8/75
– p. 9/75
Structure Behavior UML Diagrams Structure Activity Use Case Interaction Statechart Communication Timing Interaction Overview Sequence Class Component Deployment Package Object Composite
– p. 10/75
====================================================================================== Structure Diagrams Behavior Diagrams Block Diagram Activity Diagram Block Definition Diagram (extends UML Activity Diagram) (extends UML Class Diagram) Use Case Diagram Internal Block Diagram State Machine Diagram (extends UML Composite Sequence Diagram Structure Diagram) Parametric Constraint Diagram Cross-Cutting Diagrams Parametric Definition Diagram Allocation Diagram Parametric Use Diagram Package Diagram (extends UML Package Diagram) Requirement Diagram ======================================================================================
– p. 11/75
Parametric Behavior Structure SysML Diagrams Requirement Sequence Activity Use Case State Machine Block definition Internal block Package
– p. 12/75
Pillars of SysML
– p. 13/75
– p. 14/75
– p. 15/75
purpose << block >> constraints
parts references values purpose executesOn Software Block Hardware Block << block >> constraints
parts references values
– p. 16/75
– p. 17/75
pkg: SampleModel
System Design Logical Design Physical Design Verification EngineeringAnalysisViewpoint << views >> EngineeringAnalysis << conforms >> << imports >> << imports >> << imports >> << imports >>
– p. 18/75
– p. 19/75
– p. 20/75
High−Level Requirements. Activity Diagrams Sequences of tasks between ohjects. Sequence of messages
Models of System Behavior and System Structure.
Req 1. Req 2. −− scenario 3 Use Case 2 −− scenario 2 −− scenario 1 Use Case 1 Use Case Diagram Sequence Diagrams Individual Use Cases and Scenarios −− scenario 4 – p. 21/75
– p. 22/75
– p. 23/75
– p. 24/75
– p. 25/75
Comparison of desired and modeled behavior Behavior (desired) Domain Model Dictionary Class Diagram Behavior (as modeled) Executable Model State Diagram Sequence Diagram Sequence Diagram
– p. 26/75
– p. 27/75
: Class Name Object Name Object Name : Class Name
– p. 28/75
.......................... <<provides>> <<uses>> Outgoing Protocol Incoming Protocol <<interface>> <<interface>> ..........................
– p. 29/75
Part Glossary Provided Interface :Object2 :Object1 Connectors Port Required Interface
– p. 30/75
1 PowerTrain Steering FuelSystem ElectricSystem Vehicle Structure Automobile 1 1 1 1
– p. 31/75
Automobile :PowerTrain :Steering :FuelSystem :ElectricSystem class: Automobile
(a) White−box view of the Automobile class. (b) Black−box view of the Automobile class.
– p. 32/75
Activity Name State Name
– p. 33/75
Activity node Start Activity 1 State 1 Activity 2 Transition between activities. Start state. Stop state. Activity node State node
– p. 34/75
Activity 3 [ Condition that causes this branch ] [ Condition that causes this branch ]
Branch Condition
Activity 1 Activity 2
Activity 1
Branch Condition
[ Condition that causes this iteration block ] Activity 2
– p. 35/75
Fork in the flow of events. Concurrent activities in the flow of events. Activity 2 Activity 3 Activity 1 Activity 4 Join in the flow of events.
– p. 36/75
System A
Activity 6 Activity 5 Activity 1 Activity 2 Activity 4 Activity 3
System B System C
– p. 37/75
Activity 1 Start Use condition precondition (i.e., start state) Use case activity
[ False ]
[ True ] Activity 2
– p. 38/75
– p. 39/75
– p. 40/75
message :Object name :Object name :Object name message [ reccurrence condition ]
– p. 41/75
[ while not end−of−file (EOF) ] :PrintSpooler :Printer :PrintFile spoolfile = open (name) block = readBlock() print (block) close () result = delete (name) Open file and assign reference to spoolfile. Spooler reads blocks from file sends them to the printer. This continues is reached. until and end−of−file Close file and release resources associated with the file.
– p. 42/75
– p. 43/75
State 1 State 2 State 3 State 4 State 5 STATES
– p. 44/75
– p. 45/75
– p. 46/75
Planned
Normal Operations Contingency Operations Initialize Off
Failure Resolved Power "On" Emergency shutdown "On" status Another failure shutdown
– p. 47/75
Proposal work complete. Signed Proposal Draft Submitted Ideas no good...... Unfinished ...... Rejected Approved Finished Ideas are good ..... Start working on proposal...
– p. 48/75
action-label / action
event-name ( parameters ) [ guard-condition ] / action
– p. 49/75
payment (value) [ value = −balance ] Zero balance Debit Close account Open charge (value) [ value = balance ] payment (value) charge (value) Credit charge (value) [ value > balance ] payment (value) [ value > −balance ]
– p. 50/75
– p. 51/75
Lights Engaged Second Neutral Heat Off On On Off First [ speed > threshhold ] Switch On Switch On Switch Off Switch Off Clutch Engaged Clutch Dis−engaged Transmission – p. 52/75
communication. FSM FSM communication.
– p. 53/75
– p. 54/75
– p. 55/75
Clutch Engaged Transmission Neutral Engaged First Second Clutch Dis−engaged
Statechart Representation
First Second Neutral [ speed > threshhold ] Clutch Dis−engaged Engaged Clutch
Basic FSM Model
– p. 56/75
– p. 57/75
Clutch Engaged Neutral Engaged Clutch Dis−engaged Transmission
Statechart Representation
– p. 58/75
Three orthogonal regions
Lights Heat Automobile Transmission
– p. 59/75
Heat Engaged Second Neutral Off On On Off First [ speed > threshhold ] Switch On Switch On Switch Off Switch Off Clutch Engaged Clutch Dis−engaged Transmission Automobile Lights
– p. 60/75
Doorman Entry Exit museum. Line of people outside Floorplan of museum Doorman
– p. 61/75
– p. 62/75
Visit Waits Sees Clear people Control Regulations Empty Full Close / Open Guidance from Regulations DOORMEN MUSEUM VISITORS Regulates
– p. 63/75
– p. 64/75
– p. 65/75
– p. 66/75
< 1,000 people? Visitor can see museum ... Doorman allows a visitor to enter Visitor waits in queue... Vistor sees museum Visitor leaves museum Doorman doesn’t allow a visitor Is it 4.55 pm? museum.... Visitor arrives at No Yes No Yes Is occupancy of museum
– p. 67/75
4.55 pm Museum is Closed Museum is Open 10 am n < 1,000 Museum is Full.... Museum is about to close ... n = 1,000 n < 1,000 4.55 pm 5 pm
– p. 68/75
Detailed Model ..... Museum Operations Museum Operations Closed Open Closed 5 pm 10 am Open Normal Full n = 1000 n < 1,000 About to close 4.55 pm 4.55 pm 10 am 5 pm High−Level Model
– p. 69/75
S & E Traffic light control box EAST − WEST S & W N & W NORTH − SOUTH Signal 4 N & E Signal 1 Signal 2 Signal 3
– p. 70/75
Phase A N S W E Phase B
Signal 1 S = Signal 4 N Signal 1 E = Signal 2 W Signal 2 S = Signal 3 N Signal 4 E = Signal 3 E
– p. 71/75
Signal/Direction North South East West ============================================================ Signal 1 :
Red
Signal 3 : Green, Yellow
Signal 4 : Green, Yellow
Signal/Direction North South East West ============================================================ Signal 1 :
Green, Yellow
Signal 3 : Red
Signal 4 : Red
– p. 72/75
State 4 Signal 1 E = green Signal 1 S = red Signal 4 E = green Signal 4 N = red Signal 2 W = green Signal 2 S = red Signal 3 W = green Signal 3 N = red Signal 1 E = yellow Signal 2 W = yellow Signal 3 W = yellow Signal 4 E = yellow Signal 1 E = red Signal 2 W = red Signal 3 W = red Signal 4 E = red Signal 1 E = red Signal 2 W = red Signal 3 W = red Signal 4 E = red Signal 1 S = red Signal 2 S = red Signal 3 N = red Signal 4 N = red Signal 1 S = green Signal 1 S = yellow Signal 2 S = green Signal 2 S = yellow Signal 4 N = green Signal 4 N = yellow Signal 3 N = yellow Signal 3 N = green State 1 State 2 State 3
– p. 73/75
Switch to Normal All Red Phase A Phase B Operational Fault
– p. 74/75
– p. 75/75