In the previous chapters, we formulated and analyzed various models on real-life problems. All the models were used with mathematical techniques to have analytical solutions. In certain cases, it might not be possible to formulate the entire problem or solve it through mathematical models. In such cases, simulation proves to be the most suitable method, which offers a near-optimal solution. Simulation is a reflection of a real system, representing the characteristics and behavior within a given set of conditions.
In simulation, the problem must be defined first. Secondly, the variables of the model are introduced with logical relationship among them. Then a suitable model is constructed. After developing a desired model, each alternative is evaluated by generating a series of values of the random variable, and the behavior of the system is observed. Lastly, the results are examined and the best alternative is selected the whole process has been summarized and shown with the help of a flow chart in the Figure.
Simulation technique is considered as a valuable tool because of its wide area of application. It can be used to solve and analyze large and complex real world problems. Simulation provides solutions to various problems in functional areas like production, marketing, finance, human resource, etc., and is useful in policy decisions through corporate planning models. Simulation experiments generate large amounts of data and information using a small sample data, which considerably reduces the amount of cost and time involved in the exercise.
For example, if a study has to be carried out to determine the arrival rate of customers at a ticket booking counter, the data can be generated within a short span of time can be used with the help of a computer.
ADVANTAGES AND DISADVANTAGES OF SIMULATION
Simulation is best suited to analyze complex and large practical problems when it is not possible to solve them through a mathematical method.
Simulation is flexible, hence changes in the system variables can be made to select the best solution among the various alternatives.
In simulation, the experiments are carried out with the model without disturbing the system.
Policy decisions can be made much faster by knowing the options well in advance and by reducing the risk of experimenting in the real system.
Simulation does not generate optimal solutions.
It may take a long time to develop a good simulation model.
In certain cases simulation models can be very expensive.
The decision-maker must provide all information (depending on the model) about the constraints and conditions for examination, as simulation does not give the answers by itself.
MONTE CARLO SIMULATION
Monte Carlo simulation is a computerized mathematical technique that allows people to account for risk in quantitative analysis and decision making. The technique is used by professionals in such widely disparate fields as finance, project management, energy, manufacturing, engineering, research and development, insurance, oil & gas, transportation, and the environment.
Monte Carlo simulation furnishes the decision-maker with a range of possible outcomes and the probabilities they will occur for any choice of action..
It shows the extreme possibilities—the outcomes of going for broke and for the most conservative decision—along with all possible consequences for middle-of-the-road decisions.
The technique was first used by scientists working on the atom bomb; it was named for Monte Carlo, the Monaco resort town renowned for its casinos. Since its introduction in World War II, Monte Carlo simulation has been used to model a variety of physical and conceptual systems.
Monte Carlo simulation performs risk analysis by building models of possible results by substituting a range of values—a probability distribution—for any factor that has inherent uncertainty. It then calculates results over and over, each time using a different set of random values from the probability functions. Depending upon the number of uncertainties and the ranges specified for them, a Monte Carlo simulation could involve thousands or tens of thousands of recalculations before it is complete. Monte Carlo simulation produces distributions of possible outcome values.
By using probability distributions, variables can have different probabilities of different outcomes occurring. Probability distributions are a much more realistic way of describing uncertainty in variables of a risk analysis. Common probability distributions include:
Normal – Or “bell curve.” The user simply defines the mean or expected value and a standard deviation to describe the variation about the mean. Values in the middle near the mean are most likely to occur. It is symmetric and describes many natural phenomena such as people’s heights. Examples of variables described by normal distributions include inflation rates and energy prices.
Lognormal – Values are positively skewed, not symmetric like a normal distribution. It is used to represent values that don’t go below zero but have unlimited positive potential. Examples of variables described by lognormal distributions include real estate property values, stock prices, and oil reserves.
Uniform – All values have an equal chance of occurring, and the user simply defines the minimum and maximum. Examples of variables that could be uniformly distributed include manufacturing costs or future sales revenues for a new product.
Triangular – The user defines the minimum, most likely, and maximum values. Values around the most likely are more likely to occur. Variables that could be described by a triangular distribution include past sales history per unit of time and inventory levels.
PERT- The user defines the minimum, most likely, and maximum values, just like the triangular distribution. Values around the most likely are more likely to occur. However values between the most likely and extremes are more likely to occur than the triangular; that is, the extremes are not as emphasized. An example of the use of a PERT distribution is to describe the duration of a task in a project management model.
Discrete – The user defines specific values that may occur and the likelihood of each. An example might be the results of a lawsuit: 20% chance of positive verdict, 30% change of negative verdict, 40% chance of settlement, and 10% chance of mistrial.
During a Monte Carlo simulation, values are sampled at random from the input probability distributions. Each set of samples is called an iteration, and the resulting outcome from that sample is recorded. Monte Carlo simulation does this hundreds or thousands of times, and the result is a probability distribution of possible outcomes. In this way, Monte Carlo simulation provides a much more comprehensive view of what may happen. It tells you not only what could happen, but how likely it is to happen.
Monte Carlo simulation provides a number of advantages over deterministic, or “single-point estimate” analysis:
Probabilistic Results: Results show not only what could happen, but how likely each outcome is.
Graphical Results: Because of the data a Monte Carlo simulation generates, it’s easy to create graphs of different outcomes and their chances of occurrence. This is important for communicating findings to other stakeholders.
Sensitivity Analysis: With just a few cases, deterministic analysis makes it difficult to see which variables impact the outcome the most. In Monte Carlo simulation, it’s easy to see which inputs had the biggest effect on bottom-line results.
Scenario Analysis: In deterministic models, it’s very difficult to model different combinations of values for different inputs to see the effects of truly different scenarios. Using Monte Carlo simulation, analysts can see exactly which inputs had which values together when certain outcomes occurred. This is invaluable for pursuing further analysis.
Correlation of Inputs: In Monte Carlo simulation, it’s possible to model interdependent relationships between input variables. It’s important for accuracy to represent how, in reality, when some factors go up, others go up or down accordingly.
Procedure for Monte Carlo Simulation:
Step 1: Establish a probability distribution for the variables to be analyzed. Step 2: Find the cumulative probability distribution for each variable. Step 3: Set Random Number intervals for variables and generate random numbers. Step 4: Simulate the experiment by selecting random numbers from random numbers
tables until the required number of simulations are generated. Step 5: Examine the results and validate the model.
SIMULATION OF DEMAND FORECASTING PROBLEM
Example : An ice-cream parlor's record of previous month’s sale of a particular variety of ice cream as follows (see Table).
Simulation of Demand Problem
Simulate the demand for first 10 days of the month
Solution: Find the probability distribution of demand by expressing the frequencies in terms of proportion. Divide each value by 30. The demand per day has the following distribution as shown in table.
Probability Distribution of Demand
Find the cumulative probability and assign a set of random number intervals to various demand levels. The probability figures are in two digits, hence we use two digit random numbers taken from a random number table. The random numbers are selected from the table from any row or column, but in a consecutive manner and random intervals are set using the cumulative probability distribution as shown in Table.
Cumulative Probability Distribution
To simulate the demand for ten days, select ten random numbers from random number tables. The random numbers selected are, 17, 46, 85, 09, 50, 58, 04, 77, 69 and 74 The first random number selected, 7 lies between the random number interval 17-49 corresponding to a demand of 5 ice-creams per day. Hence, the demand for day one is 5. Similarly, the demand for the remaining days is simulated as shown in Table.
Example : A dealer sells a particular model of washing machine for which the probability distribution of daily demand is as given in Table.
Probability Distribution of Daily Demand
Find the average demand of washing machines per day.
Solution: Assign sets of two digit random numbers to demand levels as shown in Table.
Random Numbers Assigned to Demand
Ten random numbers that have been selected from random number tables are 68, 47, 92, 76, 86, 46, 16, 28, 35, 54. To find the demand for ten days see the Table below.
Table 15.7: Ten Random Numbers Selected
Average demand =28/10 =2.8 washing machines per day. The expected demand /day can be computed as,
Expected demand per day
The average demand of 2.8 washing machines using ten-day simulation differs significantly when compared to the expected daily demand. If the simulation is repeated number of times, the answer would get closer to the expected daily demand.
Example : A farmer has 10 acres of agricultural land and is cultivating tomatoes on the entire land. Due to fluctuation in water availability, the yield per acre differs. The probability distribution yields are given below:
a. The farmer is interested to know the yield for the next 12 months if the same water availability exists. Simulate the average yield using the following random numbers 50, 28, 68, 36, 90, 62, 27, 50, 18, 36, 61 and 21, given in table.
b. Due to fluctuating market price, the price per kg of tomatoes varies from Rs. 5.00 to Rs. 10.00 per kg. The probability of price variations is given in the Table below. Simulate the price for next 12 months to determine the revenue per acre. Also find the average revenue per acre. Use the following random numbers 53, 74, 05, 71, 06, 49, 11, 13, 62, 69, 85 and 69.
Table for Random Number Interval for Yield
Table for Random Number Interval for Price
Simulation for 12 months period
Average revenue per acre = 21330 / 12 = Rs. 1777.50
Example : J.M Bakers has to supply only 200 pizzas every day to their outlet situated in city bazaar. The production of pizzas varies due to the availability of raw materials and labor for which the probability distribution of production by observation made is as follows:
Simulate and find the average number of pizzas produced more than the requirement and the average number of shortage of pizzas supplied to the outlet.
Solution: Assign two digit random numbers to the demand levels as shown in table
Random Numbers Assigned to the Demand Levels
Selecting 15 random numbers from random numbers table and simulate the production per day as shown in table below.
Simulation of Production Per Day
The average number of pizzas produced more than requirement
= 0.8 per day
The average number of shortage of pizzas supplied
= 0.26 per day
SIMULATION OF QUEUING PROBLEMS
Example : Mr. Srinivasan, owner of Citizens restaurant is thinking of introducing separate coffee shop facility in his restaurant. The manager plans for one service counter for the coffee shop customers. A market study has projected the inter-arrival times at the restaurant as given in the table. The counter can service the customers at the following rate:
Simulation of Queuing Problem
Mr. Srinivasan will implement the plan if the average waiting time of customers in the system is less than 5 minutes. Before implementing the plan, Mr. Srinivasan would like to know the following:
Mean waiting time of customers, before service.
Average service time.
Average idle time of service.
The time spent by the customer in the system.
Simulate the operation of the facility for customer arriving sample of 20 cars when the restaurant starts at 7.00 pm every day and find whether Mr. Srinivasan will go for the plan.
Solution: Allot the random numbers to various inter-arrival service times as shown in table.
Random Numbers Allocated to Various Inter-Arrival Service Times
Mean waiting time of customer before service = 20/20 = 1 minute
Average service idle time = 17/20 = 0.85 minutes
Time spent by the customer in the system = 3.6 + 1 = 4.6 minutes.
Example : Dr. Strong, a dentist schedules all his patients for 30 minute appointments. Some of the patients take more or less than 30 minutes depending on the type of dental work to be done. The following table shows the summary of the various categories of work, their probabilities and the time actually needed to complete the work.
Simulate the dentist’s clinic for four hours and determine the average waiting time for the patients as well as the idleness of the doctor. Assume that all the patients show up at the clinic exactly at their scheduled arrival time, starting at 8.00 am. Use the following random numbers for handling the above problem: 40, 82, 11, 34, 25, 66, 17, 79
Solution: Assign the random number intervals to the various categories of work as shown in table.
Random Number Intervals Assigned to the Various Categories
Assuming the dentist clinic starts at 8.00 am, the arrival pattern and the service category are shown in table.
Arrival Pattern of the Patients
The arrival, departure patterns and patients’ waiting time are tabulated.
The dentist was not idle during the simulation period. The waiting times for the patients are as given in table below.
Patient's Waiting Time
The average waiting time of patients = 285/8 = 35.625 minutes.
SIMULATION OF INVENTORY PROBLEMS
A dealer of electrical appliances has a certain product for which the probability distribution of demand per day and the probability distribution of the lead-time, developed by past records are as shown in the following tables.
Probability distribution of lead demand
Probability distribution of lead time
The various costs involved are,
Ordering Cost = Rs. 50 per order
Holding Cost = Rs.1 per unit per day
Shortage Cost = Rs. 20 per unit per day
The dealer is interested in having an inventory policy with two parameters, the reorder point and the order quantity, i.e., at what level of existing inventory should an order be placed and the number of units to be ordered. Evaluate a simulation plan for 35 days, which calls for a reorder quantity of 35 units and a re-order level of 20 units, with a beginning inventory balance of 45 units.
Solution: Assigning of random number intervals for the demand distribution and lead time distribution is shown in Tables 15.25 and 15.26 respectively.
Random Numbers Assigned for Demand Per Day
Random Numbers Assigned for Lead-time
Simulation Work-sheet for Inventory Problem (Case – 1)
The simulation of 35 days with an inventory policy of reordering quantity of 35 units at the time of inventory level at the end of day is 20 units, as worked out in table. The table explains the demand inventory level, quantity received, ordering cost, holding cost and shortage cost for each day.
Completing a 35 day period, the costs are
Total ordering cost = (6 × 50) = Rs 300.00
Total holding cost = Rs. 768.00
Since the demand for each day is satisfied, there is no shortage cost.
Therefore, Total cost = 300 + 768 = Rs. 1068.00
For a different set of parameters, with a re-order quantity of 30 units and the same reorder level of 20 units, if the 35-day simulation is performed, we get the total of various costs as shown in the previous table.
Total ordering cost = 6 × 50 = Rs. 300.00
Total holding cost = Rs. 683.0
Total shortage cost = Rs. 20.00
Total cost = 300 + 683 + 20 = Rs. 1003.00
If we analyze the combination of both the parameters, Case II has lesser total cost than Case I. But at the same time, it does not satisfy the demand on 33rd day that might cause customer dissatisfaction which may lead to some cost.
In this type of problems, the approach with various combinations of two parameter values is simulated a large number of times to find the total cost of each experiment, compare the total cost and select the optimum alternative, i.e., that one which incurs the lowest cost.