IE 415/515 – Simulation Today’s Agenda Information on syllabus Office hours Prerequisites Text Grading Exams & Homework Class format Introduction to IE simulation Continue lecture material Office Hours Mondays/Wednesdays 3-4:30PM By appointment Office 424 Rogers E-mail: No HW/technical questions! TA: Faisal Alfayez, Zahra Mohktari Office hours TBD Prerequisites Stat 314 or equivalent will be needed. Computer programming experience – Helpful but not critical. If specific material is needed, it will be covered for course purposes. Knowledge of Windows and Excel is assumed. Experience programming and debugging is helpful. Some ENGR 390 (engineering economics) background. Course Information Course homepage : http://classes.engr.oregonstate.edu/mime/winter2015/ie415-001 Syllabus Lecture slides for note taking Handouts This introductory presentation Information sheet Homework and lab assignments Check the page for course information and announcements. References Kelton, W.D., Sadowski, R.P. and N.B. Swets, (2010). Simulation With Arena 5th Edition, McGraw-Hill Inc. Valley Library -11 copies on one-day reserve. Law, A.M. and W.D. Kelton, (2000). Simulation Modeling and Analysis 3rd Edition, McGraw-Hill Inc. Two earlier editions on 3-hour reserve Banks, J., Carson, J.S., Nelson, B.L., Nicol, D.M., (2010). Discrete Event System Simulation 5th Edition, Prentice Hall. On Reserve. Arena online books. Crystal Ball online documentation. Grading – Allocation Mid-term Exam (2/15/2015) 25% Final Exam (Monday 3/16/2015 12:001:50PM) 35% Lab Exams (Week 4 lab, Week 9 lab) 20% Homework/Lab Assignments (12-14 Labs/HW) Class Participation (includes information sheet if applicable) Class participation based on: 1. Participation in class – answering questions 2. In-class exercises 3. Random attendance taken 4. Submitting information sheet 15% 5% Grading Scale 92 or above A 89-92 A- 86-89 B+ 82-86 B 79-82 B- 76-79 C+ 72-76 C 69-72 C- 59-69 D Exams, Homework, Labs Homework 5-7 homework assignments will be given. Some solutions for programming problems will be provided after assignment is turned in. Group study is encouraged but each person should understand all problems. Due at the beginning of class – Late HW penalized After the final call for homework – 2 out of 10. After 12 noon the day immediately following the final call – assignment not accepted. Exams, Homework, Labs Labs Labs start in week 1. Seven total lab assignments – No labs in week 10. Due by the end of lab. Counts the same as a HW assignment. Switching lab sections Only with prior approval of the TAs or instructor. The number approved requests for switching sections will be limited. Exams, Homework, Labs Lab exams Two lab exams: week 4 and week 9. Tests simulation modeling with specific software. Graded by the TAs. Different sections will be given different versions of the exam. The paper copies of the exam are to be returned to the TAs. No photographs of the exam are allowed. Exams, Homework, Labs In-class Exams Open book and open note exams – No laptop computers, tablets, smartphones, etc. and no electronic communication permitted. Based on homework, lecture material (in-class exercises and examples), labs. Exams will only be distributed in class and in office hours for viewing and will then be returned to the instructor. No photos of the exam are allowed. Grading questions/modifications must be brought to the instructor within one week after the exam is returned in class. Recipe for Failure Low effort on HW Utilize solutions from prior terms Split problems with classmates Turn in late HW Low effort on labs Rely on your partner to complete lab Focus on procedures instead of what the procedure accomplishes Don’t attend class Physically Mentally Things To Do Do the opposite of Recipe for Failure Get your points Get your HW and lab points At some point do the HW and labs with good effort Seek help early in the term if needed Do problems under a time constraint IE 415 vs. IE 515 IE 415/515 differences IE 515 – additional homework (may require study outside of class material) One or more questions on each exam will differ Grading will be harder for 515 students Lecture Format The first part of class will be devoted to questions. Unreasonably long questions will be handled one on one. Lecture Ask questions End of Class – Will try to leave time for questions. Lecture Format Material will be delivered on slides using a tablet PC. Material will be added to the slides during class. Examples will be completed electronically on the slides. There will be periodic in-class problem solving sessions. Solutions completed electronically on slides. Minor changes to the slides may be made just before class. All added (hand written) material is your responsibility – They will not be available on the website. Class Rules Turn off/quiet cell & smart phones and other communication devices. No web surfing. No newspapers. No completing homework or other assignments. No sleeping. Use common sense and be considerate of others. 18 Questions ? IE 415/515 - Introduction Simulation Example 1 As an IE working at a manufacturing plant, you are asked to help evaluate a potential investment in a new machine (at a highly utilized process step). The company has a number of different types of jobs that undergo processing at this step. Currently there are five machines, and each machine can only process a subset of the jobs. Each existing machine also experiences random failures. The new machine can process any of the currently produced jobs. Jobs arrive in batches (each batch with different job types of known composition). Assuming the percentages of different job types remains the same, you are asked to evaluate the increased throughput realizable by purchasing this machine. A,B Jobs to be processed C,D Completed jobs at rate? . . . J,K New Machine – All job types Example 2 Applying engineering economic analysis to evaluate the NPV of two alternatives for fork lift purchases. In addition to NPV, evaluate each alternative with respect to cost risk/uncertainty. There is uncertainty in many of the parameters used in these calculations. Example 2 Known parameters Initial costs Approximate fuel costs (e.g., gas vs. electric) in the near future. Unknown parameters Breakdown/maintenance costs Salvage/resale value Future fuel costs Example How do you proceed? Approaches Experience/Intuition Often effective but limited in very complex situations Analytical models – Mathematical equations Usually preferred if available Usually very fast – many types of “what if” Provide insight into key parameters Limited availability/accessibility Computer simulations Applicable to the most complex situations given enough time Simulation Questions How do you simulate these systems? What software choices? How are system dynamics represented/simulated? How do you represent randomness in the system? What is the form of the answer? How do you interpret simulation results? What data needs to be collected? … How is the data processed? Simulation Dictionary definition – “to look or act like” Almost everything done in engineering is simulation Engineers build models to predict and understand the performance of all types of things, systems, and processes Examples Equations predicting what happens in physical systems – thermodynamics, statics, … Physical prototypes of products for development, test and validation Final product testing Process validation – Soft tooling Flight simulators Arcade games Types of Systems IEs Simulate They are big and costly Involve people Random events/values occur over time The systems are too big to build physical prototypes A calculation may involve the combination of multiple random components The systems may not exist Systems IEs Simulate - Examples Production line performance Call centers performance Plant floor layout – material movement Scheduling of resources Network performance Inventory control/ordering points Distribution and routing Engineering economic calculations incorporating randomness … Characteristics of Systems IEs Simulate System operation is often dictated by manmade rules, or the focus is on establishing efficient rules Examples Staffing for a desired level of customer performance. Sizing/allocation of storage areas. The number of machines to use at a workstation. The scheduling of work. Etc. IE Computer Simulations In practice, simulation refers to the process of designing and creating computerized models of a system and doing numerical computer-based experiments. Real power - application to complex systems. Industry acceptance. Objectives of IE Analysis Estimate performance Throughput of a production line. Average wait time for customers. Minimum investment to achieve a target. Distribution of NPV values. … Evaluate designs Plant layouts Scheduling rules Production system configurations … IE Computer Simulations - Types Deterministic/Stochastic Discrete/Continuous state Static/Dynamic IE 415/515 will focus on Stochastic, Discrete, Static & Dynamic simulations. Example Expected value (average) of the max value from two rolls of a die Approaches Experience/intuition Analytical Simulation Physical Computer simulation Example Experience/Intuition Example – Analytical Model Expected value (average) of the max value from two rolls of a die Analytical (can also enumerate for this example). E[max( X 1 , X 2 )] E[ E[max( X 1 , X 2 | X 1 )]] 1 6 * E[max( X 1 , X 2 | X 1 i )] 6 i 1 i 6 (i 1) i E[max( X 1 , X 2 | X 1 i )] (i * ) * (1 ) 6 2 6 42 i i 2 12 1 6 42 i i 2 E[max( X 1 , X 2 )] 4.47 6 i 1 12 Simulation Expected value (average) of the max value from two rolls of a die Physical simulation Example Expected value (average) of the max value from two rolls of a die Computer simulation Example Computer simulation answer is not a single value More work – more precision 95 % Confidence Intervals for the Avg. 150 Trials Half Width Low Limit Upper Limit 0.23292914 4.12707086 4.592929141 1500 Trials Half Width Low Limit Upper Limit 0.07068044 4.34931956 4.49068044 Static Stochastic Simulation Spreadsheet packages @Risk Crystal Ball Dynamic Stochastic Simulation The passing of time is a fundamental part of the simulation. For IEs this time is normally the time a system (e.g., a plant) is operating. Dynamic stochastic simulations are often animated Validation Communication Example M/M/1 Queuing System Avg. # in queue, Avg. time in system Example Experience/Intuition Example – Analytical Model M/M/1 Queuing System Many results have been obtained. Example – Physical Simulation M/M/1 Queuing System Most likely not possible – Instead, the real system can be observed. Example – Computer Simulation M/M/1 Queuing System Arena software utilized. Dynamic Stochastic Simulations Physical simulations too costly or not possible. Analytical models do not exist - System is too complex. Demo Dynamic Stochastic Simulations Normally executed with “simulation software” General-purpose languages (C++) Tedious, low-level, error-prone Almost complete flexibility Can be used to program static stochastic simulations too Support packages Subroutines for list processing, bookkeeping, time advance Widely distributed, widely modified Dynamic Stochastic Simulations Simulation languages GPSS, SIMSCRIPT, SLAM, SIMAN Learning curve for features, effective use, syntax High-level simulators Very easy, graphical interface Domain-restricted (manufacturing, communications) Limited flexibility — model validity? Dynamic Stochastic Simulations Demo Warnings Simulation is very time consuming Model development Data collection This often makes simulation infeasible Simulations are complicated – Easy to make errors (logical), validation is often difficult Garbage in – Garbage out Simulation output has randomness Goals of this Course Students successfully completing this course should (independent of the simulation system): Understand the basic mechanics of how almost all discrete event simulation systems operate Be able to carry out a “complete” simulation project Understand pros and cons of using simulation to study dynamic systems Simulation Coverage Outline Start with static stochastic simulations Probability and statistics required Cover fundamentals in lecture We will use Excel/Crystal Ball Software in the lab Move to discrete dynamic stochastic simulations Cover fundamentals in lecture We will use Arena software in the lab