You are on page 1of 14

ISYE6501 Office Hours

Week 9, Monday
Agenda
• Homework 9 deep dive
• Up next
HW9 Q12.1/2 – Design of Experiments
Q12.1 – describe a situation or problem from your job, everyday life, current
events, etc., for which a design of experiments approach would be
appropriate

Q12.2 - to determine the value of 10 different yes/no features to the market


value of a house (large yard, solar roof, etc.), a real estate agent plans to
survey 50 potential buyers, showing a fictitious house with different
combinations of features. To reduce the survey size, the agent wants to
show just 16 fictitious houses. Use R’s FrF2 function (in the FrF2 package)
to find a fractional factorial design for this experiment

Note – no data set is required for Q12.2


HW9 Q13.1 – Probabilistic Distributions
Q13.1 – for each of the following distributions, provide an original
example of data that you would expect to follow this distribution

a. Binomial
b. Geometric
c. Poisson
d. Exponential
e. Weibull

Tip: understanding distributions is critical in many areas of analytics,


especially for next week’s simulation homework; garbage-in = garbage-
out
HW9 Q13.2 – Simulation Problem
• Airport security screening queue
• Passengers arrive according to Poisson distribution 𝜆 = 5 / min (or 50 if using
SimPy)
• Go through single ID check queue with multiple servers who have
exponentially distributed service time of 𝜇 = 0.75 min
• Then, go to one of several scanner queues (how many??), uniformly
distributed service time Unif(0.5,1) min
• How many ID checkers and bag scanners do you need to keep average wait
time below 15 minutes?
• Use Arena or SimPy (please don’t do both, unless you hate yourself!)
HW9 Q13.2 - Installing Arena
• Installing Arena: https://www.arenasimulation.com/academic
• Student version is limited by number of entities
• PC only
• Virtual desktop option (not officially supported, but an option)
• GT OMSA Students only (sorry MM/OMSCS)
• https://mycloud.gatech.edu
• Desktops -> ISYE-2021 or ISYE-SIMIO
• We (the TAs) don’t administer or have any control over these desktops; please
contact GT helpdesk for issues
HW9 Q13.2 – Installing Python / SimPy
• Python stuff
• Python: https://www.python.org/
• Anaconda Navigator: https://www.anaconda.com/products/individual
• Docs: https://docs.python.org/3/tutorial/index.html
• SimPy stuff:
• Where to get SimPy: https://simpy.readthedocs.io/en/latest/
• Crash course: https://simpy.readthedocs.io/en/latest/simpy_intro/index.html
• Car wash example: https://simpy.readthedocs.io/en/latest/examples/carwash.html
• Not limited to PC, pretty much any platform (Python is okay for this problem)
• No GUI, all code 

Not supported (i.e., we can't offer tech support), but Google Colab has
been successfully used by students in the past
• Install SimPy with shell command in your notebook: !pip install simpy
HW9 Q13.2 – Simulation Example (Modified Carwash)
• Tweaked slightly from:
https://simpy.readthedocs.io/en/latest/examples/carwash.html
• Simulate two different car washes, one with a single queue, and one with
multiple queues
• Each car wash has 2 separate hand wash bays
• Cars arrive Poisson 12 cars/hour (0.2 cars/min)
• What’s the inter-arrival time (Exp)?
• The car wash takes between 7 and 10 (Unif(7,10)) to wash a car – depends on the size of
the car
• Option 1 – single queue
• As cars arrive, they wait in a single line for the next available car wash
• Option 2 – multiple queues
• Each car wash bay has its own line and as cars arrive, they queue into the shortest line
• Car wash is open 10 hours a day; simulate 50 days
• How does option 1 compare to option 2?
HW9 Q13.2 – Arena
• Arena is a simulation language that takes the “process-interaction” world
view
• Entities undergo a sequence of events and activities as it moves through the system
• Entities in the system compete for resources
• Flowchart
• Arena basics
• Create / Process / Dispose blocks
• Drag / drop blocks into model, assign attributes
• Connect blocks together to represent flow through the system
• Run model (lots of times!)
• View results
HW9 Q13.2 – Arena
• Create – entities enter the system
• Entities enter the system; how often? Arrival rate to inter-arrival time = ?
• Process – entities do something in the system
• Action – Seize / delay / release
• Can use resources
• Create in dialog or resource spreadsheet
• Define how many resources in resource spreadsheet
• Number of units to seize != number of units
• Expressions are your friend (hint: EXPO() )
• Don’t forget units
• Single process = single queue
HW9 Q13.2 – Arena
• Decide
• Multiple scanners, so multiple queues
• Passengers go to the shortest line, but how? Decide!
• N-way by condition
• Again, expressions are your friend; IF, returns true/false
• NQ(Process.Queue) = Number in queue
• MN(A,B) = Min value between
• Entities then sent to scanners (resources… Process)
• Dispose - entities leave the system… not much to do here
HW9 Q13.2 – Arena
• Run setup: Run -> Setup
• Replication Parameters Tab
• Number of replications
• Replication length
• Base time units
• Run -> Run Control -> Batch mode = go fast
• SIMAN vs. Crystal Reports vs. Excel Reports
• For v16.2 (Arena 2022) and newer
• Excel reports are the default
• Need to enable macros to see results
• Summary stats from AcrossReplicationsSummary tab are sufficient for this project
• For v16.1 and below, default reports are Crystal Reports (can be problematic for
some)
• SIMAN text-based results are also an option if you have problems with the previous
two
• Run->Setup->Reports->Default Report
• Gets you the same data but… may need to average wait times across replications
HW9 Q13.2 - SimPy
• SimPy also “process-interaction”
• Basics:
• Create a class for the airport “system”
• Airport system contains checker and scanner resources (member variables)
• Also contains functions that define what happens (time in process) when a passenger enters
the process
• Think of the resource spreadsheet and Process blocks in Arena
• Create functions for passenger (what the passenger does) and passenger arrival
• Think of connectors and non-process Arena blocks (ie Create/Decide/Dispose)
• Run simulation
• Create SimPy environment
• Start (env.process(Arrival))
• Define termination condition (run length = env.run(100))
• Must track and print all metrics manually!
Up Next…
• Same schedule as previous weeks (as always, check the syllabus for
official dates/times)
• HW9 due next Wednesday / Thursday
• HW9 peer reviews due Sunday / Monday

You might also like