37
Simulation-Based Engineering of Complex Systems Module 4: Simulation of Complex-Sensitive Systems (CSS) 1 Dr. John R. Clymer, INCOSE Fellow University of Waterloo October 6-7, 2010

Clymer_4

Embed Size (px)

DESCRIPTION

John Clymer Course/Lecture

Citation preview

Page 1: Clymer_4

Simulation-Based Engineering of Complex Systems

Module 4: Simulation of Complex-Sensitive Systems (CSS)

1

Dr. John R. Clymer, INCOSE Fellow

University of WaterlooOctober 6-7, 2010

Page 2: Clymer_4

2

Module 4: A Tool for Modeling Complex Systems

• Types of process interactions• How ExtendSim has been modified to

implement the OpEM language –Process identifiers and their Use– Timeline analysis of example process

• How blocks work together implement OpEM language

• How to model a system problem using OpEMCSS

• Summary

Page 3: Clymer_4

3

Types of Complex System Interactions

• Process SynchronizationOne or more process instances must wait while

another process completes a task• Resource contention

One or more process instances must wait while another process uses a resource

• Communication and adaptationOne process instance sends a message to another

process instance that is then used to decide an action

Page 4: Clymer_4

4

Example Process to Study System Interactions

A job request arrives every N units of time• Tasks A1 and A2 share resource A as noted by same

color• Task B exclusively uses resource B• Task C exclusively uses resource C

A1

B C

A2AND AND

Page 5: Clymer_4

5

Timeline Demonstrates Types of Complex System Interactions

JOB1 JOB2 JOB3

A1

B C

I A2

WA1 A1

B

WA2

C

B

WA2

WA1

C

I

A1

A2

I

Synchronization:Split and Assemble

Resource Contention

Communication And

Adaptation

A2

Page 6: Clymer_4

6

Module 4: A Tool for Modeling Complex Systems

• Types of process interactions• How EXTEND has been modified to implement the

OpEM language – Process identifiers and their Use– Timeline analysis of example process

• How blocks work together implement OpEM language

• How to model a system problem using OpEMCSS

• Summary

Page 7: Clymer_4

7

How ExtendSim has been modified to implement the OpEM language

• Basic ExtendSim Discrete Event (DE) library blocks model transactions flowing through a network of queues and servers.

• Basic ExtendSim DE blocks can only access local attributes that are associated with the current item passing through the block

• Basic ExtendSim DE blocks can not synchronize the flow of multiple items flowing through the network

Page 8: Clymer_4

8

ExtendSim Models Items Moving Through a Network of Blocks

• An OpEM model employs a sequence of states and events to represent each process instance or thread.– States consist of the discrete state (defines current state of

affairs of the process) and state variables.– State variables represent structural and operational

conditions of the system.– OpEM maps onto ExtendSim using an item for each process

instance or thread.• ExtendSim maintains a set of indices specifying all items

currently in the model where each item consists of all information needed to describe a process instance.

• A single number is not sufficient to identify an item moving through the model blocks describing a process instance.

Page 9: Clymer_4

9

JOB1 JOB2 JOB3

A1

B C

I A2

WA1 A1

B

WA2

C

B

WA2

WA1

C

I

A1

A2

I

Process=2,Duplicate1=1

Process=3,Duplicate1=1

Process=2,Duplicate1=2

Process=3,Duplicate1=2

Process=2,Duplicate1=3

Process=3,Duplicate1=3

• Process, Duplicate, and Level are integers

• Remember: Duplicate1 for level 1, Duplicates 1&2 for level 2, and Duplicates 1,2, & 3 for level 3 of split

Process Identifiers Allow Multiple Process Instances Using Same Block Structure to be Executed

Duplicate1 models

multiple jobs at level 1

Process=1Job Arrival

Page 10: Clymer_4

10

Module 4: A Tool for Modeling Complex Systems

• Types of process interactions• How ExtendSim has been modified to

implement the OpEM language –Process identifiers and their Use– Timeline analysis of example process

• How blocks work together implement OpEM language

• How to model a system problem using OpEMCSS

• Summary

Page 11: Clymer_4

11

How blocks work together to implement OpEM language

• Control the Simulation: OpEMCSS ExecutiveS Block• Define a system process instance: Begin and End of

Simulation Run or Replication • Define concurrent processes: Split & Assemble• Model time in a discrete state: Wait Until Event and Reaction

Time Event • Communication and Adaptation : Local Event Action, Context

Sensitive System Event Action, and Global Event Action blocks Work Together

Page 12: Clymer_4

12

Simulation OpEMCSS ExecutiveS block

ExecutiveS is modified version of

the ExtendSim Executive Block

• The OpEMCSS ExecutiveS Block controls moving objects, decides when to evaluate wait logic, and controls all event sequencing.–ExtendSim Executive Block only controls event sequencing.

• NOTE: This block must always be placed in the upper left-hand corner of the model with all other blocks to the right.

Page 13: Clymer_4

13

How blocks work together to implement OpEM language

• Control the Simulation: OpEMCSS ExecutiveS Block• Define a system process instance: Begin and End of

Simulation Run or Replication • Define concurrent processes: Split & Assemble• Model time in a discrete state: Wait Until Event and

Reaction Time Event • Communication and Adaptation : Local Event Action,

Context Sensitive System Event Action, and Global Event Action blocks Work Together

Page 14: Clymer_4

14

Begin & End Event Blocks

• Begin Event Block lets us start the model. It sets all initial states and contexts as shown in the dialog box.

• End Event Block lets us stop the model. It also collects any statistics from the model’s execution.– In this example the dialog box is setup to compute average through-put.

Begin Event Block

End Event Block

Page 15: Clymer_4

15

How blocks work together to implement OpEM language

• Control the Simulation: OpEMCSS ExecutiveS Block • Define a system process instance: Begin and End of

Simulation Run or Replication• Define concurrent processes: Split & Assemble• Model time in a discrete state: Wait Until Event and

Reaction Time Event • Communication and Adaptation : Local Event Action,

Context Sensitive System Event Action, and Global Event Action blocks Work Together

Page 16: Clymer_4

16

Split Action & Assemble Performed At Two Levels: Job Level 1 and Job Task Level 2

• Note in the timeline that both dupl1 and dupl2 of the process identifier are required to properly perform level 1 and 2 assemble functions

Level 1Split

Level 2Split

Level 1Assemble

Level 2Assemble

Page 17: Clymer_4

17

Job Arrival Process

• Job Arrival Process interactively generates a new job execution process item every 8 simulated time units

Page 18: Clymer_4

18

How blocks work together to implement OpEM language

• Control the Simulation: OpEMCSS ExecutiveS Block• Define a system process instance: Begin and End of

Simulation Run or Replication• Define concurrent processes: Split & Assemble• Model time in a discrete state: Wait Until Event and

Reaction Time Event • Communication and Adaptation : Local Event Action,

Context Sensitive System Event Action, and Global Event Action blocks Work Together

Page 19: Clymer_4

19

Wait Until Event and Reaction Time Event Blocks Work Together to Model Resource Contention

Interaction

• Logic is “( (RA >0) && (MinStartTime == StartTime) )” where RA is available(1) or busy(0), “StartTime” is a local attribute defining when wait time started, and “MinStartTime” is a global attribute defining minimum global start time for all concurrent processes waiting.

Wait Logic for Task A1

Allocate Resource A

DeAllocate Resource A

Page 20: Clymer_4

20

How blocks work together to implement OpEM language

• Control the Simulation: OpEMCSS ExecutiveS Block • Define a system process instance: Begin and End of

Simulation Run or Replication• Define concurrent processes: Split & Assemble• Model time in a discrete state: Wait Until Event and

Reaction Time Event • Communication and Adaptation : Local Event Action,

Context Sensitive System Event Action, and Global Event Action blocks Work Together

Page 21: Clymer_4

21

Hierarchical Context Analysis Block

• Context Analysis hierarchical block contains three OpEMCSS blocks that implement communication resource allocation data.

Hierarchical Block Hierarchical Block

Inside Hierarchical Block

Inside Hierarchical Block

Page 22: Clymer_4

22

Blocks Work Together to Achieve Communication and Adaptation

• Context Sensitive System Event Action block searches through selected concurrent processes to extract attributes that measure context-sensitive relationships.

• Global Event Action block allows local attributes to be made global (same value available to selected concurrent processes).

First Step:Set

“StartTime”Local Attribute

toCurrent Time

Second Step:Search for

global minimum

“StartTime”

Third Step:Make

“MinStartTime”Global

Page 23: Clymer_4

23

Exercise: Run Model in Trace Mode and Verify How ExtendSim +OpEMCSS Works

ModelScoreboard

ContainsMOEs and

MOPs

• Run model in trace mode, draw timeline from trace, and compare to slides 6 and 10. Verify model scoreboard values using your time line.

Page 24: Clymer_4

24

Exercise: Run Modified Model in Trace Mode and Verify How ExtendSim+OpEMCSS Works

• Change Process “C” Duplicate “C” in Split 2 from 1 to 2 and describe how duplicate2 is used to model multiple threads for process 3 at level 2.

• Run model in trace mode, draw timeline from trace, and compare to slides 6 and 10. Verify model scoreboard values using your time line.

Change Process “C” Duplicate “C” in Split 2 from 1 to 2

Change Assemble

Logic

Page 25: Clymer_4

25

Module 4: A Tool for Modeling Complex Systems

• Types of process interactions• How ExtendSim has been modified to

implement the OpEM language –Process identifiers and their Use– Timeline analysis of example process

• How blocks work together implement OpEM language

• How to model a system problem using OpEMCSS

• Summary

Page 26: Clymer_4

26

Define a System Problem Using Levels of System Description

• Requirements analysis proceeds from the top-down using levels of system description: Mission, Function, Parallel Process, Mission Attribute Interface (KPPs and rules), and Resources.

• Requirements are not understood until the resources level is reached where a simulation model provides the derived requirements such as values for KPPs, numbers of resources, and system management rules.

Page 27: Clymer_4

27

Model Development Tasks Perform Requirements Analysis Using 5 Levels of

System Description• Define the system to be evaluated and describe system

scenario or context. • Define the missions and mission objectives of the system

and measures of effectiveness. • Define objectives for study of each system solution using

the model. • List tasks that must be performed to achieve each mission

objective. • Subdivide tasks into periods of time represented by states

Page 28: Clymer_4

28

Model Development Tasks Perform Requirements Analysis Using 5 Levels of

System Description (Continued)• Group purely sequential tasks into the same processes

and tasks that can be performed concurrently into separate processes.

• Develop time-lines of concurrent states that describe system operation and assist visualization of system operation.

• Develop a directed graph model diagram on the computer screen using OpEMCSS and ExtendSim

• Generate traces to verify and validate model and modify the directed graph model diagram until satisfied.

• Execute model to achieve requirements analysis objectives

Page 29: Clymer_4

29

Define the System to be Evaluated and Describe System Scenario

• Scenario: System is a seaport in which ships arrive and enter the system by anchoring outside the breakwater area in the ship queuing area shown.

Ships arrive and enter

queue

When dock is available, tug moves ship to

dock

When loading and unloading is complete,

tug moves ship out of harbor

Page 30: Clymer_4

30

Steps Two and Three of Requirements Analysis

• Define Mission and MOEs: What the system must do to solve the user’s problem and how well it must do it.– Mission: Move cargo in and out of harbor– MOE1: Minimize wait time spent in ship queue– MOE2: Maximize harbor resource utilization

• Define Model Objectives: What questions model must answer dictates model details.– Determine optimal ship arrival rate for specified

alternative system KPP values (derived requirements tradeoff analysis)

Page 31: Clymer_4

31

Steps Four and Five of Requirements Analysis

• List tasks that must be performed to achieve each mission objective.– Move ship to dock– Move ship from dock– Unload/Load ship

• Subdivide tasks into periods of time represented by states– ARV: inter-arrival time for ships to enter system– WTD: wait for dock to become available– WTG: wait for tug boat to move ship into dock– MVD: tug move ship to dock– LDT: unload and load cargo– WTB: wait for tug boat to move ship away from dock– MVO: move ship out of harbor

Page 32: Clymer_4

32

Steps Six and Seven of Requirements Analysis

• Group purely sequential tasks into the same processes and tasks that can be performed concurrently into separate processes.–Ship Arrival Process: ARV–Ship Operation Process: WTD, WTG, MVD, LDT, WTB, MVO

• Develop time-lines of concurrent states that describe system operation and assist visualization of system operation.

WTB

Page 33: Clymer_4

33

Step Eight of Requirements Analysis• Develop a directed graph model diagram on the computer screen

using OpEMCSS and ExtendSim

Page 34: Clymer_4

34

Step Nine of Requirements Analysis• Generate traces to verify and validate model and modify the

directed graph model diagram until satisfied.

Page 35: Clymer_4

35

Step Ten of Requirements Analysis• Execute model to achieve requirements analysis

objectives.

Page 36: Clymer_4

36

Module 4: A Tool for Modeling Complex Systems

• Types of process interactions• How ExtendSim has been modified to

implement the OpEM language –Process identifiers and their Use– Timeline analysis of example process

• How blocks work together implement OpEM language

• How to model a system problem using OpEMCSS

• Summary

Page 37: Clymer_4

37

Summary Module 4: A Tool for Modeling Complex Systems

• How OpEM Language Blocks Work to Model Interacting Concurrent Processes

• How to Apply Ten Steps of Requirements Analysis to Build a Model and Apply It to Perform Tradeoffs and Derive Requirements.

The third (and final) step to understand a Complex or Adaptive Intelligent System is to iteratively improve

requirements’ clarity through simulation.