/
Graphical Systems Modeling Graphical Systems Modeling

Graphical Systems Modeling - PowerPoint Presentation

natalia-silvester
natalia-silvester . @natalia-silvester
Follow
383 views
Uploaded On 2017-09-03

Graphical Systems Modeling - PPT Presentation

with UML SysML State machine diagrams Piotr Ciskowski State machine diagrams lecture plan Overview GO Sections GO States GO History GO Pseudostates GO Transitions ID: 584853

states state diagram machine state states machine diagram version trial unregistered examples transitions uml diagrams events pseudostates composite www

Share:

Link:

Embed:

Download Presentation from below link

Download Presentation The PPT/PDF document "Graphical Systems Modeling" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

Slide1

Graphical Systems Modelingwith UML / SysMLState machine diagrams

© Piotr CiskowskiSlide2

State machine diagrams – lecture plan:Overview GO

Sections

GO

States

GO

History

GO

Pseudostates

GO

Transitions

GO

Summary

GO

Examples

GOSlide3

behavior

sequence diagram

activity diagram

state machine diagram

interaction overview diagramcommunication diagramtiming diagrampackage diagram

Perspectives - views:

Use case view

Logical view

architectureclass diagramobject diagramcomposite structure diagrampackage diagram

Dynamic View

Implementation View

Deployment View

system scope

& functionality

use case diagrampackage diagram

software

component diagram

package diagram

hardwaredeployment diagrampackage diagramSlide4

State machine diagramstate - a situation during which some condition holds

- static or dynamicSlide5

State machine diagramstate - a situation during which some condition holds - static or dynamic

state machine

- behavior of a single object

- sequence of states it goes through - in reaction to eventsSlide6

State machine diagramstate - a situation during which some condition holds - static or dynamic

state machine

- behavior of a single object

- sequence of states it goes through - in reaction to events

state machine diagram - graphical representation of states and transitions - directed graphSlide7

State machine diagramstate - a situation during which some condition holds - static or dynamic

state machine

- behavior of a single object

- sequence of states it goes through - in reaction to events

state machine diagram - graphical representation of states and transitions - directed graphstatestransitionseventsactionsguard conditionsSlide8

State machine diagramstate - a situation during which some condition holds - static or dynamic

state machine

- behavior of a single object

- sequence of states it goes through - in reaction o events

state machine diagram - graphical representation of states and transitions - directed graphexamples:switch: on/offwashing mashine: prewash, wash, rinse, spin, dryATM: idle, active, out-of-serviceproject: submitted, evaluated, accepted, rejected,

monitored, audited, finished, delayedSlide9

State machine diagramstate - a situation during

which

some condition holds - static or dynamicstate machine - behavior of a single object - sequence of states it goes through - in reaction o

events

state machine diagram - graphical representation of states

and transitions - directed graphsymbol: rounded rectanglename: - capital letter - nouns: Washing

, Drying - adjectives: Idle, Active, Processed, etc.Slide10

State machine diagramstate machine diagram - graphical representation of states and transitions

Initial State

State 1

State Machine

Final State

State 2

transitionSlide11

CompartmentsSlide12

State machine diagramsections / compartments:name

internal activities - entry / exit / do

internal transitions

decompositionSlide13

State machine diagramsections / compartments:name

internal activities

internal transitions - no state change

decompositionSlide14

State machine diagramsections / compartments:name

internal activities

internal transitions

decomposition - for composite statesSlide15

ExamplesSlide16

Example – fax machinestate parametersentry / exit / do actionstransition

Sending

Fax

-

time : Time = currentTime

-

date : Date = currentDate

-

senderName : String

-

senderNumber : Long

+

entry / enterRecipientFaxNumber

+

exit / terminateTransmission

+

do / addDateStamp

+

do / addTimeStamp

+

do / addSenderNumber

+

do / addRecipientNumber

+

do / sendPage

Idle

-

time : Time

-

date : Date

-

senderName : String

-

senderNumber : Long

+

entry / emptyBuffer

+

entry / showClock

+

do / updateClockSlide17

Example – mobile phonecomposite statestransitionsguard conditions

example: Sparx Systems – UML 2 TutorialSlide18

Example – mobile phonecomposite statestransitionsguard conditions

example: Sparx Systems – UML 2 TutorialSlide19

Example – ATMhigh level behavioral diagram

example: www.uml-diagrams.orgSlide20

States – simple & compositeSlide21

Statessimple - no sub-states - no regions

Enrolled

Accepted

Examined

Evaluated

Graduated

Suspended

[verified positive]

[passed]

[verified negative]

[failed]

[after 1 week]Slide22

Statessimple - no sub-states - no regions

Initializing

Pre-washing

Washing

Rinsing

Spinning

DryingSlide23

Statessimple - no sub-states - no regions

composite

- divided into two or more substates – sequential or concurrent

substates / submachine statesSlide24

Statessimple - no sub-states - no regions

composite

- divided into two or more substates – sequential or concurrent

substates / submachine states

Scanning

Initializing

Sending

IdleSlide25

Statessimple - no sub-states - no regions

composite

- divided into two or more substates – sequential or concurrent

substates / submachine states

Initializing

Warming

lamp

Adjusting

Scanning

Sending

IdleSlide26

Composite states - exampleslearning thermostat

EA 9.3 Unregistered Trial Version

EA 9.3 Unregistered Trial Version

EA 9.3 Unregistered Trial Version

EA 9.3 Unregistered Trial Version

EA 9.3 Unregistered Trial Version

EA 9.3 Unregistered Trial Version

EA 9.3 Unregistered Trial Version

EA 9.3 Unregistered Trial Version

EA 9.3 Unregistered Trial Version

EA 9.3 Unregistered Trial Version

Operating

[Controlling Temperature]

[Analyzing]

Monitoring

Heating

Cooling

temp

Recording

Adjusting

[too low]

[too high]Slide27

Composite states - examplesmobile robot…Slide28

Composite states - examplescamera…Slide29

HistorySlide30

Historyshallow - come back to the most

recent

active

substatedeep - come back to the most recent active configurationSlide31

EA 9.3 Unregistered Trial Version

EA 9.3 Unregistered Trial Version

EA 9.3 Unregistered Trial Version

EA 9.3 Unregistered Trial Version

EA 9.3 Unregistered Trial Version

EA 9.3 Unregistered Trial Version

EA 9.3 Unregistered Trial Version

EA 9.3 Unregistered Trial Version

EA 9.3 Unregistered Trial Version

EA 9.3 Unregistered Trial Version

Operating

[Controlling Temperature]

[Analyzing]

Monitoring

Heating

Cooling

temp

Recording

Adjusting

[too low]

[too high]

History

shallow:

or no history?

ProgrammingSlide32

Historyshallow or deep?(temperature of water…)

example: Sparx Systems – UML 2 TutorialSlide33

PseudostatesSlide34

Pseudostatesabstractactivity diagams  state machine diagramsSlide35

Pseudostatesabstractactivity diagams  state machine diagrams

forks / joins

example: uml-diagrams.orgSlide36

Pseudostatesabstractactivity diagams  state machine diagrams

forks / joins

decisions

example: Sparx Systems – UML 2 TutorialSlide37

Pseudostatesabstractactivity diagams  state machine diagrams

forks / joins

decisions

junctions

example: Sparx Systems – UML 2 TutorialSlide38

Pseudostatesabstractactivity diagams  state machine diagrams

forks / joins

decisions

junctions

entry / exit points

Showing

commercial

Registered user

Playing radioSlide39

Pseudostatesabstractactivity diagams  state machine diagrams

forks / joins

decisions

junctions

entry / exit points

Showing

commercial

Registered user

Playing radio

Playing

stream

Paused

Choosing

station

Lost

connection

Write error

log

Show

goodbye

screenSlide40

TransitionsSlide41

Transitionsnotation:<

triggers

> [

<

guard conditions> ] / <behavior expressions>trigger - events that may induce state transition: - mandatory - signals - calls - time events - change eventsguard conditions - must be met for transition to be triggered - optionalbehavior expressions - operations, attributes, actions sequence etc. - optional

performed during transitionSlide42

SummarySlide43

State machine diagramSteps:identify objects that need state diagrams

identify their states

define hierarchy of states, substates, orthogonal regions

link states and substates with transitions

add pseudostatesspecify details of states and transitions using complete and appropriate notationSlide44

ExamplesSlide45

Examples for discussionSeminar source: www.agilemodeling.comtop-level:Slide46

Examples for discussionSeminar source: www.agilemodeling.comcomplete seminar lifecycle:Slide47

Examples for discussionSeminar source: www.agilemodeling.com

focus on registration:Slide48

Examples for discussionWater phase diagram source: www.uml-diagrams.orgSlide49

Examples for discussionBank ATM source: www.uml-diagrams.orgSlide50

more examples at www.uml-diagrams.org:Java 6 Thread States and Life CycleJava EJB – Life Cycle of a Session Object

Examples

source: www.uml-diagrams.orgSlide51

Case studyMobile robot …