MagicDraw UML for Developers

Download Report

Transcript MagicDraw UML for Developers

Free Mini Course:
Applying SysML with MagicDraw
What is SysML?
OMG System Modeling Language (SysML)
Developed by OMG and INCOSE, and AP233. Adopted by OMG in May ‘06
Realized as UML subset
UML reused
by SysML
(UML4SysML)
UML 2
Not required
by SysML
SysML
SysML’s
extensions to
UML
 http://www.omgsysml.org
2
What is SysML?
Modeling language that includes 9 diagrams
Dedicated for modeling complex systems that may include:
 hardware,
 software,
 information,
 personnel,
 procedures, and
 facilities.
Being implemented by different tools vendors
3
SysML Diagrams
SysML Diagram
Behavior
Diagram
Activity Sequence State Machine
Diagram Diagram
Diagram
The same as in UML 2
Requirement
Diagram
Structure
Diagram
Use Case
Diagram
Block Definition
Diagram
Internal Block
Diagram
Package
Diagram
Modified from UML 2
New diagram type
Parametric
Diagram
4
SysML in the System Development Process
Requirements diagram
Use Case Diagram
Activity diagram
Package diagram
Block Definition diagram
Activity diagram
Sequence diagram
State diagram
System Requirements
& Business Analysis
Package diagram
Block Definition diagram
Internal Block diagram
Parametric diagram
Sequence diagram
State diagram
System Analysis
& Design
Evaluation &
Optimization (V&V)
Detailed Design:
Software & Hardware
System
Integration
Requirements diagram
Use Case diagram
Block Definition diagram
Internal Block diagram
Package diagram
System
Implementation
5
Why Modeling Is Important?
 Modeling helps to improve design quality, reduce errors and avoid
ambiguity.
 Modeling helps to improve communications.
 Modeling helps to manage complex systems development:
• helps to separate different concerns,
• allows hierarchical modeling,
• facilitates impact analysis of requirements and design changes,
• supports incremental development.
6
A Case Study: Analyzing User Needs
HybridSUV
Operate
V ehicle
Driv er
Insur e the
V ehicle
Registered
Owner
Insur ance
Company
Register the
V ehicle
Department of
Motor V ehicles
Maintain the
V ehicle
Maintainer
Analyze user needs by identifying user roles – actors – and associating
them to their use cases.
 With MagicDraw you can document use cases and generate use case
documentation from model.
7
A Case Study: Defining System Requirements
Show system requirements and their relationships with other elements.
 Create Use Case diagram to specify functional requirements.
8
A Case Study: Structural System Decomposition
Prepare package diagram to group your model elements into packages,
views and viewpoints.
 Establish dependencies between packages and/or model elements
within that package.
 Viewpoints provide insight to a model using another principle.
9
A Case Study: Defining Structural Blocks
Show system structure as block components with their properties,
operations and relationships.
<<block>>
WheelHubAssembly
0
.
.
0..1
1
0
.
.
<<block>>
1
Tire
tireSpecification : String
-
w
h
e
e
l
1
<<block>>
m
0
.
.
1
-
WheelAssembly
o
u
n
t
T
i
r
e
(
)
t
1
0
.
.
1
-
w
<
<
b
l
o
c
k
>
>
Wheel
1
<
<
b
l
o
c
k
>
>
1
1
diameter : mm
width : mm
B
a
n
d
M
o
u
n
t
WirelessTire
PresureMonitor
transmitPressure()
-lugBoltJoint
0..5
1
-
h
u
<<block>>
LugBoltJoint
b
<
<
b
l
o
c
k
>
>
-
<
<
b
l
o
c
k
Hub
>
>
0
.
.
1
-
h
LugBolt
ThreadedHole
1
t
h
r
e
a
d
e
d
H
o
l
e
0
.
.
1
boltTension : lb
torque : ft-lb{min = 75, max = 85}
5
lugBoltSize : mm
threadSize : mm
10
A Case Study: Modeling Block Structure
ibd [B loc k] W heelHub As s embly[ W heelHub As s embly]
hub : Hub [1]
wheel : W heelAssembly [1]
h : LugBol t
ThreadedHole [5]
1
w : W heel [1]
mountingHole : LugBolt
MountingHole [5]
t : Tir e [1]
: Tir eBead
mountingHole 1
0..1
threadedHole
lugBoltJoint : LugBoltJoint [0..5]
0..1
Describe the system-containing blocks internal structure. Show parts,
ports and connectors.
11
A Case Study: Designing Control and Data Flows
Model system behavior and the
way how these behaviors are
related.
Describe control and data flow,
display continuous behaviors and
continuous data flows
12
A Case Study: Designing Communications
<<block>>
driver : Driver
v ehicleInContext : HybridSUV
ref
StartVehicleBlackBox
Model component
interactions for use
case scenarios in
order to find out new
methods in existing
blocks or even blocks
with specific
responsibilities
par
[]
alt
[self.oclInState(idle)]
ref
Idle
[self.oclInState(acc elerating/cruising)]
ref
Accelerate/Cruise
[self.oclInState(braking)]
ref
Brake
[]
ref
Steer
ref
Park/ShutdownVehicle
13
A Case Study: Designing State-Based System Behavior
key off
Off
S hutOff
s tart
Represent block life
cycle.
Operate
ac c elerate
Idle
s topped
releas eB rake
Braking
Accelerating/
Cruising
engageB rake
Define system behavior
as sequences of states
that a component or
interaction experience in
response to events.
14
A Case Study: Modeling System Constraints
<<constraint>>
StraightLine
VehicleDynamics
<<constraint>>
PowerEquation
{tp = whlpowr - (Cd*v) - (Cf*tw *v)}
<<constraint>>
AccelerationEquation
-acc {a = (550/32)*tp(hp)*deltat*tw}
parameters
-
p
w
Cd
dt
acc
vel : VelocityEquation
whlpwr
x
Cf
tw
incline
pos : PositionEquation
pwr : PowerEquation
r
parameters
whlpowr : Horsepwr
Cd : Real
Cf : Real
tw : Weight
tp : Horsepwr
v : Vel
i : Real
parameters
par [B lock] E conomyContext [ E conomy Context ]
tw : Weight
delta-t : Time
tp : Horsepwr
ad.HSUV.P ayloadCapacity
a : Accel
: Aer oDr agE quation
pcap
volume
Cd
pl : PayloadE quation
-
p
o
s
-
v
e
l
psgrW t
<
<
c
o
n
s
t
r
a
i
n
t
>
>
PositionEquation
{x(n+1) = x(n)+v*5280/3600*dt}
<
<
c
o
n
s
t
r
a
i
n
t
>
cgoW t
Cd
>
VelocityEquation
{v(n+1) = v(n)+a*32*3600/5280*dt}
ad.dr iv ingConditions .road.incline
parameters
delta-t : Time
v : Vel
x : Dist
ad.HSUV.power Subs ystem.ice.I CE Efficiency
volume
incline
dyn : S traightLine
V ehicleDynamics
parameters
delta-t : Time
v : Vel
a : Accel
delta-t : Tim e
dt
acc
acc
vel
vel
whlpwr
Cf
tw
tw
n_ice
ebpwr
fe : FuelEfficiency
E quation
mpg
whlpwr
x
n_eg
n_em
Cf
r drag : Rol ling
Fr ictionEquation
ad.HSUV.position
Model system constraints between structural elements.
Model constraints blocks to capture equations. Use parametric diagrams to
represent a usage of the constraints in an analysis context.
15
A Case Study: Mapping Logical to Physical Model Elements
ibd [Block] PowerSubsystem [ Power Func tional Allocation]
allocatedFrom =
ControlElectricPower
epc : ElectricalPowerController
allocatedFrom =
ConvertElectricToPower
emg : ElectricalMotorGenerator
ElectricCurrent ElectricCurrent
Represent general relationships that
map one model element to another.
 Create diagram or dependency
matrix to represent allocations!
16
Learn MagicDraw Features!
Increase efficiency of tool usage by learning how to:
 Organize your model elements and hyperlink them
for easy navigation
 Prepare model content diagrams for easy model
navigation
 Reuse model element in multiple diagrams with
different level of details
 Document your use case models and generate use
case specification
 Create system documentation following style
guidelines and using layout tools
 Validate the model you have created
 Decompose large models into independent modules
and profiles
 Compare model versions and find out changes in
model and diagrams
 Evaluate your model by calculating model metrics
…and much more!
17
Sample MagicDraw Feature: Comparison of Two Model Versions (1)
Added element
Deleted elements
Modified element – a diagram
18
Sample MagicDraw Feature: Comparison of Two Model Versions (2)
Find out modified parts in diagrams!
19
Ways to Learn
Choose the most effective way to learn:
1. Send one or two employees to an open enrollment class!
2. Order onsite training when purchasing new MagicDraw licenses!
3. Consider adding one of our professional services consultants as
an on-staff mentor in your first MagicDraw project!
4. Ask for a free one hour tour for new functionality demo!
20
Leading Instructor
Dr. Darius Šilingas
MagicDraw Training Leader
[email protected]
Darius has been working with No Magic since 1998. He took part as Java developer in multiple
international projects. Darius has developed a modeling case study MagicLibrary and leaded
numerous MagicDraw UML training courses and consultations worldwide. He also taught
industrial courses on Requirements Management with UML, Software Design with UML, and
Java/J2EE Programming. Darius received PhD from Vytautas Magnus University, where he
teaches courses Software Development Methodology and Software Engineering. Darius
participates frequently in various conferences and gives talks on UML and other software
development topics. He holds the following professional certificates:



Microsoft Certified Professional
Sun Certified Programmer for the Java 2 Platform 1.4
OMG-Certified UML Professional Advanced
21
Other Instructors
Our world-wide instructor group contains people who all have the
following characteristics:






Have experience in software development
Have applied UML in multiple industrial projects
Are experts of MagicDraw UML
Have good communication skills
Are customer-oriented
Believe in modeling
Most of our trainers are either
 The best people from MagicDraw development group
 The best independent consultants working with MagicDraw
Visit www.magicdraw.com/trainers for trainers description.
22
Where to Look for More Info
Do you need MagicDraw training for just yourself or several employees?
Want MagicDraw training for a small group but want to get away?

We are offering you regular open enrollment classes in the USA,
Europe, and Asia
 Check the online schedule www.magicdraw.com/training for
locations and dates

Onsite training is available anywhere in the world with the
possibility to customize course to meet best your needs!
 Contact training group: [email protected]
 Register online at www.magicdraw.com/registration
23
The End
Thank You for Attention!
Let’s Keep In Touch:
[email protected]
24