FlexSim Core Training 2021
FlexSim Core Training 2021
1
Chapter 1
Introduction to
Simulation
2
What is Simulation?
3
Discrete-Event Simulation (DES)
- Used to model systems which change state at discrete points in time as
a result of the execution of events.
5
What is a Simulation Model?
• A purposeful abstraction of a real life
system which can be used to answer
questions or solve problems.
6
Time Management
– Queuing occurs naturally as requests are made on an
entity faster than they can be processed.
7
Modeling Project
Questions to ask yourself (and others) when planning a
model project:
• Why build a model at all? What insight are you trying to gain?
• What is the central actor in your model?
– Can they/should they be categorized into types?
– What kinds of arrival patterns do they exhibit?
– ‘Where’ do they go, how long are they ‘there’?
• Not necessarily physically.
– What limited resources need to be available to them? Machines? Tools?
• To what degree does physical layout affect model behavior?
– Sizes, distances, planned routes, etc. 8
Chapter 2
9
Starting a New Model
• How do you measure time and distance in
your model?
– The default units of time and distance are seconds and
meters, respectively. Units are set per model and once
chosen they cannot be changed.
– Defaults can be
changed for future models in the Global Preferences.
• The model clock will display time in either
elapsed number of units or as the model’s
date and clock time.
10
FlexSim’s 3D Object Library
• Library – a list of class objects to be used in
building a 3D model. User
customizable/expandable for specific Modeling
needs.
11
3D Object Library Concepts
13
Object Modeling Principles
• Flowitems (cause events)
– Typically represent physical components that flow
through the process
16
Object Port Connections
• Output/Input Ports – Output-to-Input port connections
define possible flowitem routes
to/from Fixed Resources. Input
Output
• Center Ports– for referencing
purposes, often used to point to a
TaskExecuter to be called for the
processing or transportation of a
flowitem.
Center
17
Port Connection Modes
• Different modes available
from the menu bar.
18
Keyboard shortcuts for Port Connections
Outputs to Inputs Center to Center
Disconnect
Q W
Connect
A S
View
V C 19
Reorder Ports
20
Output (push) Flow Options
• Send to Port
– Defines a rule for choosing an output
port for an outbound flowitem.
• Use Transport
– Assigns a Task Executer object to
transport flowitems through the port
selected by Send to Port. Typically
through a center port connection.
21
Chapter 3
22
Model Building Strategy
• Gather all available information that describes the system - from how it
looks to how it behaves
• Take an incremental approach to the design and implementation of the
model. Think layers!
• Building a model in 5 steps
– Create a 3D layout (include a CAD drawing if available)
– Flowchart the process to use as a guide
– Define the logic for each step - testing as you go
– Run the model
– View Results
23
Model 1 Phase 1
• Purpose
– Gain familiarity with object-based modeling principles.
• Fixed Resource Objects
• Task Executer Objects
• Port Connections
– Introducing the Separator object.
– Using the “pin” option to create Dashboard charts
24
Separator Object
• Behaves like a Processor with the added ability to “separate” a Flowitem
using one of two modes:
– Unpack: assumes the entering Flowitem contains additional Flowitems within
itself. The contained Flowitems will be taken out or “unpacked”.
– Split: receives a Flowitem and releases a given number of cloned Flowitems (plus
the original).
• Quantity Field:
– Takes an expression value
and either unpacks that
number of Flowitems from
the container Flowitem, OR
creates new Flowitems up
to the amount specified.
25
Simple Output Dashboards
• All Objects keep track of basic Statistics about themselves.
– Throughput
– Content
– Staytime
• Accessible in Chart form from the Object’s Statistics property window.
26
Model 1 Phase 1
• Model Building Exercise Description
– Every 120 seconds a Flowitem is created that represents a shipment of parts.
– Each shipment is composed of 4 “parts”, which will be Split out by a
Separator.
– Each part is Setup for 3 seconds and Processed for 10 seconds (Processor
properties).
– An Operator is responsible for transporting parts to the Processor from a
Queue, and then from the Processor to a Sink. The operator also needs to be
requested as part of the Setup time.
– See the next slide for the model layout.
• Outputs
– What is the Content history of the parts waiting to be processed?
– What is the Throughput of processed parts? 27
Phase 1 Layout
28
Model 1 Phase 2
• Purpose
– Introducing variance or randomness to a model, through the
use of statistical distributions
– Introduce Labels as a means to store and access important
model data during runtime.
29
Modeling Randomness
• Given how Phase 1 is designed it will always execute exactly
the same way because all the model inputs are static.
30
How long does it take to do this?
• “About 10 minutes?” What does ‘about’ mean? Infers some kind
of variation, but what does it look like?
32
Distributions in Object
Properties
• Distributions that generate real values, typically have to do with time.
– Random interval of time between Flowitem created.
– Random duration for a process or setup time.
• Distributions that generate integers are commonly used for things like
choosing a random Object port or creating a quantity of Flowitems.
• Object properties that accept a distribution have a menu that helps choose
and configure the distribution.
33
Labels – The Basics
• FlexSim doesn’t assume any attributes of things represented in the
system, for example how much something might weigh.
34
Label Values
The Owner of the Label; what
Object is in charge of the
label information?
Label Names; What is the
‘job’ of the label?
These are the most common label The Label values.
values; Numbers, Text and
references to model objects. Information that is stored in
The SKUs label is an example of the label. Used to make
an Array; a label with a sorted list decisions, gather statistics,
of values.
effect model execution.
35
Assigning a Label
• Label assignments often happen
in conjunction with model
events.
• Object triggers provide options
for assigning a label value when
that event takes place.
– EG On Exit of the processor.
• As object events often indicate
when things change or need to be
recorded in your model.
36
Dashboard Template Library
• A library of chart templates is
available from the dashboard
window.
• Templates are organized by
statistic.
– Content
– Throughput
– Staytime
– Object State
• Labels are often useful to help
create categories for Statistics
charts, IE “…By Type”.
37
Model 1 Phase 2
• Model Building Exercise Description
– The arrival rate of our shipments is actually described by the exponential distribution,
with a location value of 0 and scale value of 120 seconds.
– The number of parts in a shipment is described by a distribution called duniform, with
a minimum 2 and a maximum of 6.
– The Setup time is described by the triangular distribution; minimum time 1.5 seconds,
maximum of 4.5 seconds but most commonly (mode) 2.5 seconds.
– The processing time is described using the lognormal (mean/standard deviation
version) distribution with a mean of 10 and standard deviation of 3.
– There is now a 20% chance parts will need to be reworked after processing and be sent
back to the Queue.
• Outputs
– What is the Throughput by Flowitem Rework state?
38
Phase 2 Layout
39
Model 1 Phase 3
• Purpose
– Learn how to use table structures (Global Tables and Empirical
distributions) to store and access important model data.
– Use Labels to help access information stored in a table.
– Take a closer look at Trigger events and referencing Objects during those
events.
40
Label Access Expressions
• Syntax
– <LabelOwner>.<LabelName>
• The dot operation is used to access to the information stored in a Label.
• Examples
– item.PartNumber
– current.ItemFailureRate
– item.labels[“Stocking Number"].value vs item.StockingNumber
41
A Closer Look at Triggers
• When key events occur on an Object, a trigger is fired.
42
Understanding the Trigger edit
Add a Trigger
Trigger Name
Option**
**The Add button will change into the Edit button when
An option is added.
43
Basic Object Referencing
44
Referencing an Object
via a Port
• References to connected objects are stored as an Array for the object that
owns those connections, accessible with the ‘dot’ operation.
• current.centerObjects[1]
• current.outObjects[3]
• current.inObjects[duniform(1, 5)]
45
Tables in FlexSim
• Tables (like spreadsheets) allow you to store
and use important data as part of your
model.
• FlexSim provides many ways for User data to
be organized into tables.
– Global Tables.
– Empirical Distributions.
– Parameter Tables.
– Performance Measure Tables.
• Many FlexSim tables support import/export
with Excel.
• These tables are found in the Toolbox tab of
the Library panel.
46
Table Cell Datatypes
Table Cell Data Types are used to determine the format data in the cell will be stored in. This is
important to know because the Table methods will return different
things based on the datatype.
– Simple
• Numbers: Integers or doubles
• Strings: Text like names, words or sentences
– Advanced
• Pointers: References to other nodes or objects (purple text).
• Arrays: Ordered series of data; multiple elements.
• FlexScript: text entered will be treated as executable code.
• Bundles: Data table that stores numbers and strings.
• Tracked Variables: A history of values, typically used for statistics
histories.
These datatypes are set by selecting the desired row(s) and/or column(s) and right clicking, and choosing from
the “Assign Data” menu
47
Global Tables
• Represents custom model data in a table structure.
48
Global Table Access
• Expression Syntax:
– Table(“Table Name”)[RowNumber][ColNumber]
49
Empirical Distributions
• Represents model data used to generate custom random distribution
values, such as time study data.
• Distribution Types
– Continuous: Extrapolates values between
explicit values in the data set
50
Continuous vs Discrete Empiricals
• These graphs represent the same datasets but one is Continuous and the
other Discrete.
• As an Expression:
Empirical("Distribution1").get(getstream(current))
52
Model 1 Phase 3
• Model Exercise Description
– Flowitems that are released by the separator will have new Label assigned to them to indicate their
“PartNumber”. The value of “PartNumber” will be random according to a discrete empirical
distribution. The following table indicates the distribution values and their weighting:
PartNumber Weighting
1 28
2 13
3 32
4 27
– The following table contains data on the unique processing time parameters associated with each
“PartNumber” (store these values in a Global Table and have the lognormalmeanstdev distribution use
them instead or the 10 & 3). Distribution Mean Standard Deviation
8 1
13 2.5
5 4
• Outputs 10 2
– What are the Processing statistics (Min, Max, Average) for the parts, by Part Number?
53
Model 1 Phase 4
• Purpose
–Learn how to use the Combiner object.
–Continue to use labels to aid logical decision making.
–Get comfortable modifying existing parts of a model in
order to accommodate new knowledge about the
system.
54
Combiner Object
• Used to pack, join, or batch flowitems.
• Pack – Places Flowitems into a special container Flowitem (like a pallet).
• Join – Received Flowitems become a
single assembled unit.
• Batch - Collects Flowitems, then
delays for the process time, and
releases each Flowitem individually
(not packed or joined).
• Examples
– item.PartNumber
– current.ItemFailureRate
– item.labels[“Stocking Number"].value vs item.StockingNumber
56
Phase 4 Layout
57
Model 1 Phase 4
• Model Exercise Description
– After the Processor object, the individual parts are sent into a Queue based on their
PartNumber; IE all PartNumber 1 Flowitems accumulate in a dedicated Queue object,
etc.
– The individual parts need to be assembled into a Pallet at a Combiner object with the
following quantities: PartNumber Quantity
1 4
2 2
3 3
4 5
• Outputs
– How long does it take to assemble the components (Min/Max/Average)?
58
Model 1 Phase 5
• Purpose
– Introduce Object Groups, Dispatchers and Parameter and Performance
Measure tables.
– Design a Model Experiment to show the effect changes in model
Parameters have on Performance Measures.
– Use the Dashboard Scenario Chart to visualize outputs generated by an
Experiment.
59
Phase 5 Layout
60
Dispatcher Object
• Coordinates a team of TaskExecuter Objects that
need to share a common queue of tasks.
• Uses Port Connections to communicate with the Output Ports
objects creating the Tasks and the members of its
team.
– Center Ports between the Dispatcher and the objects
requesting task executers.
– Output ports from the Dispatcher to the inputs of the task
executer team members. Center Ports
• Uses “Pass To” logic similar to Send to Port to
pick an available team member.
• The number of TaskExecuters attached to a
Dispatcher can be used as a Parameter.
61
Object Groups
• Creates a means to collectively refer to multiple
objects.
62
Parameter Tables
• Specialized table to easily update key model inputs
automatically.
• Each row in the table(s) represents a parameter
you want to change.
• Parameters have strict limits and a value type:
– Continuous: requires a lower and upper bound. The value can be set to any number in the range.
– Integer: requires a lower and upper bound. The value can be set to any integer value in the range.
– Discrete: requires a lower and upper bound, and a step size. The value can be set to any value between
the bounds, incrementally by step size.
– Binary: only possible values are 0 or 1. This type is well suited for values that are on or off, true or false.
– Option: specify one or more expressions as possible options for this parameter. You can then set the
value to an integer between one and the number of options to use that option.
– Sequence: requires a sequence length, which should be an integer that is greater than zero. The value
can only be set to an array of numbers
– Expression: can be set to any valid FlexScript expression. This type is well suited for distributions, like
an arrival rate, or a processing time.
• Change the current value of the Parameter by typing directly into the
Value column, and hitting reset. 63
The OnSet trigger
• This trigger fires whenever the value of the parameter is changed, and when you reset
the model using the Reset button.
• When the OnSet trigger is fired, you have access to four values:
– The value of the Reference field
– The new value of the parameter
– The old value of the parameter
– A flag, indicating if this OnSet is fired because the model is being reset.
• The sampler button on the Reference field can be used to set the reference and the
trigger simultaneously. For example, if you sample a Processor, point to Variables,
then choose maxcontent, the Reference is set to the Processor, and the OnSet will set
the maxcontent variable on reset.
64
Performance Measure Tables
• A table for quick reporting on model outputs, reporting model behaviour.
• Performances Measures report a solitary statistic value associated with what is set in
the “Reference” field. The Sampler icon can be used to select your reference and
desired statistic more easily:
– 3D Objects
– Processflow Activites and Shared Assets (discussed later).
– Object Groups (sample from the Toolbox)
– Dashboard charts
65
Model 1 Phase 5
• Model Exercise Description
– Create Model Parameters to automatically increase the number of available Operators
and Processors.
– Create a Parameter to easily change the failure rate at the Processor.
– Create a Performance Measure for model throughput of competed pallets per hour.
• Experiment
– If the number of Processors ranged from 1 to 3, what is the “best” number of Processors?
– If the number of Operators ranged from 1 to 3, what is the “best” number of Operators?
– If the Processors’ Rework rate drops from 20% to 5% does that increase throughput?
• Question
– What appears to be the model’s bottleneck?
66
About the Experimenter
• Automates the workflow of changing Model
Parameters and reporting on Performance measures.
67
67
Replications and Scenarios
• Replication
– A single run of a model.
• Scenario
– A set of Parameters that will be changed in the model for a group of replications.
– The user defines what values will be assigned to the Parameters for each scenario.
• End Time
– The simulation time period that defines the duration of a Replication.
• Warm-up Time
– The simulation time, when reached, that will cause the statistics of a replication to be reset.
– Helps collect data for steady-state operation only.
68
9 Steps to Successful Analysis
1. First, examine a single run of your model for extremes, omissions, outliers
unexpected results, etc. Investigate and correct any “problems” you find
before running experiments.
70
9 Steps to Successful Analysis
5. Add the Experimenter to your model and create a single Scenario
experiment that will modify your Model Parameters.
71
9 Steps to Successful Analysis
6. Click the Experiment run tab. Specify the number of replications (around 30 usually),
Check the “Save statistics data…” Box, verify the End Time/Run Time and Warmup
Time. Click on “Run Experiment.”
72
9 Steps to Successful Analysis
7. View results on “View Results” button on the Experimenter.
73
9 Steps to Successful Analysis
8. Define additional Scenarios to evaluate the impact of Model
Parameters. Good Practice to give Scenarios meaningful names.
Rerun Experiments to see effects of Additional scenarios.
74
9 Steps to Successful Analysis
9. Create A new Dashboard window and add the Scenario Chart and “point” it
to any Charts you have made (Best practice, keep Experiment results
separate from live model results). Examine results for model performance
indicators.
75
Chapter 4
76
Process Flow
• Strengths
– Customization
– Flexibility
– Centralized Logic
• Weaknesses
– More responsibility given to the
modeller
– Limited 2D visuals
77
The Three Pillars of Process Flow
78
Shared Assets
• From the User’s Manual: “A shared asset is a
finite resource that tokens may claim or
release at certain points in the process flow.”
79
Remember this?
80
Model 2 Phase 1
• Purpose
– Gain practice building models using basic Process Flow activities and Resources
• Description
– Create a Process Flow model that produces a Token that represents a Part in a
manufacturing process at a rate of exponential(0, 30)
– The Part will execute Delay activities that represent Inspection, Painting and Curing
processes, which must be done in that order.
• Use the default distribution for the Delay time for simplicity
– There is a single resource available to conduct Inspection, and a separate single resource
available for painting, but up to 3 Parts may be at Curing at a time.
– Once Curing is complete the parts may leave the system
• Tip
– Use Flowchart Containers to help organize your Process Flow
81
Containers
• Process Flow activities may be
organized into Containers
83
Model 2 Phase 2
• Purpose
– Gain practice building models using basic Process Flow activities and Resources
• Description
– In the same model, create a separate activity flow for another Part
• Also produced at a rate of exponential(0, 30)
– This Part executes Delay activities that represent Cutting, Inspection and Polishing
processes, which must be done in that order.
– The Inspection Process for this Part and the Part from Phase 1 need to use the same
Inspection resource
– After Polishing, this part leaves the simulation
• Tip
– Copy and Paste is a good way to quickly replicate similar activity blocks but make sure
things like Resource links go with the right Resources.
84
Model 2 Phase 3
• Purpose
– Gain practice building models using basic Process Flow activities and Resources
• Description
– In the Same Model, create a separate activity flow for a third Part
• Also produced at a rate of exponential(0, 30)
– This Part executes Delay activities that represent Cutting, Painting, Curing, and Inspection,
which must be done in that order.
– Tokens in this Flow need to use the same resources as the Tokens described on Phases 1 and 2
– After Inspection, this part leaves the simulation
• Outputs
– What is the throughput rate per hour of each part type?
85
Mapping Flow
86
Flow Alternative
87
Model 2 Phase 4
• Purpose
– Gain practice building models using basic Process Flow activities and Resources and
Labels
• Description
– Using the same model, unify the three flows such that the Phase 1, 2 and 3 tokens each
represent a different type of product produced in the same workshop.
– Use a single Source activity to create parts using an exponential(0, 15) inter-arrival time.
– Use an Assign Labels activity to assign each arriving part a random ‘Type’ label such that
each of the three types occur evenly (roughly 33% of the time).
– Use a Decide activity to route the parts to the flows already created in Phases 1, 2 and 3
based on the assigned ‘Type” label values of 1, 2 and 3 respectively.
• Question
– What’s the difference between having 3 Source activities vs 1 Source activity?
88
Assign Labels Activity
• Assign one or more custom labels to
a token or object.
• Labels can have any name you want
and store any data type you want.
89
Labels in Activities
90
The Decide Activity
• Makes a decision regarding which activity
tokens will do next.
• Allows for multiple outbound connectors and
logic for choosing them.
• Connectors can be referenced by their index
number or a user-assigned name.
• Labels and comparison operators may be
helpful for defining decision logic.
• See: User Manual>Reference>Coding In
FlexSim>Writing Logic In FlexSim>
Comparing Variables.
91
Common Pick Option
• <Something> by Case
– Allows for multiple outcomes based on an expression (usually a label
value) that has different potential values.
– Commonly used with a Label value (integers only) to make one or more
logical decisions.
93
Activities and Objects
• Activities to control Object behaviour
94
Model 2 Phase 5 – Process
Flow Centric Approach
• Model Building Exercise Description
– Create Queue objects to represent locations where our 5 processes (Cutting, Curing,
Inspection, Painting, Polishing) take place.
– Use the Create Object activity to create Flowitems that correspond with the model’s tokens.
– Use the Move Object activity to move a token’s Flowitem to the appropriate object location
after a resource has been acquired.
– Use the Destroy Object activity to remove a token’s Flowitems from the model right before
their tokens are sent to a sink.
95
Process Flow Centric Layout
96
Model 2 Phase 5 – Hybrid
Approach
• Purpose
– Gain practice integrating 3D object based model events with Process Flow
based Events.
– Activities to support a ‘Hybrid’ approach:
• Event-Triggered Source
• Wait for Event
97
Event ‘Listening’
• Event listening allows Tokens to be affected
by things happening elsewhere in your model.
– Hint: Use a group for the Curing Processors and listen to the group rather than the
individual Processors. 101
‘Hybrid’ Layout
102
Chapter 5
103
Model 3: Custom Task Sequence
• Purpose
– Understanding Object event based Task Sequence creation and queueing.
– Process Flow activities to support a custom created task sequence:
• Create Task Sequence
• Travel
• Load
• Unload
• Delay
• Finish Task Sequence
• Batch
– Gain experience creating and executing customized task sequences alongside standard
Task Sequences.
104
Tasks and Tasksequences
• Task – a single instruction or action to be performed by a
TaskExecuter object.
ex. LOAD flowitem
106
TS Order of Execution
• Task Executers have a Task
Sequence queue that manages
queued requests.
107
TS queuing and execution: an
Example
108
Process Flow
Task Sequence Activities
109
Key Task Sequence Activities
• Create Task Sequence
– Creates a Task Sequence for the
specified Task Executer/Dispatcher
– Creates labels on the Token to track
the Task Sequence itself and the
assigned Task Executer. Match
• Finish Task Sequence Values
– Notifies the assigned Task Executer
that the task sequence is over when
the Token reaches this activity.
110
Example Model Revisited
111
The Batch Activity
• Collects a specified number of tokens
and releases another number of
specified tokens.
• Offers options to group batches by
simple categories, usually a label value.
113
Model 3: Custom Task Sequence
• Model building Exercise Description
– An Operator is responsible for transporting Flowitems from a Queue to a ‘box labeller’
machine (Processor) and then must perform the labeller Setup Time. Set up takes 2
seconds. This uses standard Object logic and options.
– Every time a Flowitem is processed a ‘label’ is consumed, after 15 Flowitems have been
processed all the labels have been consumed, and need to be replenished. The
Operator is responsible for replenishing the stock by traveling to a pickup location and
loading a Flowitem that represents the stock replenishment. The Operator must then
bring it to the labeller and execute a Delay that represents the time to reload the
machine.
– It takes triangular(5, 15, 10) seconds to ‘reload’ (delay) the labeller with the new label
roll (destroy Flowitem representation when done).
• Questions
– What is the Utilization rate of the Operator?
114
Chapter 6
Building Models in FlexSim:
Conveyor Systems
115
Key Conveyor Features
• Slug Building and Merge Control - Create conveyors that will
accumulate a slug of items and then release it once the slug is ready.
• Range-Based Transfer Points - Operators can pick up or drop
off items from a range of transfer points along the conveyor rather
than a single fixed point.
• Advanced Photo Eyes - Build sophisticated logic into photo eyes,
such as programming them to trigger events or logic if they are
blocked or if they are clear for a specific amount of time.
• Decision Points and Stations - Place decision point objects and
stations on conveyor to act as sensors, processing stations, or a
communication point for other objects, such as the merge controller.
116
Key Conveyor Features, Con’t.
• Advanced Movement Controls -
– Many possible options for controlling how items transfer between conveyors
– Can adjust a roller skew angle on a conveyor
– Can tilt, translate, and rotate items while they move along the conveyor
• Item Orientation - Define any orientation for items on a conveyor.
Orientation will automatically persist across multiple sections, and
will update to match the object's orientation when the item transfers
through side transfers.
• Power and Free - Simulate power and free systems with dog gap.
117
Conveyor Model Concepts
118
Conveyor Library
Name and Icon Description Appearance
Straight Conveyor A straight section of conveyor that can
simulate conveyor belts or roller conveyors.
121
Conveyor Transfers
• Items move into, out of or within the conveyor system
through transfers
122
Conveyor Transfer Objects
Name Description Appearance
Transfers Transfers are connections from one conveyor to another.
They can affect how an item is transferred between
conveyors, especially when merging lanes together.
Entry Entry transfers are connections from a non-conveyor
Transfers object (such as a source or other fixed resource) to a
conveyor object. They can affect how an item is
transferred onto a conveyor. Positional and resizable!
Exit Exit transfers are connections from a conveyor to a non-
Transfers conveyor object (such as a sink or other fixed resource).
Exit transfers have the ability to send for a transport (a
task executer) to pick up items and deliver them to another
object. Task executers can pick up items from a particular
point on the exit transfer or a range of possible points
along an exit transfer. 123
Working With Transfer Objects
Move Transfer Position
124
Creating Conveyors
126
Conveyor Routing Using Decision Points
Decision points can be used as target destinations to send items to using
whatever the shortest path along the conveyor system is to get there.
The upstream decision point has standard
output port connections to four downstream
decision points.
The upstream decision point’s triggers can
route items to any of the connected targets
with simple trigger logic.
127
Restricting Access with Decision Points
• Decision Points allow for the creation of restricted areas on a conveyor
system
• Restricted areas require at least
1 entrance point and 1 exit point.
• Use Trigger logic:
128
Rack Object
• The Rack is a storage object that can store flowitems in
a specific Bay, Level and Slot.
Bays
Levels
Slots
129
Rack Slot Assignment
• Slots can be assigned using the Slot
Assignment Strategy field.
130
Rack Minimum Dwell Time
131
Model 4: Conveyors
• Purpose
– Get familiar with the Conveyor Library.
• Description
– Use the following slide to guide the layout of a Conveyor system.
– Use exponential(0, 6.5) for the arrival rate.
– Assign the items a ‘Type’ label and a Color based on duniform(1, 4)
– Route items to a lane by their Type via Decision Points.
– Use an Operator to place items in the ‘First Slot with Space’ of the Rack.
– Have items dwell in the rack for a minimum of normal(30, 5).
– Use alternating exit lanes for items leaving the rack (Send to Port>‘Round Robin’) .
– Create a restricted area with capacity 1 using Decision Points where the exit lanes merge.
– Create a Station at the end of the merge lane that delays items for 3 seconds before going to a sink.
• Challenge
– Can you route items out of the rack such that Types 1 and 2 use lane 1 and Types 3 and 4 use lane 2?
– Can you set the rack to place items in the Slot that is assigned to the items’ Type?
132
Conveyor Model Layout
133
Chapter 7
134
Activity Introduction
135
Primary Uses of the Zone
1. Gathering custom statistics with Subsets and Calculations.
136
Model 5: Zone Factory
• Purpose
– Gain experience with using the “More Properties” window for a zone; accessing Subsets and
Constraints
• Description
– A factory is producing parts with the following Labels:
• ‘DollarValue’ that ranges between $100 and $1000 (uniform distribution).
• ‘Weight’ that ranges from 10lbs. to 50lbs (uniform distribution).
• ‘Type’ that ranges from 1 to 5, such that 40% are Type 1, 30% Type 2, and 10% each for Types 3, 4, 5.
– On the Factory Floor parts go through a Delay activity according to their type
• Use exponential(0, 45) as the delay time for all
– On the Factory Floor only 10 total parts can be in process. Only 5 parts (of the max 10) can be Type
1 or 2. Only 3 parts (of the max 10) can be designated as ‘Heavy’ (parts whose weight is 35 or more).
• Outputs
– What is the total weight of all ‘Heavy’ parts currently on the Floor?
– What is the total Dollar Value of all parts that have been through the factory?
– How long on average do Types 1 and 2 have to wait to be processed?
– What is the total value of the ‘Expensive’ (worth more than $800) parts waiting to be processed? 137
Zone Factory Flow Chart
138
Zone Statistics Definitions
139
Conveyor Zone
Restrictions Example
• Purpose
– See how a Zone using Calculations and Subsets can help manage flow
within a Conveyor system
• Description
– Four Conveyor lanes intersect with a section of conveyor that has a weight limit, such that
only 50lbs of product can be present at the intersect Conveyor
– Products are assigned a weight label with values between 15 and 50 pounds.
– On the Following Layout Slide, the Orange segments are the segments with the weight
limit, the other segments are the entry points for items of a matching color
140
Layout
141
Chapter 8
142
List Core Concept
• A dynamic construct for coordinating model events.
• Requires at least two sets of participants.
143
A Real-Life Example of List Behavior
• How does a restaurant know what tables are available for what
customers?
• In what order are the waiting customers assigned tables? 144
List Vocabulary
• A Push is when some model object is placed on the List, making it
available for a subsequent Pull.
• Pushing creates an Entry.
• An Entry is made up of a Value
and Fields.
– Value is a reference to the entity that
was pushed.
– Fields are searchable criteria or attributes
that are related to the value.
• Pulling is the act of searching the List for an Entry that meets the Puller’s
criteria; called a Query. A Pull results in the removal of the pulled Entry
from the List.
• If the Puller doesn’t find a valid Entry, it becomes a Backorder.
145
A List Example Walk thru
148
Shared Asset: List
• Synchronizing
• Creating Relationships
• Statistics
• Sorting/Filtering
– Queries
• State/Categorization
• Much MUCH more!
149
Shared Assets
Resource List
Zone
150
Scheduled Source
Creates tokens according to a schedule/sequence table.
• The Arrival Table. • A number of model time
– Time: a number of time units units to offset the first
when tokens will be created. Can iteration of the first arrival
be static value or sampled from an
expression/distribution.
row’s time
– Name: assign an optional name
property to the tokens. • Repeats the arrival schedule.
– Quantity: specify how many When the last row creates
tokens to be created at this time. it’s tokens, the first arrival
Can be static value or sampled
from an expression/distribution. row will then create it’s
tokens
• Supports custom columns for
row-specific labels. • Assigns labels to all tokens
• Supports importing from created by this Source
Excel.
151
Process Flow List Model
• Purpose
– Gain experience in building an abstract model
– Get familiar with lists and partitions
– Think about how model units affects model building approach
• Description
– A Shipment of inventory represented by tokens arrives at the start of each day to be stored.
– A Wave of picks represented by another set of tokens is created at the start of each day to be pulled.
– The average number of tokens per shipment (and tokens per Wave) received each day is 10,
exponentially distributed.
– Assign the inventory and picking tokens a Type label using duniform(1, 5).
– Push inventory tokens to a List using its Type as a partition ID.
– Pick tokens Pull one matching inventory token from the List using its Type as a partition ID.
• Challenge & Outputs
– Can you Create 3D visuals to track the Inventory and Picks?
– Modify the model so that it takes between 5 and 15 minutes (uniformly distributed) to put away each
component. Could you also do this with a Tasksequence?
– Modify the model so that it takes between 15 and 30 minutes (uniformly distributed) to pick a
component. Could you also do this with a Tasksequence?
– Plot the number of unsatisfied orders each day for an entire year (back order content vs time).
– What’s the average number of days an order waits to be satisfied (back order staytime)? 152
Global Lists and Process Flow Lists
• By default, a Process flow is “Local” and only accessible within process Flow.
153
List Model 2
• Purpose
– Practice using a list to coordinate between ProcessFlow tokens and Flowitems (an Item List with a
token puller).
• Description
– Pallets are created every exponential(0, 30) seconds, assigned a duniform(1, 3) Type and placed onto
a straight Conveyor.
– Parts are created every exponential(0. 3.5) seconds, assigned a duniform(1, 3) Type and placed into a
Line-side Queue where only its Type is stored.
– When a Pallet reaches the midpoint of the conveyor create a token that stops the pallet, pulls parts
from a List and packs them into the pallet according to the following patterns:
Part Type 1 Part Type 2 Part Type 3
Pallet Type 1 6 2 4
Pallet Type 2 4 6 2
Pallet Type 3 2 4 6
– Packing a set of boxes takes 5 Seconds each.
– Once all Parts are on the Pallet, the pallet may continue.
154
List Model 2
155
Chapter 9
156
Advanced Task Sequences
• ‘Coordinated’ Task Sequences
– More than one operator to be involved in the same task sequence
• Subflow Activities
• Object Referencing
157
About Subflows
• Subflows are a useful way to shift control
logic to a self contained ‘block’ of logic where
a complex process is better defined as a series
of substeps
158
Activity Introduction
159
Terminology
• Relationships
– Parent-Child
• Label Access
• P+,PP+,PPP+…
– 3D-Process Flow
160
160
Launching a Subflow
• Needs an event
that marks when the subflow takes
over.
• A ‘Start’ activity to receive the child
token(s)
• ‘Finish’ to mark when control is given
back to the parent
161
A Subflow Example Model
162
Launching a Subflow
• Needs an event that marks
when the subflow takes
over.
• A ‘Start’ activity to receive the
child token
• ‘Finish’ to mark when control
is given back to the parent
163
Split
• Creates a token for each of the
output connections for the activity.
Each token is assigned a unique id
(Split ID).
• Split Properties:
– Assign Split ID To: The label where the Split
ID for the tokens is stored.
– Create As: Determines the relationship
between the tokens that leave the Split.
164
Join
• Combines tokens from multiple input
connectors to create a single token. One
token is taken from each connector. These
tokens can be matched based on a label,
such as the SplitID.
• Join Properties:
– PartitionID: The value by which the incoming
tokens are grouped.
165
Synchronize
• Gathers a token from each of the input connectors and holds on
to them until a token has come in from each connector. Once all
tokens are gathered, they are then
released out of an corresponding output connector.
166
Coordinated TS Subflow Model
• Purpose
– Practice a scenario where more than one TE is involved in the same request
• Description
– Boxes arrive every 20 seconds into a queue, two operators are required to
carry it to a ‘round robin’ downstream queue.
– It takes at least 2 seconds, at most 8 seconds but usually 5 seconds to load
and unload the flowitem.
– Create a Subflow-type process flow from the Toolbox where you define the
task sequence for the two required operators
• Challenge
– Modify the model so that half of all Flowitems need two operators and the
other half only need one (Hint: a List may be useful for making sure the
operators are available before creating the task sequences). 167
Coordinated TS Model
Layout
168
List Model 2: Revisited
• Purpose
– Gain experience using tokens to create necessary task sequence in conjunction with Lists.
• Description
– Modify your List Model 2 to allow a Task Executer to place the pulled boxes onto the pallet one at a
time.
– Do not allow the Puller token to begin pulling a new layer of boxes until the previous layer is
completely packed.
– Do not allow the Pallet to resume along the conveyor until it is completely packed.
• Notes
– This model will present challenges related to coordinating when the puller can begin pulling and
knowing when all boxes are present on the pallet.
– The Load task cannot take an Array in order to transport all the members of the Array like Move
Object can. You may need to run a Subflow that creates as many children as there are Flowitems to be
transported, and have each child token of the Subflow represent one Flowitem in the Array. Each
child token then can create a task sequence for the operator for just its Flowitem.
• Challenge
– Notice that the Operator does not Start transporting Flowitems until all Flowitems in a Layer are
ready. How can the Operator transport each box as it becomes available instead?
169
FlexSim Advanced
Training Preview
Additional Model Building Exercises
• Warehouse operations as a multiphase
project
• Flowitems and ‘Combining’ operations
• Modeling with ‘Instances’
• Preempting Tokens
• Using Lists with TaskSequences
170
Chapter A1
171
Managing a Multi-phase Project
• When starting a model project, sometimes you only know
how parts of the system work as data is gathered or clarified
– Piecemeal model building
172
Activity Introduction
• Batch Activity
– Similar to a ‘Split’ and a ‘Join’
in one activity
– Collect a quantity of tokens or
an aggregated amount from
Labels (Quantifier Field)
– Allows for Grouping of
multiple Batches at once
173
Warehouse Model P1
• Purpose
– Gain practice with building and adding to a model over multiple steps
– Building an abstract model
• Description
– A warehouse company is proposing a new facility and wants to model the truck docking
procedure but they don’t know what it will look like yet
– The logic of the system is that trucks arrive every exponential(0, 300) seconds and travel to
one of four loading bays.
– The time it takes to travel to a truck bay has been estimated at uniform(45, 75) seconds.
– Each truck needs to be filled with 1 to 3 orders.
– Each order takes approximately normal(300, 30) seconds to pick.
– After leaving the yard, the truck travels 30 minutes (1800 seconds) to the train yard to be
loaded on a train.
– Each train can hold 5 trucks.
174
Warehouse Model P2
• Purpose
– Gain practice with building and adding to a model over multiple steps
• Description
– We now know a little better what the facility’s docking area will look like and want to add
3D visualization to the trucks coming through the gate and docking at a bay
– Use the layout on the following slide and add it to your abstract model
• Challenge
– Can you add a Navigator to the model to force the trucks to travel in specific directions?
175
Warehouse Model P2
Can you find a find a Dock shape online to make the model look a little
nicer? 176
Warehouse Model P3
• Purpose
– Gain practice with building and adding to a model over multiple steps
• Description
– The Project is growing in scope and more detail over the Picking time is requested. Also
new data has come to light that the railyard loading parameters are not what they
originally seemed.
– each order contains uniform(5, 15) picks. There are two types of picks (20% ‘slow’ and
80% ‘fast’) and that Slow Picks take lognormal2(50, 4, 0.5) and Fast Picks take
lognomal2(25, 6, 0.8) seconds.
– You only have 2 Fork Trucks available for order picking.
– the train doesn’t hold 5 trucks, it hold 5000 lbs product. Each of your trucks has a product
weight of uniform(1000,2000) lbs.
• Challenge
– Can you envision a way that truck weight is a function of the picks rather than assigned
from a random distribution?
– Can you create 3D visuals to match the abstract logic for Picks? 177
Chapter A2
178
Combining in Flexsim
• The need to be able to bring multiple components together in some
fashion is wide spread in Modeling projects
• Simple combine operations are straight forward
– ‘Batch’ Activity, seen previously
– Combiner Object
• More complex combining problems may require a different approach
– Lists and Process Flow logic
179
Labels as an Array of values
• So far labels have been treated as
single values or references
• Labels actually have the ability to
hold a set of values referred to as
an Array
• When using labels with array
elements you may work with an
individual value in the array or
the array as a whole.
• Example: ‘Move Object’ Activity; rather than moving one flowitem at a
time, reference an array of Flowitems to move them all at once.
180
Combining Model
• Purpose
– Gain experience in custom approaches to the Combining Flowitems
• Description
– Empty pallets arrive using an exponential(0,40). These pallets are placed into a Pallet Queue.
– Boxes arrive using an exponential(0,3). These boxes are placed into a Box Queue.
– An Empty Pallet is placed into a Combiner and then have 10 to 15 boxes placed on them.
– After the pallets are loaded up with boxes. the pallets are moved into a Conveyor Queue that feeds
a conveyor.
– Halfway down the conveyor, the pallets are stopped for testing. The test time is exponential(5, 7,
0).
– After testing the pallets is allowed to continue.
• Challenge
– Can you add an operator that removes one item from each pallet and tests it separately at
another nearby location and puts the item back on the pallet before it is allowed to
continue?
181
Chapter A3
182
Instances
• Types of Instances – Process Flow Toolbar button
– Fixed Resources:
• Use this type of process flow to create logic for custom FR objects that can be reused.
• Templates: Source Queue, Basic Processor, Processor with Operators
– Task Executers:
• Use this type of process flow to create logic for a custom Task Executer that can be
reused.
• Templates: AGVs
– Sub Flow:
• Used to create self-contained chunks of logic that are executed by objects or process
flow activities. Think on them as functions or subroutines.
183
Creating Instance Objects
Drag and Drop the Process Flow Object created when the instance
was created into the model.
184
Connecting Objects to Instances
185
Using the Parent/Child relationship
with Lists
• Child as proxy puller for Parent • Parent/Child Synchronization
– Using Subflow or Create Tokens
186
The “Impatient” Combiner
• Product orders come into an assembly area using an inter-arrival rate of 2 minutes, on average and are sent to one of the two assembly
benches. Each order is assigned one of four assembly configurations. Each configuration is made up of up to four components that
arrive into the assembly area at different rates.
– Component type 1 – on average 1 minute (Exponential Distribution)
– Component type 2 – on average 30 seconds (Exponential Distribution)
– Component type 3 – on average 2 minutes (Exponential Distribution)
– Component type 4 – on average 3 minutes (Exponential Distribution)
• The quantity of components for each order is determined randomly with the following amounts (make sure the amounts are integer
values, see Math.truc() or Math.round() in the API documentation):
– Component type 1 – minimum 0, maximum 4 (Duniform Distribution)
– Component type 2 – minimum 0, maximum 8, commonly 6 (Triangular Distribution)
– Component type 3 – normal(2, 1) (Normal Distribution)
– Component type 4 – on average 2 (Exponential Distribution)
• All assembles use a distribution of normal(14, 2) minutes for the assembly time.
• Each assembly bench must gather all the needed components before the assembly time starts. It waits up to 3 minutes for ALL
components that it needs to arrive. If components are missing after two minutes, the combiner gathers all the pieces it can before
releasing the assembly to another assembly area to wait for the missing pieces.
187
Impatient Combiner Layout
188
Chapter A4
Preempting Tokens,
Using the SELECT list Query
And
Event Listening with
Tracked Variable Labels
189
Release Token
• Moves a token or tokens to another
activity to either do something else or
wait.
• Release Token Properties:
– Token(s): The token(s) that you want to release to
another activity.
• Examples: Array, Tokens in a Zone, Tokens that have
Acquired a Resource
– Release To: The activity you want to release tokens
to.
190
Save Token Context
• Saves the current context of a token or tokens
in the process flow. This context is used to
return tokens back to its context when the
preempting activities finish. It is not required
for all preemption scenarios.
• Save Token Context Properties:
– Token(s): The token(s) whose context you want saved.
• Examples: Array, Tokens in a Zone, Tokens that have Acquired a
Resource
– Save To Label Name: The name of the label where you
want to save the context.
191
Restore Token Context
• Restores a token or tokens to a previously
saved context after they have been
preempted away.
• Restore Token Context Properties:
– Token(s): The token(s) whose context you want saved.
• Examples: Array, Tokens in a Zone, Tokens that have
Acquired a Resource
– Save To Label Name: The name of the label where you
want to save the context.
• In order to restore a token the context of that
token must have been saved using a Save Token
Context.
192
Event ‘Listening’ w/ Tracked
Variables
• Ideal for monitoring label value changes
during the model execution
• Create a label with Tracked Variable
Data
– There are different types of tracked variables
available, e.g. a Level-variable to track a value
that increments and decrements like Content
would
• You now have access to its OnChange
Event
193
Using SELECT queries with Lists
• SELECT queries change how
pullers and entries behave on
the List
194
Preemption Model
• Purpose
– Practice Preempting Tokens and Using the SELECT Query, and Listening to Tracked Variable Labels
• Description
– A Bottling Line consists of a Filling station, Capping station and Labelling station.
– The Filling station fills a bottle in (uniform) 5 to 8 seconds and can fill 10 bottles at a time.
– The Capping station takes (uniform) 3 to 5 seconds to affix a cap to a bottle, and can cap 3 bottles at
once
– The Labelling station processes a single bottle at a time in (uniform) 2 to 4 seconds. The labeller
starts the model will 1000 labels that are consumed with each bottle. When the labeller runs out of
labels it needs to be restocked, which takes on average 2 minutes for an Operator to do.
– The Filling station can randomly break down throughout the model run. When the Filling station
breaks down, an Operator is called to fix the machine and all bottles present must be discarded.
– The Capping station undergoes scheduled maintenance. An Operator must remove the bottles to a
holding Queue before maintenance starts, and put the bottles back when the time completes
• Schedules
196
Chapter A5
197
Useful Events
• Use Transport (any Fixed Resource)
– Tells the object that some resource is going to be
involved in the movement of the item
– Generates a task sequence and sends it ‘somewhere’ for
a resource to find it
• On Resource Available (operator trigger)
– Fires at the start of the model and every time the
operator completes a task sequence
198
List of Task Sequences Model
• Purpose
– Explore more uses for the List concept introduce the List partition
• Description
– Items arrive using an interarrival time of exponential(0, 10). These items are randomly
assigned a label value to designate type using duniform(1, 3).
– These items are then processed on the first available of three processors with a process
time of lognormal2(8, 18, 0.3)
– A specific operator then transports the item to the sink based on the type.
– Use a Tasksequence List to make the assignments by having Task Sequences Pushed
to the list when Transport is requested and Pulled by the Operators when they become
available (see operator Triggers properties)
199
Task Sequence List Model
200
Congratulations on completing
FlexSim Training Course 1!
201
Other Useful Tools…
• Debugger
• Time based events (MTBF/MTTR, Time Tables)
• Visual Tool (Additional Uses)
• Navigator objects
• Experimenter
• Presentation Builder
• ExpertFit
• OptQuest Optimizer
• And much more!
202
• Additional FlexSim Course 1 Training
– If you feel that any of your colleagues would benefit from attending
this course, or if you think you could gain more by attending Course
1 Training again, please contact us.
Phone: 801-224-6914
Fax: 801-224-6984
Website: http://www.flexsim.com/
Support : http://answers.flexsim.com/
Email: [email protected]
204