This blog discusses the applications of Monte-Carlo simulation methods by modeling real-world situations, explaining those using well known and often researched statistical distributions such as the Poisson distribution and then applying optimization models to solve a variety of business problems thus enabling managers to take decisions by moving beyond the usual methods and what-if scenario analysis.

Very often business managers are faced with dealing with uncertainty in the real world, while they already know the decisions they need to make, provided such situations were a certainly. Such situations are a plenty – For instance: How many agents do we need in a call center? How much should I stock a particular product? How many doctors do we need in a hospital? Where should I invest money based on project ROIs? In all these situations, the answer in a ‘certain’ world could be simple. If only call volume to a call center was fixed and steady through days, the number of patients visiting a hospital was the same every day and hour, we could forecast demand accurately or we know that the chances of project success was a certainty!

However, in the real world, situations are dynamic, consumer behavior changes rapidly and business managers are fraught with uncertainly. Managers usually use the term and the concept of “What-if” analysis to overcome such challenges posed by an uncertain world by drawing a finite set of possibilities and estimating the outcomes of that set, they usually understand the best and the worst case scenarios and thereby make their decisions accounting for such outcomes.

However, there are 2 disadvantages in this approach:

- The set of possibilities that someone can use is often finite and
- The weight or the probabilities of each situation is usually equally applied and may not necessarily replicate a real-world.

Recent advances in computers and the use of random numbers in what is often referred to as ‘Monte-Carlo simulation’ methods, together with ‘Optimization’ have made it possible to overcome these limitations and offer a high degree of accurate and fast outcomes by accounting for situations that couldn’t have been possible in other methods.

Monte-Carlo simulation methods are a broad class of computational algorithms that rely on repeated random sampling to mimic real-world occurrences of various possible situations and their outcomes. They have been used widely in physics and engineering where closed form of expressions are difficult to arrive at and in business to predict situations and take decisions based on historical events. The real trick is to model the real world as a “System”, to understand the various uncontrollable inputs to this system and by understanding historical patterns of these uncontrollable inputs, simulate the future and thereby the decisions that need to be taken.

A lot of empirical work done and theoretical premise in which the inputs are uncertain helps us benefit from such simulation as well. For instance:

- It is known via empirical study that calls to a call center or walk-ins to a hospital tends to follow an exponential (or inter-arrival Poisson) distribution.
- Errors from a Forecast model usually follows a normal distribution ( Assuming a regression model)
- The chance that an earthquake can occur in a given area again follows a Poisson process
- Request for a document from a webserver (Poisson process)

Similarly, in cases where there is no known premise or cannot be trusted, historical data can also be used to find if there is any pattern or any distribution that the data tends to follow. Once this is estimated, a computer can be programmed to generate random numbers that follow such estimated or theorized patterns , the outcomes generated for each situation and such situations replicated multiple times to model the real-world.

Simulation methods are good to model or mimic real world situations, but often fail standalone for their lack of ability to deal with business constraints. As an example, it may not be practically possible to have an infinite number of call center agents or doctors on call during rush hours, we may not be able to stock very little or very large quantities of a product due to existing contracts or manufacturing limitations or have the risk appetite to put all your money into a single venture. Here is where optimization helps – to deal with constrains imposed by a real world system which can be simulated and this combination can prove to be extremely effective.

Different types of optimization methods exist to solve Linear, Non Linear or Mixed integer problems along with special applications such as transportation problems, travelling salesman problems, assignment & scheduling problems etc. The idea behind all these problems though remain the same – optimizing resources based on real world operating constrains. Tools such as SAS, R, MATLAB, GLPK etc. have enormous algorithms that can be used to solve such problems and with computational power increasing, in shorter and shorter times.

As I have pointed out before both simulation and optimization methods have applications across domains. They have both been used widely in engineering but the applications of these in business are practically limitless. We at BRIDGEi2i have been extremely fortunate to apply some of these techniques across a wide variety of areas. Let me illustrate a few areas where we have used of simulation & optimization (or both)

- Staffing solution (Healthcare) – Optimizing & scheduling the number of physicians required in an out-patient ward
- Developing a compensation tool (Human Resources) – How to allocate annual increments & bonuses to employees based on data driven approach, optimizing between performance and pay ranges
- Vendor flexible inventory (Supply Chain) – Optimizing the ideal flexible inventory requirement for a multiple product portfolio based on historical forecast performance, lost sales cost, holding cost and service levels
- Marketing mix optimization (Education, marketing) – Optimizing investments across various online marketing vehicles based on historical lead generation & conversion

While there are many tools to solve simulation and optimization problems, we have extensively used SAS, R and EXCEL to solve them. The primary reason for choice of these tools apart from our obvious comfort levels are that a) Analysis ready enterprise data usually exists in the form of SAS datasets or Excel spreadsheets b) Wider range of problems that can be solved using such tools making integration easier and c) Familiarity of end users with tools such as excel making deployment easier.

**Objectives:** To calculate the vendor managed flexible inventory for a portfolio of over 1500 products, a fully SAS automated process for the same and a excel based front-end for disseminating the insights and for scenario & cost analysis

**Our Approach:**

- Calculate demand error for each product based on historical forecasts and actual demand – Includes forecast bias removal
- Analysis for estimating lost sales cost & holding cost for each product
- Segmentation of products based on error volatility, quantity of trade etc.
- For each product segment, identify the best fitting distribution of error
- Monte-Carlo simulation where future errors are drawn out of best error distributions and demand scenarios calculated
- Actual lost sales dollars, holding cost dollars and service levels for each scenario were estimated.
- Non-linear optimization to calculate the optimal level of inventory (and thereby flexible inventory) for each product such that appropriate service levels are met
- What-if scenario analysis for each product from 0% to 100% Flexibility requirement was drawn out
- Excel front end with provision for demand planner input and sensitivity analysis

**Tool and analysis snapshots:**

**Objectives:** To build a staffing solution for a healthcare clinic for a multi-shift scenario for a single department based on historical patient volumes.

**Our Approach:**

- Analyze data from the clinic to identify patient walk – in times, doctor service times and shifts
- Build a real world system to mimic patient walk-ins and doctor service times
- Calculate queue build up and service levels for each scenario
- Run simulation for various scenarios of patient walk-ins
- Optimization of number of doctors based on shifts, availability & affordability

**Tool and analysis snapshots:**

*The author, Vignesh CV is an Analytics Expert at BRIDGEi2i, a company on a mission to unleash the power of analytics and transform the lives of enterprises and individuals alike. We believe that the solutions to almost all intractable problems lies in our ability to mine & contextualize data. We want to help organizations prepare for adversity of all types by embracing data driven calculated risk taking, as a way of life.*

© 2019 Data Science Central ® Powered by

Badges | Report an Issue | Privacy Policy | Terms of Service

## You need to be a member of Data Science Central to add comments!

Join Data Science Central