Simulation: Past, Present and Future With Cameo Simulation Toolkit
Simulation: Past, Present and Future With Cameo Simulation Toolkit
Simulation: Past, Present and Future With Cameo Simulation Toolkit
You also want an ePaper? Increase the reach of your titles
YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.
<strong>Simulation</strong>: <strong>Past</strong>, <strong>Present</strong> <strong>and</strong> <strong>Future</strong><br />
<strong>With</strong> <strong>Cameo</strong> <strong>Simulation</strong> <strong>Toolkit</strong><br />
SysML Seminar Japan<br />
January 20, 2011
Agenda<br />
• Qualifications in the <strong>Simulation</strong> Domain<br />
• <strong>Simulation</strong> Defined<br />
• <strong>Simulation</strong>, a Brief History<br />
• <strong>Simulation</strong> Applications<br />
• Executable Models:<br />
– Real World Applications with <strong>Cameo</strong> <strong>Simulation</strong> <strong>Toolkit</strong>, Codeless<br />
<strong>Simulation</strong> Now a Reality!<br />
• The <strong>Future</strong> of <strong>Simulation</strong><br />
• Live Demonstration
Our <strong>Simulation</strong> Qualifications <strong>and</strong> Experience<br />
• Purdue University Computer <strong>and</strong> Electrical Engineering<br />
– Robotics<br />
• Eaton Corporation / Contel Federal Systems – CATIS/SID 88<br />
– Testing of Satellite Reconnaissance System, Network <strong>Simulation</strong><br />
• NASA JPL – US Army ASAS/ENCE Program<br />
– Communication Message Processing<br />
• Motorola<br />
– International Cellular Telephone Behavior <strong>and</strong> Testing<br />
• Magnavox<br />
– Advanced Field Artillery Tactical Data System<br />
• Naval Warfare Assessment Division<br />
– War Gaming, WAM - Warfare Assessment Modeling, BFTT – Battle Force Tactical Trainer<br />
• Texas Instruments<br />
– Harm Missile Simulated Testing System<br />
• Bridge Medical Systems<br />
– Infusion pump included simulation of system components that were delayed by manufacturing<br />
• No Magic<br />
– Part of task force determining capabilities <strong>and</strong> functionality of <strong>Cameo</strong> <strong>Simulation</strong> <strong>Toolkit</strong>
No Magic’s Qualifications<br />
• Executive Leadership Team with extensive simulation background<br />
– 30+ Years of simulation experience<br />
– U.S. Government NSA <strong>Simulation</strong><br />
– Involved with SCS, the Society for Modeling & <strong>Simulation</strong> Intl<br />
• OMG - Co-Chair SysML Specification<br />
• OMG - Co-Chair UPDM Specification<br />
• First company to support full st<strong>and</strong>ards-based simulation solution<br />
• MagicDraw / <strong>Cameo</strong> Suite used by INCOSE Challenge Teams<br />
• Varied background in simulation across domains<br />
• …UPDM, BPMN, Enterprise Architecture<br />
• Online <strong>and</strong> on-site UML, SysML, <strong>and</strong> UPDM training<br />
• On site Requirements Management training<br />
• <strong>Simulation</strong> training coming soon<br />
No Magic, known industry-wide for modeling, simulation <strong>and</strong> analysis
<strong>Simulation</strong> Defined<br />
Webster’s Defines <strong>Simulation</strong><br />
“To assume the mere appearance of…<br />
without the reality”
<strong>Simulation</strong> Defined: Gartner on <strong>Simulation</strong><br />
Gartner defines simulation as<br />
“Using analytical tools <strong>and</strong> models to maximize<br />
business process <strong>and</strong> decision effectiveness<br />
by examining alternative outcomes <strong>and</strong><br />
scenarios, before, during <strong>and</strong> after process<br />
implementation <strong>and</strong> execution.”<br />
Source: A Vision of Advanced Business Process <strong>Simulation</strong> <strong>and</strong> Optimization, June 2010
<strong>Simulation</strong> Defined<br />
“<strong>Simulation</strong> is the process of<br />
designing a model of a real<br />
system <strong>and</strong> conducting<br />
experiments with this model for<br />
the purpose of either<br />
underst<strong>and</strong>ing the behavior of<br />
the system <strong>and</strong>/or evaluating<br />
various strategies for the<br />
operation of the system.”<br />
– Source: Introduction to <strong>Simulation</strong> Using SIMAN, 2 nd Ed
<strong>Simulation</strong> Defined<br />
<strong>Simulation</strong> allows us to:<br />
– Model complex systems<br />
– Describe the behavior of systems<br />
– Develop theories or hypotheses that<br />
account for the observed behavior<br />
– Use the simulation to predict future<br />
behavior such as the effects resulting<br />
from system changes<br />
– Analyze proposed systems which have<br />
not yet been developed
<strong>Simulation</strong> Defined<br />
<strong>Simulation</strong> is one of the most widely used techniques in<br />
operations research <strong>and</strong> management science…<br />
– It is not a “last resort”<br />
– In the 1950’s & 1960’s as computers came of age, introduction<br />
of languages such as SIMSCRIPT, GPSS, simulation was<br />
seen as a tool of “last resort”<br />
– Fairly recent, based on Monte Carlo <strong>Simulation</strong>
<strong>Simulation</strong> a Brief History<br />
– In the late 60’s <strong>and</strong> 70’s most computers were mainframes <strong>and</strong><br />
access <strong>and</strong> interaction was limited”<br />
– Widely used today for problems which are not analytically<br />
solvable such as complex multiple integrals<br />
– Pritsker introduced GASP IV which resulted in a number of<br />
applications, significant in the evolution of simulation
<strong>Simulation</strong>: A Brief History<br />
– In the late 70’s <strong>and</strong> early 80’s SLAM introduced in ‘79 by<br />
Pritsker <strong>and</strong> Pergden<br />
– Models were more credible because of sophisticated tools<br />
– SIMAN introduced in ’82 by Pergden. 1 st language to run on<br />
both mainframe <strong>and</strong> microcomputer<br />
– Late 80’s till now, advent of powerful PC’s, sophisticated<br />
languages<br />
– Major advancement in graphics<br />
– Models can now be simulated
<strong>Simulation</strong> Applications: What Can Be Simulated?<br />
What can be simulated?<br />
Almost anything can be simulated <strong>and</strong> almost<br />
everything has!<br />
– Computer Systems<br />
– Manufacturing<br />
– Business<br />
– Government<br />
– Military<br />
– Healthcare
<strong>Simulation</strong> Applications: What Can Be Simulated?<br />
– Computer Systems: hardware components, software systems, networks, database<br />
management, information processing<br />
– Manufacturing: material h<strong>and</strong>ling systems, assembly, automated production, inventory control,<br />
plant logistics<br />
– Business: financial analysis, stock <strong>and</strong> commodity analysis, pricing policies, cash flow analysis,<br />
financial “what-if” analysis <strong>and</strong> forecasting<br />
– Government: state <strong>and</strong> local municipal growth, jobs <strong>and</strong> population forecasting, l<strong>and</strong> use,<br />
health care delivery, traffic scenarios, fire <strong>and</strong> safety simulations, criminal justice <strong>and</strong> traffic control<br />
– Military: weapon design, UAV simulations, tactical simulations, war fighting simulation,<br />
communication <strong>and</strong> logistics <strong>and</strong> weaponry cost/benefit simulation<br />
– Healthcare: Patient records, payer/provider analytics
<strong>Simulation</strong> Applications: Advantages<br />
<strong>Simulation</strong>’s greatest strength is<br />
its ability to answer<br />
“what-if” questions…<br />
Other advantages of<br />
simulation include:<br />
– Ability to study existing systems without<br />
disrupting ongoing operations<br />
– Systems can be “tested” before committing<br />
resources<br />
– Ability to better control time <strong>and</strong> resources<br />
– Identify process bottlenecks<br />
– Gain insight into system performance:<br />
» which variables are most important?
<strong>Simulation</strong> Applications: Gartner on <strong>Simulation</strong> Context<br />
• Improve the detection<br />
Source: A Vision of Advanced Business Process of <strong>and</strong> <strong>Simulation</strong> response to <strong>and</strong><br />
Optimization, June 2010<br />
important signals/<br />
patterns (such as market<br />
movement)<br />
• Examine the<br />
effectiveness of<br />
alternative decision<br />
frameworks<br />
• Fine-tune process<br />
performance<br />
• Maximize the<br />
effectiveness of<br />
resources<br />
Source: A Vision of Advanced Business Process <strong>Simulation</strong> <strong>and</strong> Optimization, June 2010
<strong>Simulation</strong> Applications: Advantages<br />
“If your organization seeks innovation in<br />
dealing with known <strong>and</strong> unknown business<br />
<strong>and</strong> market scenarios, leverage simulation to<br />
target future process states, <strong>and</strong> exploit<br />
emerging conditions or protect from threats.”<br />
Source: A Vision of Advanced Business Process <strong>Simulation</strong> <strong>and</strong> Optimization, June 2010
<strong>Simulation</strong> Applications: The <strong>Simulation</strong> Professional Body of Knowledge<br />
• Referent: What is simulated?<br />
• Intention: Why is it simulated?<br />
• Implementation: How is it<br />
simulated?<br />
• Credibility: How well is it<br />
simulated?<br />
• Programmatics: How is the<br />
simulation managed?<br />
• Application: What value is derived?
Executable Models<br />
“Executable UML is the next logical, <strong>and</strong> perhaps inevitable, evolutionary step in the<br />
ever-rising level of abstraction at which programmers express software solutions.”<br />
Grady Booch<br />
The purpose of a simulation is to gain system underst<strong>and</strong>ing without manipulating<br />
the real system, either because it is not yet defined or available, or because it<br />
cannot be exercised directly due to cost, time, resources or risk constraints.<br />
<strong>Simulation</strong> is typically performed on a model of the system.<br />
18
Executable Models<br />
• A model may be used to describe a domain or system under study or to<br />
specify a (business, software <strong>and</strong>/or hardware) system to be built.<br />
• Descriptive models are generally used for analysis.<br />
• Specification models are generally used for engineering.<br />
• The benefits of executable models<br />
• Testable platform independent models (PIMs).<br />
• Act as the implementation of the system (particularly for business<br />
processes or software systems)<br />
• Explore possible (desirable <strong>and</strong> undesirable) behaviors of a system<br />
• Validate the behavioral specification for a system
Executable Models: A New Idea?<br />
• Model execution tools are available, but execution semantics or<br />
modeling capabilities are not st<strong>and</strong>ardized<br />
• Mentor Graphics BridgePoint<br />
• Kennedy-Carter xUML<br />
• Rational Rose Real Time <strong>and</strong> Rhapsody<br />
• Vitech CORE<br />
• OMG st<strong>and</strong>ards are now filling these gaps<br />
• Unified Modeling Language (UML)<br />
• Systems Modeling Language (SysML)<br />
• Executable UML Foundation (fUML)<br />
• UML Action Language (Alf)<br />
• XBRL st<strong>and</strong>ards for financial modeling<br />
• St<strong>and</strong>ards body using No Magic solutions
Executable Models: <strong>Cameo</strong> <strong>Simulation</strong> <strong>Toolkit</strong><br />
+<br />
21
Executable Models: <strong>Cameo</strong> <strong>Simulation</strong> <strong>Toolkit</strong><br />
The st<strong>and</strong>ard based model execution of:<br />
Activities (OMG fUML st<strong>and</strong>ard)<br />
Statemachines (W3C SCXML st<strong>and</strong>ard)<br />
OpaqueBehaviors (JSR223 st<strong>and</strong>ard)<br />
Parametrics (OMG SysML st<strong>and</strong>ard)<br />
22
Executable Models: Foundation for Executable UML<br />
• OMG RFP for the Semantics of a Foundational Subset for Executable UML Models – Issued<br />
April 2005<br />
• fUML Version 1.0 Beta 3 (finalized) – February 2010<br />
• An executable subset of st<strong>and</strong>ard UML that can be used to define the structural <strong>and</strong><br />
behavioral semantics of systems.<br />
• fUML defines a basic virtual machine for the Unified Modeling Language, enabling compliant<br />
models to be transformed into various executable forms for verification, integration <strong>and</strong><br />
deployment.<br />
23
Executable Models: Classifier Execution<br />
The structural semantics of systems<br />
An active class is one that has a classifier behavior.<br />
Only active class may receive signals.<br />
A classifier behavior is an autonomous behavior started when an active<br />
class is instantiated.<br />
A behavioral model is executable if it is complete enough<br />
UML Behaviors: Activity, Statemachine, Interaction, OpaqueBehavior<br />
24
Executable Models: UML Object Diagram<br />
The st<strong>and</strong>ard way to specify<br />
objects <strong>and</strong> values
Executable Models: Activity<br />
An activity specifies behavior as<br />
the execution of a set of actions.<br />
Action is the fundamental unit of<br />
computational behavior.<br />
An action takes a set of<br />
inputs <strong>and</strong> converts them into<br />
a set of outputs<br />
Data <strong>and</strong> control<br />
tokens flow<br />
between the<br />
actions.<br />
An action in one<br />
activity may call<br />
another activity.
Activity Execution<br />
How it works:<br />
An activity diagram is a graph structure consisting of activity nodes<br />
connected by activity edges<br />
The object or control tokens flow along edges at runtime<br />
A token is a container for an object, datum or locus of control<br />
An action is a fundamental unit of executable behavior within an activity.<br />
When all input pins have required number of tokens, action is fired <strong>and</strong><br />
produces an object token in its output pin<br />
An output pin offers its tokens to the targets of all outgoing object flows.<br />
27
Activity Execution<br />
Sending <strong>and</strong> receiving signals:<br />
A signal is a classifier whose instances may be communicated<br />
asynchronously.<br />
A signal may have attributes that represent transmittable data.<br />
A reception is a declaration of the ability to receive a signal.<br />
A SendSignalAction may create <strong>and</strong> send signal instance to any target<br />
Object<br />
AcceptEventAction suspends execution <strong>and</strong> waits for a trigger<br />
28
Actions Semantics
Action Language<br />
• The class <strong>and</strong> state models can only provide a static view of the domain<br />
• Action Semantics was added to the UML specification in 2001<br />
• It is convenient to use a textual rather than graphical notation<br />
• “this.light = new Light()”<br />
• Textual action languages have been around for a while:<br />
Object Action Language(OAL), Shlaer-Mellor Action Language(SMALL), Action Specification Language(ASL), That Action<br />
Language(TALL), Starr's Concise Relational Action Language(SCRALL), Platform-independent Action Language (PAL)<br />
<strong>and</strong> PathMATE Action Language (PAL).<br />
• UML Action Language (Alf)<br />
• OMG RFP for Concrete Syntax for a UML Action Language – Issued September 2008<br />
• Two initial submissions – August 2009<br />
• Joint revised submission – February 2010
Action Languages in <strong>Cameo</strong> <strong>Simulation</strong> <strong>Toolkit</strong><br />
JSR 223: Scripting for the Java Platform<br />
• Pluggable scripting languages/engines<br />
• Context variables can be defined in scripting environment<br />
• MagicDraw utility methods can be called<br />
Built-in languages:<br />
• OCL, Java binary, Javascript, Ruby, Groovy <strong>and</strong> Python<br />
• Many other can be freely downloaded at https://scripting.dev.java.net<br />
OpaqueExpressions can be used in:<br />
• OpaqueActions<br />
• OpaqueBehaviors<br />
• Constraints, guards <strong>and</strong> decisions<br />
• Default values of the properties
The State Machine<br />
A state machine abstracts<br />
system behavior into a finite<br />
number of states.<br />
The system is modeled as<br />
having discrete transitions<br />
between the states.<br />
Behaviors are associated with<br />
transitions (Mealy style)<br />
..or are associated with states<br />
(Moore style)
State Machine Execution<br />
How it works:<br />
Put all objects into an initial state<br />
When an object enters a state, it begins executing the entry<br />
activity (procedure) immediately<br />
Upon completion, the object waits for an event to occur<br />
If one of these events corresponds to a trigger of outgoing<br />
transition, the waiting object will follow the transition <strong>and</strong> get busy<br />
again.<br />
Busy objects do not react to any events.<br />
When events targeted at a busy object occur, they are held<br />
33
The Calculator
State Machines<br />
State machine semantics are described in detail in the UML Superstructure<br />
specification, but this is not formalized.<br />
State machine semantics have been formalized by Harel <strong>and</strong> others, but these<br />
formalizations have not been st<strong>and</strong>ardized for UML.<br />
It is NOT part of fUML specification
State Chart XML (SCXML): State Machine Notation for Control Abstraction<br />
• W3C Working Draft 13 May 2010<br />
• Provides a generic state machine–based execution environment based on Harel state<br />
charts.<br />
• Describes complex state-machines, including sub-states, concurrency, history, time<br />
events <strong>and</strong> more.<br />
36
fUML <strong>and</strong> SCXML Integration<br />
The problem:<br />
• fUML does NOT support Statemachines<br />
• SCXML engine uses SCXML document for execution<br />
The solution:<br />
• Implement UML Statemachine to SCXML mapping<br />
• SCXML engine is wrapped into fUML interfaces<br />
• fUML engine is wrapped into SCXML interfaces<br />
The result:<br />
• Engines are independent, integration is part of the toolkit<br />
• Statemachine in CallBehaviorActions<br />
• Activities or OpaqueBehaviors as entry/do/exit behaviors of the State<br />
• SendSignalAction can trigger Transitions in the Statemachine<br />
• UML Statemachine can be exported to SCXML file<br />
37
<strong>Cameo</strong> <strong>Simulation</strong> <strong>Toolkit</strong><br />
Model execution framework <strong>and</strong> infrastructure:<br />
Model debugging <strong>and</strong> animation<br />
Pluggable engines, languages <strong>and</strong> evaluators<br />
User Interface prototyping<br />
Model driven configs <strong>and</strong> test cases<br />
38
<strong>Simulation</strong> Management Window<br />
Sessions tree<br />
Variables<br />
Breakpoints<br />
Console<br />
Control panel<br />
Triggers<br />
Animation speed slider<br />
39
Sessions Panel<br />
Represents running threads/sessions<br />
Hierarchical view (nested sessions)<br />
Synchronous/asynchronous sessions<br />
Status of the session (started, paused)<br />
Independently terminate or suspend any session<br />
40
Variables Panel<br />
Represents runtime structure in a selected session context<br />
Runtime objects tree <strong>and</strong> values<br />
Based on fUML execution model<br />
Editable primitive values<br />
Allows inject event into selected Object event pool<br />
Represents the current state of every object<br />
41
Breakpoints<br />
Breakpoint can be added from the model element context menu<br />
The execution will be paused when this element is activated<br />
Conditional execution suspending<br />
Suspend modes : on entry, on exit <strong>and</strong> both<br />
Values can be changed while execution is suspended<br />
42
Animation<br />
Visited <strong>and</strong> active element highlighting<br />
Breakpoints highlighting<br />
Custom colors<br />
Exposing token values on diagram<br />
Adjustable animation speed<br />
43
Execution Configuration<br />
Some predefined execution settings can be set using model-based execution<br />
configuration<br />
«ExecutionConfig» configuration properties consist of:<br />
<br />
<br />
<br />
<br />
executionTarget – the element which execution should be started.<br />
silent – if true, animation <strong>and</strong> idle will not be used.<br />
ui – user interface mockup configuration.<br />
log – element to which execution trace will be recorded.<br />
The execution configuration can be selected <strong>and</strong> executed directly, or may<br />
be used as target element in other execution configurations.<br />
44
Execution Trace<br />
DSL for execution trace<br />
All events are recorder to the special model<br />
Custom reports <strong>and</strong> validation rules<br />
DSL customization for user-friendly browsing<br />
45
The Goal: Automated Analysis
User Interface Prototyping<br />
<strong>Cameo</strong> <strong>Simulation</strong> <strong>Toolkit</strong> provides several approaches for UI prototyping:<br />
<br />
“Executable” User Interface Modeling Diagram<br />
<br />
System state animator (ImageSwitcher)<br />
<br />
API for custom UI implementations or third party integrations<br />
47
User Interface Prototyping<br />
User Interface diagram allows creating mockups in seconds:<br />
<br />
<br />
<br />
Drop signal on “Button” to assign name <strong>and</strong> trigger<br />
Drop property on “Label” to be monitored<br />
Drop images from disk or web browser<br />
48
ActiveImage <strong>and</strong> ImageSwitcher<br />
• ImageSwitcher is one more predefined subtype of UI config.<br />
• It contains collection of ActiveImage elements to represent all the states<br />
• The whole lifecycle of the object can be animated<br />
Definition : Runtime representation :<br />
49
Verification <strong>and</strong> Validation<br />
• Various kinds of validation <strong>and</strong> verification options are available:<br />
• model validation before execution (new validation suite)<br />
• action preconditions <strong>and</strong> postconditions checking<br />
• conditional breakpoints<br />
• constraints in any action language<br />
50
Model-based Test Cases<br />
51
The <strong>Future</strong> of <strong>Simulation</strong>: Our Vision<br />
What’s next:<br />
V&V, analysis <strong>and</strong> report tools<br />
SysML execution semantics support<br />
BPMN diagrams execution (BPEL <strong>and</strong> XPDL st<strong>and</strong>ards)<br />
UPDM support<br />
Alf (UML Action Language) support<br />
Sequence diagram execution<br />
Webservices – remote access to execution environment<br />
“Why are we so bullish on simulation in general…As mankind tackles<br />
more <strong>and</strong> more complex problems, simulation plays an increasingly<br />
important role in solving those problems.”<br />
Source: Drew Hamilton, Assoc Professor of Computer Science <strong>and</strong> Software Engineering, <strong>Simulation</strong> Magazine, Vol. 84, #12,<br />
December, 2008<br />
52
The <strong>Future</strong> of <strong>Simulation</strong>: Industry Collaboration<br />
Organizations Devoted to Modeling & <strong>Simulation</strong>:<br />
Society for Modeling <strong>and</strong> <strong>Simulation</strong> International (SCS)<br />
<strong>Simulation</strong> Interoperability St<strong>and</strong>ards Organization<br />
Association for Computing Machinery (ACM)<br />
SimSummit<br />
53
Gartner on the <strong>Future</strong> of <strong>Simulation</strong><br />
“ While many optimization methods,<br />
techniques <strong>and</strong> tools can help in BPI*<br />
efforts, we have selected simulation as<br />
the most important optimization technique<br />
for processes now <strong>and</strong> in the near future.”<br />
*BPI is represented today by BPM disciplines which treat processes as assets
Live Demonstration: <strong>Cameo</strong> <strong>Simulation</strong> <strong>Toolkit</strong><br />
Try it now!<br />
1.0 GA version was released on December 20, 2010<br />
Free trial download at www.magicdraw.com<br />
Training <strong>and</strong> Mentoring Available<br />
55
Live Demonstration<br />
Let’s See the <strong>Cameo</strong> <strong>Simulation</strong> <strong>Toolkit</strong> in Action
Contact Information<br />
Gary Duncanson<br />
President <strong>and</strong> CEO<br />
No Magic, Inc.<br />
+1 214-291-9100<br />
gary@nomagic.com