Simulation Lectures Final Copy
-
Upload
denisho-dee -
Category
Documents
-
view
226 -
download
0
Transcript of Simulation Lectures Final Copy
-
7/28/2019 Simulation Lectures Final Copy
1/202
COM 321: SIMULATION AND
MODELING
BY: TAREMWA DAN
mailto:[email protected]:[email protected] -
7/28/2019 Simulation Lectures Final Copy
2/202
CHAPTER ONE
INTRODUCTION TO SIMULATION
AND MODELING
-
7/28/2019 Simulation Lectures Final Copy
3/202
In this chapter you will learn:
Definitions and explain systems and
experiments
Definitions of model and simulation
Application of modeling and simulation
Advantages and disadvantages
Need for simulation and modeling Types of modeling and simulation paradigms
-
7/28/2019 Simulation Lectures Final Copy
4/202
Systems and Experiments
Definition:
A system is any set of interrelated components
acting together to achieve a common
objective.
-
7/28/2019 Simulation Lectures Final Copy
5/202
inputs
The inputsof a system are variables of
the environment that influence the
behavior of the system. These inputs mayor may not be controllable by us.
-
7/28/2019 Simulation Lectures Final Copy
6/202
outputs
The outputsof a system are variables that are
determined by the system and may influence
the surrounding environment. In many
systems the same variables act as both inputs
and outputs.
-
7/28/2019 Simulation Lectures Final Copy
7/202
METHODS OF STUDYING VARIABLES
EXPERIMENTATION
STATISTICS
SIMULATION
-
7/28/2019 Simulation Lectures Final Copy
8/202
Definition: experiment
An experimentis the process of extracting
information from a system by exercising its
inputs.
PRACTICAL PROBLEMS ASSOCIATED WITH
-
7/28/2019 Simulation Lectures Final Copy
9/202
PRACTICAL PROBLEMS ASSOCIATED WITH
PERFORMING AN EXPERIMENT
The experiment might be too expensive:
investigating ship durability by building ships
and letting them collide is a very expensive
method of gaining information.
The system needed for the experiment might
not yet exist. This is typical of systems to be
designed or manufactured.
-
7/28/2019 Simulation Lectures Final Copy
10/202
PRACTICAL PROBLEMS ASSOCIATED WITH
PERFORMING AN EXPERIMENT
The experiment might be too dangerous:
training nuclear plant operators in handling
dangerous situations by letting the nuclear
reactor enter hazardous states is not
advisable.
The shortcomings of the experimental
method lead us over to the model concept
-
7/28/2019 Simulation Lectures Final Copy
11/202
The Model Concept
A modelof a system is anything an
"experiment" can be applied to in order to
answer questions about that system.
A computer model is a data-driven system
that uses an inbuilt set of rules to predict the
results of a process or to simulate how a given
set of conditions will change over time
-
7/28/2019 Simulation Lectures Final Copy
12/202
Mathematical model
Definition:
Mathematicalmodel a description of a system
where the relationships between variables of
the system are expressed in mathematical
form. Variables can be measurable quantities
such as size, length, weight, temperature,
unemployment level, information flow, bitrate, etc.
-
7/28/2019 Simulation Lectures Final Copy
13/202
Modeling
Definition:
Modeling is the process of obtaining a set of
equations (mathematical model) that
describes the behavior of the system. A model
describes the mathematical relationship
between inputs and outputs.
-
7/28/2019 Simulation Lectures Final Copy
14/202
Physicalmodel
Physicalmodelthis is a physical object that
mimics some properties of a real system, to
help us answer questions about that system.
For example, during design of artifacts such asbuildings, airplanes, etc.,
-
7/28/2019 Simulation Lectures Final Copy
15/202
simulation
A simulationis an experiment performed on a
model.
formal definition of simulation: ``the process of
designing a model of a real system and
conducting experiments with this model for the
purpose either of understanding the behavior of
the system of or evaluating various strategies(within the limits imposed by a criterion or a set
of criteria) for the operation of the system.''
-
7/28/2019 Simulation Lectures Final Copy
16/202
Simulation is the imitation of the operation of a
real world system over time.
-
7/28/2019 Simulation Lectures Final Copy
17/202
WHEN IS SIMULATION AN APPROPRIATE TOOL?
Study Complex Systems
Evaluate effect of variables
Experiment with different designs Test scientific models
-
7/28/2019 Simulation Lectures Final Copy
18/202
WHEN IS SIMULATION AN APPROPRIATE TOOL?
Prior to building a real-world system
Provide training environment
Validate design Create proof of concept
-
7/28/2019 Simulation Lectures Final Copy
19/202
When NOT to Use Simulation
System is too simple
System is too complex
System is not understood well enough Real-world experiments are easier
Cost/benefit ratio > 1
No experts available to build simulator Simulation has already been done
-
7/28/2019 Simulation Lectures Final Copy
20/202
Advantages of simulation
Test new hardware before buying it
Insight about system can be gained
Speed up design-build-test-redesigncycle
Can be used to verify models ortheories
Can be used AS COMMUNICATIONTOOL
-
7/28/2019 Simulation Lectures Final Copy
21/202
9
Advantages of Simulation -contd.
Building consensus.
Preparing for change.
Cost effective investment. Training aid capability.
Specification of requirements.
-
7/28/2019 Simulation Lectures Final Copy
22/202
Disadvantages of Simulation
Model building often difficult and not unique
Results may be hard to interpret
Model and simulator may be too expensive May lead to false conclusions
Results are as good as the model
Bugs in software are unavoidable Requires human experts
-
7/28/2019 Simulation Lectures Final Copy
23/202
10
Disadvantages of Simulation
Training required.
Interpretation of results required.
Time consuming/expensive. Inappropriately used.
-
7/28/2019 Simulation Lectures Final Copy
24/202
11
Application Areas
Manufacturing/ Materials Handling
Public and Health Systems
Military Natural Resource Management
Transportation
Computer Systems Performance Communications
-
7/28/2019 Simulation Lectures Final Copy
25/202
Applications of Simulations
Designing and analyzing manufacturing
systems
Evaluating H/W and S/W requirements for a
computer system
Evaluating a new military weapons system or
tactics
Determining ordering policies for an inventory
system
-
7/28/2019 Simulation Lectures Final Copy
26/202
Applications of Simulation
Designing communications systems andmessage protocols for them
Designing and operating transportation
facilities such as freeways, airports, subways,or ports
Evaluating designs for service organizations
such as hospitals, post offices, or fast-foodrestaurants
Analyzing financial or economic systems
-
7/28/2019 Simulation Lectures Final Copy
27/202
Applications of Simulation
COMPUTER SYSTEMS: hardware components, softwaresystems, networks, data base management, information
processing, etc..
MANUFACTURING: material handling systems, assembly
lines, automated production facilities, inventory control
systems, plant layout, etc..
BUSINESS: stock and commodity analysis, pricing policies,
marketing strategies, cash flow analysis, forecasting, etc..
GOVERNMENT: military weapons and their use, military
tactics, population forecasting, land use, health care
delivery, fire protection, criminal justice, traffic control, etc..
-
7/28/2019 Simulation Lectures Final Copy
28/202
CHAPTER TWO
DEVELOPING SIMULATIONMODELS
-
7/28/2019 Simulation Lectures Final Copy
29/202
MODEL DEVELOPMENT PROCESS
The different phases of model development
The products at each phase of the model
development
-
7/28/2019 Simulation Lectures Final Copy
30/202
12
Steps in Simulation Modeling
Problem Formulation
Goal Setting
Model Conceptualization Data Collection
Model Translation
Verification and Validation
Experimental Design
-
7/28/2019 Simulation Lectures Final Copy
31/202
13
Steps in Simulation -contd.
Production Runs and Analysis
Documentation/Reporting
Implementation
-
7/28/2019 Simulation Lectures Final Copy
32/202
Simulation Procedure
Step 1: Define objective, scope, requirements
Step 2: Collect and analyze system data
Step 3: Build model
Step 4: Validate Model
Step 5: Conduct experiments
Step 6: Present resultsNote: Iterations required among steps
-
7/28/2019 Simulation Lectures Final Copy
33/202
Simulation Project Steps
a.- Problem Definition
b.- Statement of Objectives
c.- Model Formulation and Planning
d.- Model Development and Data Collectione.- Verification
f.- Validation
g.-Experimentation
h.- Analysis of Resultsi.- Reporting and Implementation
A Seven Step Approach for Conducting a
-
7/28/2019 Simulation Lectures Final Copy
34/202
A Seven-Step Approach for Conducting aSuccessful Simulation Study
In Figure 1 we present a seven-step
approach for conducting a successful
simulation study. Having a definitiveapproach for conducting a simulation
study is critical to the studys success in
general and to developing a valid model
in particular.
-
7/28/2019 Simulation Lectures Final Copy
35/202
-
7/28/2019 Simulation Lectures Final Copy
36/202
Step 1. Formulate the Problem
Problem of interest is stated by the decision-
maker
A kickoff meeting(s) for the simulation project
is (are) conducted, with the project manager,
the simulation analysts, and subject-matter
experts (SMEs) in attendance.
-
7/28/2019 Simulation Lectures Final Copy
37/202
Step 1. Formulate the Problem
The overall objectives of the study
The specific questions to be answered by the
study (without such specificity it is impossible
to determine the appropriate level of model
detail)
The performance measures that will be used
to evaluate the efficacy of different system
configurations
-
7/28/2019 Simulation Lectures Final Copy
38/202
Step 1. Formulate the Problem
The scope of the model
The system configurations to be modeled
The time frame for the study and the required
resources
Step 2 Collect Information/Data
-
7/28/2019 Simulation Lectures Final Copy
39/202
Step 2. Collect Information/Data
Collect information on the system layout and
operating procedures.
Collect data to specify model parameters and
probability distributions (e.g., for the time to
failure and the time to repair of a machine).
-
7/28/2019 Simulation Lectures Final Copy
40/202
Construct a Conceptual Model
Develop Causal loop diagrams which studies
the relationship between variables
Document the model assumptions,
algorithms, and data summaries in a written
conceptual model.
-
7/28/2019 Simulation Lectures Final Copy
41/202
Step 3. Is the Conceptual Model Valid?
Perform a structured walk-through of the
conceptual model before an audience that
includes the project manager, analysts, and
SMEs. This is called conceptual-modelvalidation.
-
7/28/2019 Simulation Lectures Final Copy
42/202
Is the Conceptual Model Valid?
If errors or omissions are discovered in the
conceptual model, which is almost always the
case, then the conceptual model must be
updated before proceeding to programming inStep 4.
-
7/28/2019 Simulation Lectures Final Copy
43/202
Step 4. Program the Model
Program the conceptual model in
either a commercial simulation-
software product or in a general-purpose programming language
(e.g., C or C++).
Verify (debug) the computer
program.
-
7/28/2019 Simulation Lectures Final Copy
44/202
Step 5. Is the Programmed Model Valid?
If there is an existing system, then
compare model performance
measures with the comparableperformance measures collected
from the actual system (see Step 2).
This is called results validation.
-
7/28/2019 Simulation Lectures Final Copy
45/202
What isface validity?
Regardless of whether there is an existing
system, the simulation analysts and SMEs
should review the simulation results for
reasonableness. If the results are
consistent with how they perceive the
system should operate, then the
simulation model is said to haveface
validity.
-
7/28/2019 Simulation Lectures Final Copy
46/202
What is Sensitivity analysis?
Sensitivity analyses should be
performed on the programmed
model to see which model factorshave the greatest effect on the
performance measures and, thus,
have to be modeled carefully.
-
7/28/2019 Simulation Lectures Final Copy
47/202
Step 6. Design, Make, and Analyze
Simulation Experiments
For each system configuration of
interest, decide on tactical issues
such as run length, warm up period,and the number of independent
model replications.
Analyze the results and decide if
additional experiments are required.
S 7 D d P h
-
7/28/2019 Simulation Lectures Final Copy
48/202
Step 7. Document and Present the
Simulation Results
The documentation for the model (and
the associated simulation study) should
include the conceptual model (critical forfuture reuse of the model), a detailed
description of the computer program,
and the results of the current study.
S 7 D d P h
-
7/28/2019 Simulation Lectures Final Copy
49/202
Step 7. Document and Present the
Simulation Results
The final presentation for the
simulation study should includeanimations and a discussion of the
model building/validation process to
promote model credibility.
-
7/28/2019 Simulation Lectures Final Copy
50/202
CHAPTER THREE
SYSTEM DYNAMICS
-
7/28/2019 Simulation Lectures Final Copy
51/202
More Goals of this course.
To learn how transfer CLDs to Stock & FlowDiagrams, SFDs
To learn how to implement SFDs in VENSIM
To learn how to parameterize a VENSIMmodel
To learn how to validate a VENSIM model
To learn how to conduct what-ifexperiments
To do sensitivity studies
-
7/28/2019 Simulation Lectures Final Copy
52/202
Definitions and Terms
ST--Systems Thinking
SD--Systems Dynamics
CLD--Causal Loop Diagram
BOT--Behavior Over Time Chart SFD--Stock & Flow Diagram
Also called Forrester Schematic, or simply FlowDiagram
quantity--any variable, parameter, constant, oroutput
edge--a causal link between quantities
-
7/28/2019 Simulation Lectures Final Copy
53/202
What is SYSTEM DYNAMICS?
Definition:
System dynamics is an approach to
understanding the behavior of complex
systems over time. It deals with internal
feedback loops and time delays that affect the
behavior of the entire system.
-
7/28/2019 Simulation Lectures Final Copy
54/202
System Dynamics Software
STELLA and I think High Performance Systems, Inc.
best fit for K-12 education
Vensim Ventana Systems, Inc. Free from downloading off their web site:
www.vensim.com
Robust--including parametric data fitting and optimization
best fit for higher education
PowerSim What Arthur Andersen is using
-
7/28/2019 Simulation Lectures Final Copy
55/202
What is system dynamics?
A way to characterize systems as stocks and flows
between stocks
Stocks are variables that accumulate the affects of
other variables Rates are variables the control the flows of material
into and out of stocks
Auxiliaries are variables the modify information as it
is passed from stocks to rates
-
7/28/2019 Simulation Lectures Final Copy
56/202
A Simple Methodology
Collect info on the problem
List variables on post-it notes
Describe causality using a CLD
Translate CLD into SFD
Enter into VENSIM
Perform sensitivity and validation studies
Perform policy and WHAT IF experiments Write recommendations
-
7/28/2019 Simulation Lectures Final Copy
57/202
Causal Modeling
A way to characterize the physics of the
system
Lacking: a Newton to describe the causality in
these socioeconomic systems
-
7/28/2019 Simulation Lectures Final Copy
58/202
Key Benefits of the ST/SD
A deeper level of learning Far better than a mere verbal description
A clear structural representation of the
problem or process A way to extract the behavioral implications
from the structure and data
A hands on tool on which to conduct WHATIF
-
7/28/2019 Simulation Lectures Final Copy
59/202
WHY A SYSTEMS PERSPECTIVE?
Problems facing us are more complexdue to increase
in
information flow
interdependencies
rate of change
Facilitates leadership by leveraged action
integrating competing priorities
acknowledging and handling unintendedconsequences
-
7/28/2019 Simulation Lectures Final Copy
60/202
The significant problems we face today
cannot be solved at the same level of thinkingat which they were created.
- Albert Einstein
-
7/28/2019 Simulation Lectures Final Copy
61/202
Examining how
WE CREATE OUR OWN PROBLEMS
Seeing the
BIG PICTURE
Recognizing thatSTRUCTURE INFLUENCES PERFORMANCE
WHAT IS SYSTEMS THINKING?
-
7/28/2019 Simulation Lectures Final Copy
62/202
Causal Loop Diagrams - a useful way to represent
dynamic interrelationships
Provide a visual representation with which to
communicate that understanding
Make explicit one's understanding of a system
structure - Capture the mental model
SYSTEMS THINKING TOOLS
Causal Loop Diagrams [CLDs]
-
7/28/2019 Simulation Lectures Final Copy
63/202
Causal Loop Diagrams [CLD s]
-
7/28/2019 Simulation Lectures Final Copy
64/202
Definition
Causal Loop Diagrams (CLDs) are structural
pictures used to convey understanding about
the interactions, or influences, within a
structure. A CLD is used to explicitly show the nature of
the influence relations between the elements
of a structure.
MAIN CONVENTIONS FOR
-
7/28/2019 Simulation Lectures Final Copy
65/202
MAIN CONVENTIONS FOR
REPRESENTING CLDS
There are two main conventions
for representing CLDs, one using"+" and "-" and another using "S"and "O" as indicators on the
influence from one element toanother.
-
7/28/2019 Simulation Lectures Final Copy
66/202
Meaning of +
A --> B with a "+" on the arrow
indicates that "A" adds to "B". If "A"
increases it adds even more to "B". If"A" decreases is adds less readily to
"B" though it still adds.
-
7/28/2019 Simulation Lectures Final Copy
67/202
Meaning of -
A --> B with a "-" on the arrow indicates that
"A" subtracts from "B". If "A" decreases is
subtracts even more readily to "B". If "A"
increases is still subtracts from "B" though notas readily.
Influence Structures
-
7/28/2019 Simulation Lectures Final Copy
68/202
Influence Structures
If I have two things, thing 1 and thing 2, there are onlytwo ways thing 1 can influence thing 2.
As indicated in Fig 1, thing 1 can add to thing 2, as
indicated by a "+" sign, thus increasing thing 2.
http://www.systemdynamics.org/wiki/index.php/File:Stint01.gi -
7/28/2019 Simulation Lectures Final Copy
69/202
examples
http://www.systemdynamics.org/wiki/index.php/File:Stint03.gi -
7/28/2019 Simulation Lectures Final Copy
70/202
Example
Costs Profits
--
Costs Losses
+
-
7/28/2019 Simulation Lectures Final Copy
71/202
EXAMPLE: POPULATION
Consider a simple population with infinite resources--food, water, air, etc. Given, mortality information interms of birth and death rates, what is thispopulation likely to grow to by a certain time?
Over a period of 200 years, the population isimpacted by both births and deaths. These are, inturn functions of birth rate norm and death ratenorm as well as population.
A population of 1.6 billion with a birth rate norm of.04 and a death rate norm of .028
-
7/28/2019 Simulation Lectures Final Copy
72/202
We Listed the Quantities
Population
Births
Deaths
Birth rate norm
Death rate norm
-
7/28/2019 Simulation Lectures Final Copy
73/202
CLD
Births
population
Deaths
Birth rate normal
Death rate normal
R
B
+
+
+
+
+
--
-
7/28/2019 Simulation Lectures Final Copy
74/202
Using VENSIM TO CONSTRUCT CLDs
Use the variable auxiliary/constant tool to establish
the quantities and their locations
Use the arrow tool to establish the links between
the quantities Use the Comment tool to mark the polarities of
the causal edges (links, arrows)
Use the Comment tool to mark the loops as
reinforcing or balancing
-
7/28/2019 Simulation Lectures Final Copy
75/202
Experiments with growth models
Models with only one rate and one state
Average lifetime death rates
Models in which the exiting rate is not a
function of its adjacent state
-
7/28/2019 Simulation Lectures Final Copy
76/202
Example:
Build a model of work flow from work undone towork completed.
This flow is controlled by a work rate.
Assume there are 1000 days of undone work
Assume the work rate is 20 completed days a month
Assume the units on time are months
Assume no work is completed initially.
-
7/28/2019 Simulation Lectures Final Copy
77/202
Causation vs. Correlation
Ice Cream Sales Murder rate
Ice Cream Sales 0 Murder rate 0
Average
Temperature
f
-
7/28/2019 Simulation Lectures Final Copy
78/202
Inadequate cause: Confusion
Market Share Unit Costs
--
Market Share Unit Costs
Production
Volume
Cumulative Production
Experience+ +
-
l d f
-
7/28/2019 Simulation Lectures Final Copy
79/202
Validation of CLDs
Clarity Quantity existence
Connection edge existence
Cause sufficiency Additional cause possibility
Cause/effect reversal
Predicted effect existence
Tautology
-
7/28/2019 Simulation Lectures Final Copy
80/202
CLD Examples
Salary VS Performance
Salary Performance
Performance Salary
Salary Performance
Tired VS Sleep Tired sleep
Sleep tired
Tired Sleep
Augmenting CLD 1
-
7/28/2019 Simulation Lectures Final Copy
81/202
Augmenting CLD 1
(Labeling Link Polarity)
Signing: Add a + or a sign at each arrowhead to
convey more information
A + is used if the cause increase, the effect increases
and if the cause decrease, the effect decreases A - is used if the cause increases, the effect
decreases and if the cause decreases, the effect
increases
Si i A
-
7/28/2019 Simulation Lectures Final Copy
82/202
Signing Arcs
Salary Performance
+
+
+
-
Tired Sleep
Reinforcing Loop
-
7/28/2019 Simulation Lectures Final Copy
83/202
Reinforcing Loop
Definition 1: A reinforcing loop is one in whichthe interactions are such that each action adds to
the other. Any situation where action produces a
result which promotes more of the same action,it is representative of a reinforcing loop.
An increase in quantity 1 produces an increase in
quantity 2
A decrease in quantity 1 produces a decrease in
quantity 2
EXAMPLE
-
7/28/2019 Simulation Lectures Final Copy
84/202
EXAMPLE
EXAMPLE
http://www.systemdynamics.org/wiki/index.php/File:Stint06.gi -
7/28/2019 Simulation Lectures Final Copy
85/202
EXAMPLE
Fig 1 indicates what happens in a typical
savings account. The principal in the
savings account interacts with the
interest rate and adds to the interest.
Note that interest rate is considered to
be a constant in this example. Interest
then adds to the principal.
Balancing Loop
-
7/28/2019 Simulation Lectures Final Copy
86/202
g p
Definition 1:
A balancing loop is one in which
action attempts to bring two thingsto agreement. Any situation where
one attempts to solve a problem or
achieve a goal or objective isrepresentative of a balancing loop.
EXAMPLE
-
7/28/2019 Simulation Lectures Final Copy
87/202
EXAMPLE
EXPLANATION
http://www.systemdynamics.org/wiki/index.php/File:Stint07.gi -
7/28/2019 Simulation Lectures Final Copy
88/202
EXPLANATION
Fig 2 provides the basic form of the balancingloop. The desired state interacts with the
current state to produce a gap. The gap adds
to the action and the action adds to thecurrent state. The current state then subtracts
from the gap.
Si f l
-
7/28/2019 Simulation Lectures Final Copy
89/202
Signs of loops
reinforcing loops have an even number ofnegative links (zero also is even, see example
above)
Balancing loops have an uneven number ofnegative links.
Si f l
http://en.wikipedia.org/wiki/Reinforcing_loophttp://en.wikipedia.org/w/index.php?title=Balancing_loop&action=edit&redlink=1http://en.wikipedia.org/w/index.php?title=Balancing_loop&action=edit&redlink=1http://en.wikipedia.org/wiki/Reinforcing_loop -
7/28/2019 Simulation Lectures Final Copy
90/202
Sign of loops
B l i LOOP
-
7/28/2019 Simulation Lectures Final Copy
91/202
Balancing LOOP
Note: A Negative sign on an information link
can be seen by saying either of:
An increase in quantity 1 produces a decrease
in quantity 2
Population model
-
7/28/2019 Simulation Lectures Final Copy
92/202
Population model
Augmenting CLD 2
-
7/28/2019 Simulation Lectures Final Copy
93/202
g g
(Determining Loop Polarity)
Positive feedback loops Have an even number of signs
Some quantity increase, a snowball effect takes over and thatquantity continues to increase
The snowball effect can also work in reverse
Generate behaviors of growth, amplify, deviation, and reinforce
Notation: place symbol in the center of the loop
Negative feedback loops Have an odd number of signs
Tend to produce stable, balance, equilibrium and goal-seekingbehavior over time
Notation: place symbol in the center of the loop
+
-
CLD i h P i i F db k L
-
7/28/2019 Simulation Lectures Final Copy
94/202
CLD with Positive Feedback Loop
Salary Performance, Performance Salary
Salary Performance
The better I perform
The more salary I get
The more salary I get
The better I perform
+
+
+
The more salary I get
The better I perform
CLD i h N i F db k L
-
7/28/2019 Simulation Lectures Final Copy
95/202
CLD with Negative Feedback Loop
Tired Sleep
The more tired I amThe more I sleep
The more I sleep The less tired I am
The less tired I am
The less I sleep
The less I sleep The more tired I am
+
-
-
Tired Sleep, Sleep Tired
Loop Dominance
-
7/28/2019 Simulation Lectures Final Copy
96/202
Loop Dominance
There are systems which have more than one feedbackloop within them
A particular loop in a system of more than one loop is most
responsible for the overall behavior of that system
The dominating loop might shift over time
When a feedback loop is within another, one loop must
dominate
Stable conditions will exist when negative loops dominate
positive loops
CLD with Combined Feedback Loops
-
7/28/2019 Simulation Lectures Final Copy
97/202
p
(Population Growth)
Birth rate Polulation Death rate-+
+ +
+ -
CLD with Nested Feedback Loops
-
7/28/2019 Simulation Lectures Final Copy
98/202
(Self-Regulating Biosphere)
Sunshine
EvaporationA mount of
water on earth
RainClouds
Earths
temperature-
+
-
+
+
+
+ +
+
+
+-
-
Evaporation clouds rain amount of water evaporation
E It
-
7/28/2019 Simulation Lectures Final Copy
99/202
Exogenous Items
Items that affect other items in the system but are not
themselves affected by anything in the system
Arrows are drawn from these items but there are no
arrows drawn to these items
Sunlight reaching
each plant Density of plants
Sunlight +
+
-
-
Reinforcing Loop: Structure
-
7/28/2019 Simulation Lectures Final Copy
100/202
Reinforcing Loop: Structure
Growth rate
Population
Sales
Satisfied
Custome
ositive word of
mouth
Reinforcing Loop: Behavior
-
7/28/2019 Simulation Lectures Final Copy
101/202
Reinforcing Loop: Behavior
Population
20 B
10 B
00 20 40 60 80 100 120 140 160 180 200
Time (Year)
Population : pop1
Population : Current
Balancing Loop: Structure
-
7/28/2019 Simulation Lectures Final Copy
102/202
Balancing Loop: Structure
Desired
Inventory
Actual
inventory
Inventory
gapOrder rate
OB
Balancing Loop: Behavior
-
7/28/2019 Simulation Lectures Final Copy
103/202
Balancing Loop: Behavior
Inventory
1,000
500
0
0 10 20 30 40 50 60 70 80 90 100
Time (Month)
Inventory : inv1
Importance of Causal Loop Diagrams
-
7/28/2019 Simulation Lectures Final Copy
104/202
(CLDs).
Causal Loop diagrams are used to documentrelevant factors and the causal relationships
between them.
CLDs consist of factors and links connectingthe factors. Any link has annotations about its
polarity and delay.
Used as a communication tool
-
7/28/2019 Simulation Lectures Final Copy
105/202
CHAPTER FOUR
STOCK AND FLOW DIAGRAMS
SYSTEMS DYNAMICS
-
7/28/2019 Simulation Lectures Final Copy
106/202
Definition: System dynamics is an approachto understanding the behavior of complex
systems over time. It deals with internal
feedback loops and time delays that affect thebehavior of the entire system.
DYNAMIC MODEL BUILDING BLOCKS
-
7/28/2019 Simulation Lectures Final Copy
107/202
STOCKS
FLOWS
CONNECTORS CONVERTORS
stock
-
7/28/2019 Simulation Lectures Final Copy
108/202
stock
In STELLA terminology, a stock is a noun andrepresents something that accumulates.
Some examples of stocks are population,
radioactivity, enzyme concentration, self-esteem, and money.
Principle of Accumulation
-
7/28/2019 Simulation Lectures Final Copy
109/202
Principle of Accumulation
In system dynamics modeling, dynamicbehavior is thought to arise due to the
Principle of Accumulation. According to the
principle of accumulation, dynamic behaviorarises when something flows through the pipe
and faucet assembly and collects or
accumulates in the stock.
flow
-
7/28/2019 Simulation Lectures Final Copy
110/202
flow
While a stock is a noun in the language of
STELLA, a flow is a verb. A flow is an activity
that changes the magnitude of a stock. Someexamples of such activities are births in a
population, decay of radioactivity, formation
of an enzyme, improvement of self-esteem,and growth of money.
Figure 2: Example stock and flow
-
7/28/2019 Simulation Lectures Final Copy
111/202
Figure 2: Example stock and flow
structure with an inflow and outflow
Total Population Derived From Other
-
7/28/2019 Simulation Lectures Final Copy
112/202
Quantities
Children
Births Coming to Age
Total Population
Adult population
Dearths
Identifying Stocks and Flows
-
7/28/2019 Simulation Lectures Final Copy
113/202
Stocks usually represent nouns Flows usually represent verbs.
Stocks do not disappear if time is
(hypothetically) stopped (i.e., if a snapshotwere taken of the system);
Flows do disappear if time is (hypothetically)stopped.
Stocks send out signals (information about thestate of the system) to the rest of the system.
DYNAMIC MODEL BUILDING BLOCKS
-
7/28/2019 Simulation Lectures Final Copy
114/202
DYNAMIC MODEL BUILDING BLOCKS
Converter :
converts, stores equation or constant,
does not accumulateConnector: transmits inputs and
information
Characteristics of stock
-
7/28/2019 Simulation Lectures Final Copy
115/202
Characteristics of stock
Have memory,
Change the time shape of flows,Decouple flows,
Create delays.
HAVE MEMORY,
-
7/28/2019 Simulation Lectures Final Copy
116/202
If the inflow to the stock is shut-off, thenumber of entities in the stock will not
decrease, but rather stay at the level it is
at when the inflow stops. An outflow inexcess of the inflow is required to
decrease the number of entities in the
stock.
CHANGE THE TIME SHAPE OF FLOWS
-
7/28/2019 Simulation Lectures Final Copy
117/202
CHANGE THE TIME SHAPE OF FLOWS
A second important characteristic ofstocks is that they (i.e., the accumulation
process) usually change the time shape
of flows. This can be seen by simulatingthe simple stock-flow structure shown in
Figure 1, with different time shapes for
the flow.
PRESENTS THE TIME SHAPE OF THE STOCK
-
7/28/2019 Simulation Lectures Final Copy
118/202
WHEN THE FLOW IS AT A CONSTANT LEVEL
OF 5 UNITS/TIME
STOCKS DECOUPLE FLOWS
http://www.systemdynamics.org/DL-In -
7/28/2019 Simulation Lectures Final Copy
119/202
A third important characteristic of stocksis that they "decouple" or
interrupt/change flows. A stock thus
makes it possible for an inflow to bedifferent from an outflow and hence for
disequilibrium behavior to occur.
Population model
-
7/28/2019 Simulation Lectures Final Copy
120/202
10/10/2012 120
Population model
Taremwa and Lydon
Examples where flows are decoupled
b t k
-
7/28/2019 Simulation Lectures Final Copy
121/202
by stocks
CREATES DELAYS
-
7/28/2019 Simulation Lectures Final Copy
122/202
CREATES DELAYS
Systems often respond sluggishly
From the example below, once the trees are planted, the
harvest rate can be 0 until the trees grow enough to
harvest
# of growing trees Harvest rate
Planting rate+
+
-
-
delay
Some rules for translating CLDs into
SFDs
-
7/28/2019 Simulation Lectures Final Copy
123/202
SFDs
There are two types of causal links in causalmodels (but we dont distinguish betweenthem)
Information
Flow
1. Information proceeds from stocks andparameters/inputs toward rates where it isused to control flows
2. Flow edges proceed from rates to states(stocks) in the causal diagram always
Figure : casual loop diagram of the
k t d l
-
7/28/2019 Simulation Lectures Final Copy
124/202
pocket money model
Stock and flow diagrams
-
7/28/2019 Simulation Lectures Final Copy
125/202
g
Stock and Flow Notation--Quantities
-
7/28/2019 Simulation Lectures Final Copy
126/202
STOCK
RATE
Auxiliary
Stock
Rate
i1
i2
i3
Auxiliary
o1
o2
o3
Stock and Flow Notation--Quantities
-
7/28/2019 Simulation Lectures Final Copy
127/202
Input/Parameter/Lookup
Have no edges directed toward them
Output
Have no edges directed away from them
i1
i2
i3
o
o2
o3
Inputs and Outputs
-
7/28/2019 Simulation Lectures Final Copy
128/202
p p
Inputs
Parameters
Lookups
Outputs
Input/Parameter/Lookup
a
b
c
Stock and Flow Notation--edges
-
7/28/2019 Simulation Lectures Final Copy
129/202
g
Information
Flow
a b
x
-
7/28/2019 Simulation Lectures Final Copy
130/202
e
-
7/28/2019 Simulation Lectures Final Copy
131/202
System Dynamics
Modeling with
STELLA software
Learning objective
-
7/28/2019 Simulation Lectures Final Copy
132/202
After this class the students should be able to: Understand basic concepts of system dynamics,
Stock Variable;
Flow Variable;
Information Flow;
Material Flow; and Time Delay;
Understand how these basics elements interact withpolicies and decisions to determine the behavior ofdynamic systems.
Time Management
-
7/28/2019 Simulation Lectures Final Copy
133/202
The expected time to deliver this module is 50
minutes. 20 minutes are reserved for teampractices and exercises and 30 minutes for
lecture.
System Dynamics
-
7/28/2019 Simulation Lectures Final Copy
134/202
Methodology to study systems behavior
It is used to show how the interaction between structures of the
systems and their policies determine the system behavior
Approach developed to study system behaviors taking into
account complex structures of feedbacks and time delays
Warm-up
-
7/28/2019 Simulation Lectures Final Copy
135/202
Each team is invited to describe through any kind of diagram the
process to fill a cup of water.
Imagine this as an exercise of operation management
(5 minutes)
Feedback Loop
-
7/28/2019 Simulation Lectures Final Copy
136/202
Feedback refers to the situation of X affecting Y and Y inturn affecting X perhaps through a chain of causes and
effects.
Z
XY
Time Delay
-
7/28/2019 Simulation Lectures Final Copy
137/202
\Its the time between the action and the result(consequence) of this action.
Y
X
Time Delay
Causal Diagram
-
7/28/2019 Simulation Lectures Final Copy
138/202
DesiredWater
Level
Perceived
Gap
Faucet
Position
Water
Flow
Current
Water
Level
Population Dynamic
-
7/28/2019 Simulation Lectures Final Copy
139/202
feedbacks and time delays
Births Population Deaths
++
+ -
Basic Elements
-
7/28/2019 Simulation Lectures Final Copy
140/202
This methodology use five basics elements:
Stock Variable;
Flow Variable;
Information Flow;
Material Flow; and Time Delay
Object Oriented Language
-
7/28/2019 Simulation Lectures Final Copy
141/202
Activity
Material Flow
Information Flow
Stock
Converter
A Model
-
7/28/2019 Simulation Lectures Final Copy
142/202
Control
Material Flawto Stock
Add Newinformation
Sendinformation
from the Stock
Control
Material Flawfrom Stock
Stock
Exploring a simple example
-
7/28/2019 Simulation Lectures Final Copy
143/202
To explore modeling with STELLA, we will developinteractively with you, a basic model of the dynamics of a
fish population.
Assume you are the owner of a pond thatis stocked with
200 fish that all reproduce at a fixed rate of 5% per year. For simplicity, assume also that none of the fish die. How
many fish will youown after 20 years?
Stock - Fish Inventory
-
7/28/2019 Simulation Lectures Final Copy
144/202
We begin with the first tool, a stock (rectangle). Inour example model, the stock will represent the
number of fish in our pond.
This stock is known as a reservoir. In our model, thisstock represents the number of fish we have in this
time are in our the pond
Figure 1
Click here to
open the stella
software
What control the number of fish
-
7/28/2019 Simulation Lectures Final Copy
145/202
As we assumed that the fish in our pond never die,
we have one control variable: REPRODUCTION.
We use the flow tool (the right-pointing arrow, second from
the left) to represent the control variable, so named because it
controls the states (variables).
Figure 2
200 Fishes
Converter
-
7/28/2019 Simulation Lectures Final Copy
146/202
Next we need to know how the fish in our populationreproduce, that is, how to accurately estimate the numberof new fish per annum. Remember? We assumed our fishpopulation reproduce at 5% per year.
This can be represented as a transforming variable. Atransforming variable is expressed as a converter, the circlethat is second from the right in the STELLA toolbox.
Connector
-
7/28/2019 Simulation Lectures Final Copy
147/202
At the right of the STELLA, toolbox is the connector(informationarrow). We use the connector to pass on information about the
REPRODUCTION RATE to REPRODUCTION and another to pass on
information from FISH population to REPRODUCTION.
Figure 3
Our first model
-
7/28/2019 Simulation Lectures Final Copy
148/202
Once you draw the information arrow from the transformingvariable REPRODUCTION RATE to the control and from the stockFISH to the control, open the control (REPRODUCTION) andconverter (REPRODUCTION RATE) and type respectively 5/100and the equation: REPRODUCTION RATE* FISH
Figure 4
200
5/100
REPRODUCTION RATE*FISH
Run the model
-
7/28/2019 Simulation Lectures Final Copy
149/202
We get Figure 5. We see a graph of exponential growth of thefish population in your pond.
Figure 5
What-if?
-
7/28/2019 Simulation Lectures Final Copy
150/202
From now on, the professor can practice what-if with the teams
For example:
What would happen if we decided to extract fish at a constant rate of
3% per year, and the reproduction rate varied with the fish population as
it is seen in figure 6?
Figure 6
New model
-
7/28/2019 Simulation Lectures Final Copy
151/202
Results
-
7/28/2019 Simulation Lectures Final Copy
152/202
Figure 7
Reference
-
7/28/2019 Simulation Lectures Final Copy
153/202
The Fifth Discipline. Peter Senge, Currency Doubleday,1994, Chapter 5.
Modeling Dynamic Economic System. Ruth, M. & Hannon,B. Springer, 1997, Chapter 1
-
7/28/2019 Simulation Lectures Final Copy
154/202
MORE EXAMPLES
Increasing Crime
-
7/28/2019 Simulation Lectures Final Copy
155/202
Behaviour
System Structure
EventsDrugs are a big worry for me. Not leastbecause of the crimes that people commit
to fund their dependency. We want the
policy to bust these rings and destroy the
drugs. They say theyre doing it and they
keep showing us sacks of cocaine that they
seized but the crime problem seems to be
getting worse
Increasing Crime
-
7/28/2019 Simulation Lectures Final Copy
156/202
Behaviour
System Structure
EventsWhat are the main variables described in the statement?
What is the reference mode (behaviour) of this system?
Time
Increasing Crime
-
7/28/2019 Simulation Lectures Final Copy
157/202
Behaviour
System Structure
Events
What is the structure of this system?
What is the causal loop diagram whichexplains the observed behaviour?
Call for Police
Action
Drug Seizures
Supply
Price
Demand
Drug Related
Crime
Building construction
-
7/28/2019 Simulation Lectures Final Copy
158/202
Problem statement Fixed area of available land for construction
New buildings are constructed while old buildings are demolished
Primary state variable will be the total number of buildings over time
Causal Graph
Industrial
buildingsDemolitionConstruction
Fraction ofland occupied
Construction
fractionAverage
lifetimefor buildings
Average area
per building
Land available for
Industrial buildings
+
+
+
+
+
+ -
-
-
-
Simulation models
-
7/28/2019 Simulation Lectures Final Copy
159/202
Industrial
Buildings (B)
Construction (C) Demolition (D)
Construction
fraction
(CF)Fraction of
land occupied
(FLO)Land available for
industrial buildings (LA)
Average area per
building (AA)
Average lifetime for
buildings (AL)
Equations
dBl/dt = Cr Dr
Cr = f1(CF, Bl)
Dr = f2(AL,Bl)CF = f3(FLO)
FLO = f4(LA,AA,Bl)
Flow Graph
-
7/28/2019 Simulation Lectures Final Copy
160/202
SIMULATION MODEL VALIDATION
AND CREDIDILITY
SIMULATION MODEL VALIDATION
-
7/28/2019 Simulation Lectures Final Copy
161/202
Validation ensures that the model meets itsintended requirements in terms of the methods
employed and the results obtained
The ultimate goal of model validation is to make
the model useful in the sense that the model
addresses the right problem, provides accurate
information about the system being modeled and
to makes the model actually used.
Definition: Validation
-
7/28/2019 Simulation Lectures Final Copy
162/202
Validation is theprocess of determiningwhether a simulation model (as opposed
to the computer program) is an accurate
representation of the system,for theparticular objectives of the study.
Definition: Operational validation
-
7/28/2019 Simulation Lectures Final Copy
163/202
Operational validation is defined asdetermining that the models output
behavior has sufficient accuracy for the
models intended purpose over thedomain of the models intended
applicability
Definition: Data validity
-
7/28/2019 Simulation Lectures Final Copy
164/202
Data validityis defined as ensuring thatthe data necessary for model building,
model evaluation and conducting the
model experiments to solve the problemare adequate and correct.
Definition: Verification
-
7/28/2019 Simulation Lectures Final Copy
165/202
Verification is concerned withdetermining whether the conceptual
simulation model (model assumptions)
has been correctly translated into acomputer program, i.e., debugging the
simulation computer program.
Verification
-
7/28/2019 Simulation Lectures Final Copy
166/202
A simulation model and its results havecredibilityif the manager and other project
personnel accept them as "correct.
A credible model is not necessarily valid, and
vice versa.
The following things help establishcredibility for a model:
-
7/28/2019 Simulation Lectures Final Copy
167/202
The decision-makers understanding andagreement with the models assumptions
Demonstration that the model has been
validated and verified (i.e., that the modelcomputer program has been debugged)
The decision-makers ownership of and
involvement with the project Reputation of the model developers
Model validation process
-
7/28/2019 Simulation Lectures Final Copy
168/202
TECHNIQUES FOR INCREASING
-
7/28/2019 Simulation Lectures Final Copy
169/202
TECHNIQUES FOR INCREASING
MODEL VALIDITY ANDCREDIBILITY
Formulating the Problem Precisely
-
7/28/2019 Simulation Lectures Final Copy
170/202
It is critical to formulate the problem of
interest in a precise manner. This should
include an overall statement of the problem tobe solved, a list of the specific questions that
the model is to answer, and the performance
measures that will be used to evaluate the
efficacy of particular system configurations.
Interviewing Subject-Matter Experts
-
7/28/2019 Simulation Lectures Final Copy
171/202
There will never be a single person that knows
all of the information necessary to build a
simulation model. Thus, it will be necessaryfor the simulation analysts to talk to many
different SMEs to gain a complete
understanding of the system to be modeled.
Interacting with the Decision-Maker
on a Regular Basis
-
7/28/2019 Simulation Lectures Final Copy
172/202
One of the most important ideas for
developing a valid and credible model is
for the analyst to interact with thedecision-maker and other members of
the project team on a regular basis.
Collect high-quality information and
data on the system
-
7/28/2019 Simulation Lectures Final Copy
173/202
Conversation with subject matter experts in MS,machine operators, engineers, maintenancepersonnel, schedulers, managers, vendors,
Observation of the system
Data are not representative of what one reallywants to model
Data are not of the appropriate type or format
Data may contain measurement, recording, or rounding
errors Data may be biased because of self interest
Data may be inconsistent
Interact with the manager on a
regular basis
-
7/28/2019 Simulation Lectures Final Copy
174/202
There may not be a clear idea of theproblem to be solved at initiation of the
study.
The managers interest and involvement inthe study are maintained.
The managers knowledge of the system
contributes to the actual validity of themodel
This approach has the following keybenefits:
-
7/28/2019 Simulation Lectures Final Copy
175/202
Helps ensure that the correct problem is solved
The exact nature of the problem may not be initiallyknown.
The decision-maker may change his/her objectivesduring the course of the study.
The decision-makers interest and involvement in thestudy are maintained.
The model is more credible because the decision
maker understands and agrees with the modelsassumptions.
QUESTION
-
7/28/2019 Simulation Lectures Final Copy
176/202
A military analyst worked on a simulationproject for several months without interacting
with the general who requested it. At the final
Pentagon briefing for the study, the general
walked out after five minutes stating, Thats
not the problem Im interested in.
Using Quantitative Techniques to
Validate Components of the Model
-
7/28/2019 Simulation Lectures Final Copy
177/202
USING STATISTICAL RESULTS
If one has fit a theoretical probability
distribution (e.g., exponential or normal) to aset of observed data, then the adequacy of
the representation can be assessed by using
graphical plots and goodness-of-fit tests
Documenting the Conceptual Model
-
7/28/2019 Simulation Lectures Final Copy
178/202
Communication errors are a major reason whysimulation models very often contain invalidassumptions. Documenting all assumptions,
algorithms, and data summaries can lessenthis problem. This report is the majordocumentation for the model and should be
readable by analysts, SMEs, and decision-makers alike.
Performing Sensitivity Analyses to
Determine Important Model Factors
-
7/28/2019 Simulation Lectures Final Copy
179/202
An important technique for determiningwhich model factors have a significant
impact on the desired measures of
performance is sensitivity analysis. If aparticular factor appears to be
important, then it needs to be modeled
carefully.
MODEL VERIFICATION
-
7/28/2019 Simulation Lectures Final Copy
180/202
Step 1: Write and debug the computerprogram on modules or subprograms.
Step 2: More than one person review the
computer program (structured walkthroughof the program).
Step 3: Run the simulation under a variety of
settings of input parameters, and check tosee that the output is reasonable.
MODEL VERIFICATION
-
7/28/2019 Simulation Lectures Final Copy
181/202
Step 4: "trace", interactive debugger.
Step 5: The model should be run under
simplifying assumptions for which its true
characteristics are known or can easily becomputed.
Step 6: Observe an animation of the
simulation output.
MODEL VERIFICATION
-
7/28/2019 Simulation Lectures Final Copy
182/202
Step 7: Compute the sample mean andvariance for each simulation input probability
distribution, and compare them with the
desired mean and variance.
Step 8: Use a commercial simulation package
to reduce the amount of programming
required.
VALIDATION SCHEMES
-
7/28/2019 Simulation Lectures Final Copy
183/202
Structure-Verification Test: This test ismeant to answer the following question
Is the model structure not in
contradiction to the knowledge aboutthe structure of the real system, and
have the most relevant structures of the
real system been modeled?
Dimensional-Consistency Test:
-
7/28/2019 Simulation Lectures Final Copy
184/202
Do the dimensions of the variablesin every equation balance on each
side of the equation? This test
verifies whether all equations are
dimensionally constant.
-
7/28/2019 Simulation Lectures Final Copy
185/202
Boundary-Adequacy Test:
-
7/28/2019 Simulation Lectures Final Copy
186/202
This test verifies whether the modelstructure is appropriate for the model
purpose.Is the model aggregation
appropriate and includes all relevantstructure containing the variables and
feedback effects necessary to address
the problem and suit the purposes of thestudy?
-
7/28/2019 Simulation Lectures Final Copy
187/202
CHAPTER SIXBUILT IN FUNCTIONS
BUILT IN FUNCTIONS
-
7/28/2019 Simulation Lectures Final Copy
188/202
The software's test input Builtins enable youto conduct controlled experiments on your
model. Typically, a PULSE, RAMP or STEP is
appended to an inflow or outflow equation.
When the Built-in is activated (at the time you
specify) it will knock the system out of its
previous state. You can then observe how your
model responds to this idealized test.
PULSE FUNCTION
-
7/28/2019 Simulation Lectures Final Copy
189/202
PULSE([,,]) The PULSE function generates a pulse input of
a specified size (volume). In using the PULSE
function, you have the option of setting thetime at which the PULSE will first fire (first
pulse), as well as the interval between
subsequent PULSEs (interval).
PULSE FUNCTION
-
7/28/2019 Simulation Lectures Final Copy
190/202
Each time that it fires a pulse, the softwarepulses the specified volume over a period of
one time step (DT). Thus, the instantaneous
value taken on by the PULSE function is
volume/DT. Volume can be either variable or
constant. First pulse and interval should be
specified as constants.
EXAMPLE
-
7/28/2019 Simulation Lectures Final Copy
191/202
Draw the stock and flow pattern generated bythe following equations:
Flow = PULSE(20,10,10)
Flow = PULSE(10,15,10) Flow = PULSE(20,30,40)
REFER TO STELA HELP.
RAMP
-
7/28/2019 Simulation Lectures Final Copy
192/202
RAMP([,]) The RAMP function generates a linearly
increasing or decreasing input over time with aspecified slope (slope). Optionally, you may set
the time at which the ramp begins. Slope andtime can be either variable or constant.
As the simulation progresses, the RAMP willreturn a 0 before its time to begin has been
reached. If you do not set the RAMP's time, it willbegin at the outset of the simulation.
EXAMPLE
-
7/28/2019 Simulation Lectures Final Copy
193/202
Draw the stock and flow pattern generated bythe following equations:
Pamp_Input =RAMP(25,5)
Pamp_Input =RAMP(5,15)
Pamp_Input =RAMP(15,15)
Pamp_Input =RAMP(5,5)
STEP FUNCTION
-
7/28/2019 Simulation Lectures Final Copy
194/202
STEP(,) The STEP function generates a one-time step
change of specified height (height), which
occurs at a specified time (time). Height andtime can be either variable or constant.
Example:
Step_Input = 5 + STEP(5,10) generates thebehavior pattern.
EXAMPLE
-
7/28/2019 Simulation Lectures Final Copy
195/202
Draw the stock and flow pattern generated bythe following equations:
Step_Input = STEP(20, 20)
Step_Input = 10 + STEP(20, 20)
Step_Input = 20 + STEP(20, 20)
Step_Input = 5 + STEP(20, 10) + STEP(20, 20)
Step_Input = 10 + STEP(10, 20)+ STEP(25, 20)
Graphical Functions
-
7/28/2019 Simulation Lectures Final Copy
196/202
The Become Graph button at the lower left ofthe dialog enables you to define the converter
as a graphical function. Graphical functions
also may be defined from within a flow dialog.
Definition: graphical function
-
7/28/2019 Simulation Lectures Final Copy
197/202
A graphical function is a sketch of arelationship between some input (which itself
can be an algebraic relationship defined from
the Required Inputs list and/or Builtins list)
and an output.
Using graphical function
-
7/28/2019 Simulation Lectures Final Copy
198/202
Once the input has been defined in theequation box, a click on Become Graph leads
you to the graphical function define dialog.
Using graphical function
-
7/28/2019 Simulation Lectures Final Copy
199/202
Set the min and max values for the X-axis.Type numbers within the two fields below thegraphical function grid. The number in the leftfield (the min value) must be less than the
number in the right field (the max value). Hitthe tab key to move from field to field. Theminimum and maximum values you choosefor the X-axis will be reflected in the non-
editable left column (input), to the right of theaxes.
Using graphical function
-
7/28/2019 Simulation Lectures Final Copy
200/202
Set the min and max values for the Y-axis.Type numbers within the two fields to the left
of the graphical function grid. The number in
the bottom field (the min value) must be less
than the number in the top field (the max
value). Hit the tab key to move from field to
field.
Using graphical function
-
7/28/2019 Simulation Lectures Final Copy
201/202
Set the number of data points. Type a numberinto the Data Points field, found below the
two columns of numbers. You must have at
least two data points in a graphical function.
You can have up to 1500 data points. When a
graphical function contains more than 13 data
points, the grid becomes scrollable. To view
the entire function, depress the alt key(Windows) or option key (Macintosh).
Using graphical function
-
7/28/2019 Simulation Lectures Final Copy
202/202
Create a relationship. Click-and-hold thecursor within the grid. As you drag the cursor,
a curve will be drawn, following your mouse
movements. In addition, the Y-axis
coordinates of the curve will be displayed in
the right column (output) at the far right of
the dialog.