Top Banner
ENGINEERING SYSTEM SIMULATION Fall 2010 Magdy Helal; Ph.D. Assistant Professor of Industrial Engineering - Benha University [email protected]
31
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript

ENGINEERING SYSTEM SIMULATIONFall 2010Magdy Helal; Ph.D.Assistant Professor of Industrial Engineering - Benha University [email protected] to Modeling and Simulation Course outline What is simulation? Advantages and disadvantages of simulation How simulation looks like Computer simulation software Dr. Magdy Helal2TextbookDr. Magdy Helal Textbook: Kelton W.D., Sadowski R., Sturrock D., 2007,Simulation With Arena, 4thEd., McGraw-Hill Arena Simulation Package version 12 Install Arena in your computer using the password student Resources: Law A., and W.D. Kelton, Simulation Modeling and Analysis, McGraw Hill, 4th ed., 2007. http://www.informs-sim.org/ http://www.scs.org/ http://www.arenasimulation.com/3What is Simulation?Chapter 1Dr. Magdy Helal4System and ModelDr. Magdy Helal What is a System? A collection of interrelated components and entities (people, machines, products, streets, etc.) , that interact together toward the accomplishment of some objectives Examples include Manufacturing facility, Bank or other personal-service operation, Hospital facilities (emergency room, operating room, admissions), Computer network, Chemical plant, Fast-food restaurant, Supermarket, University5System and ModelDr. Magdy Helal What is a Model? A representation of a system. It consists of a set of assumptions/approximations about how the system works We study systems to Measure performance Improve performance Design/redesign the system Control the system functioning6Ways to Study a System (Law & Kelton 2000)Dr. Magdy HelalSystemExperiment with the actual systemExperiment with a model of the systemPhysical modelMathematical modelAnalytical solutionSimulation7Study of SystemsDr. Magdy Helal If the system is simple enough, use mathematical and solve analytically to get results. But complex systems can seldom be validly represented by a simple analytical model Often, a complex system requires a complex model, and analytical methods do not apply what to do?8Computer SimulationDr. Magdy Helal Simulation can be defined as follows: A computer simulation is a descriptive technique in which a model of a process is developed then experiments are conducted on the model to evaluate its behavior under various operating conditions Simulation Modeling The term modeling refers to the development of a mathematical representation of a real-life situation Simulation refers to the procedure of solving the equations constitute the model while performing designed experiments to get results9Computer SimulationDr. Magdy Helal Simulation is used when optimization and mathematical techniques are to complicated or are unavailable Simulation allows more realistic factors to be considered Simulation can model the evolution of the system over time Simulation is virtually applicable to any type of system 10Analytical Solution vs. SimulationDr. Magdy Helal Which is better? In a barber shop, 100 clients on average arrive every day, it takes 13 minutes on average to finish a client estimate how many employees you need and the idle time Use queuing analysis Let your system run for one month and watch when more people arrive, how many of them require long times, how many clients require short times, how many clients require medium times etc.. Also watch when employees are most busy and when they are idle and when they are moderately busy so you can decide when to have more employees and when not Use a simulation model11Monte Carlo SimulationDr. Magdy Helal12 A probabilistic simulation technique used when a system/process has a random component Steps Identify the probability distribution that reflects the random component of the process Construct a cumulative probability distribution Assign Monte carol ranges to the cumulative probability distribution Use random numbers to select samples from the Monte Carlo ranges Collect the results from the random process and interpret themMonte Carlo SimulationDr. Magdy Helal13 A small electronic firm manufactures navigational instrument. Demand for the instrumentis probabilistic, and a review of past 100 weeks records has shown the weekly demand distribution to be as in the table. The regular time production capacityis 30 units/week, overtime capacityis 30 units/week, production cost/unitis $1,200 for regular production and$1,600 for overtime product. If the overhead cost / week is $10,000, prepare an aggregate production plan for this company for the next 12 weeksDemand (units) Frequency (number of times)10 1020 1430 2640 2450 1860 8Monte Carlo SimulationDr. Magdy Helal14 Use the historical demand distribution data to prepare a cumulative distribution and define the Monte Carlo ranges Monte Carlo ranges are in 2-digits because demand is given in 2-digit figuresDemand (Units) Frequency (Number of Times)Probability of Demand LevelCumulative ProbabilityMonte Carlo Ranges10 10 0.10 0.10 01 1020 14 0.14 0.24 11 2430 26 0.26 0.50 24 5040 24 0.24 0.74 51 7450 18 0.18 0.92 74 9260 8 0.08 1.00 93 - 00Monte Carlo SimulationDr. Magdy Helal15 Use tables of random numbers to execute your demand model, based on the ranges developed aboveMonte Carlo SimulationDr. Magdy Helal16 The aggregate plan is given belowWeekRandom numberMont Carlo RangeDemand Regular Time productionOvertimeProduction Production CostTotal Cost1 18 11 24 20 20 0 $24,000 $34,0002 25 24 50 30 30 0 36,000 46,0003 73 51 74 40 30 10 52,000 62,0004 12 11 24 20 20 0 24,000 34,0005 54 51 74 40 30 10 52,000 62,0006 96 93 - 00 60 30 30 84,000 94,0007 23 11 24 20 20 0 24,000 34,0008 31 24 50 30 30 0 36,000 46,0009 45 24 50 30 30 0 36,000 46,00010 01 01 10 10 10 0 12,000 22,00011 41 24 50 30 30 0 36,000 46,00012 22 11 24 20 20 0 $24,000 34,000Monte Carlo SimulationDr. Magdy Helal17 Based on the aggregate plan, the expected total cost of production for the next quarter is $ 560,000 We can also tell how much over time will be needed The results are only estimates, not exact values The results indicates the level at which the system will be working For accurate statistical analysis, a number of such Monte Carlo experiments (at least 10) is neededMonte Carlo SimulationDr. Magdy Helal18 Monte Carlo simulation shows how computer simulation model (as in our course) will work when it is run The input data is the historical data, prepared in the form of a statistical distribution The model is driven by the use of random numbers The random numbers are plugged into the statistical distribution to generate values that are consistent with the historical data that were used to develop the statistical distributionHow Simulation Modeling WorksDr. Magdy Helal19Advantages & Disadvantages of SimulationDr. Magdy Helal Advantages: Less restrictive assumption than analytical math models Flexibility to model things as they are Allows uncertainty, variability, and nonstationarity in modeling Supported by computer capabilities and languages/software Disadvantages: Does not give exact solutions; only statistical approximation that requires good statistical skills Expensive and time consuming to build Requires large amounts of data20Different Kinds of SimulationDr. Magdy Helal Static vs. Dynamic Does time have a role in the model? Continuous-change vs. Discrete-change The state change continuously or only at discrete points in time? Deterministic vs. Stochastic Is everything for sure or is there uncertainty? Most real systems: Dynamic, Discrete-change, Stochastic21Simulation LanguagesDr. Magdy Helal GPSS, Simscript, SLAM, and SIMAN Software packages: Arena, Simul8, Extend, AnyLogic, Vensim, Stella, and many others Arena The dominant commercial simulation software package Based on the SIMAN language and allows modelers to write code in VB or C We will use Arena 12.0 22About ArenaDr. Magdy Helal23About ArenaDr. Magdy Helal24About ArenaDr. Magdy Helal25What Are We Going to StudyDr. Magdy Helal In this course we are not learning the Arena software We are learning how to build simulation models with the SIMAN language - Arena is the interface to use the language We will learn how to define the model, collect its data, build the model, define the running settings, and analyze the outputs Those topics are not Arena functions. They are what is done with all simulation language and software packages. You also do them if you build your model using a general purpose programming language like C or VB26AssignmentDr. Magdy Helal Check the Internet to find information on the available simulation software packages and simulation languages Send it by e-mail as an Excel file The contents should include the following: Number Software/language name Type: discrete, continuous, agent-based, etc. Recommended applications to use it Vendor Website Short description In the e-mail give your name clearly and your number27Monte Carlo Simulation ProblemsDr. Magdy Helal28 The number of jobs received by a small shop is to be simulated for an 8-day period. The shop manager has collected the following data: Use the third column of the random numbers table and determine the average number of jobs per day for the 8-day period. Use MS ExcelNumber of Jobs 2 or less 3 4 5 6 7 8 9 or moreFrequency 1 10 50 80 40 16 4 2Monte Carlo Simulation ProblemsDr. Magdy Helal29 Jack sells insurance on a part time basis. His records on the number of policies sold per week over 50-week period are as follows: Simulate three 5-week periods. Use column 6 for the first simulation, column 7 for the second, and column 8 for the third. In each simulation, determine the percentage of days in which two or more policies are sold. Use MS ExcelNumber sold 0 1 2 3 4Frequency 8 15 17 7 3Monte Carlo Simulation ProblemsDr. Magdy Helal30 A leading dealer of consumer electronics is planning to apply scientific inventory policies in order to minimize the inventory costs. He identified that one product (fan) is popular, and the demand for it is random and unstable. Past sales records indicate that the pattern of daily demand can be described by the following probability distribution. The lead time from making an order to receiving the ordered fans is fixed at 5 days. Daily demand (units)4 5 6 7 8 9 10 11 12Probability 0.06 0.14 0.18 0.17 0.16 0.12 0.08 0.06 0.03Monte Carlo Simulation ProblemsDr. Magdy Helal31 The dealer decided to use an inventory policy in which he makes an order for 50 units whenever the inventory in hand is 40 units. If the inventory level now is 75 units, use Monte Carlo simulation to test the inventory policy for 36 days (using the first three columns of the random number table Make a table in MS Excel to show the following: Daily demand units based on the simulation run The inventory level at the end of each day When orders are made When orders are received Lost sales