Spreadsheet Simulation in Operations Research
Spreadsheet Simulation in Operations Research
OPERATIONS RESEARCH II
SIMULATION IN SPREADSHEETS
group_number 33
Introduction
Objectives....................................................................................................................4
Simulation in Spreadsheets:................................................................................5
Exercise 1:..............................................................................................................9
Exercise 2:............................................................................................................14
Exercise 3:............................................................................................................19
Conclusions:..........................................................................................................22
2
Introduction
3
Objectives
General objective:
Specific objectives:
4
Simulation in Spreadsheets:
Spreadsheet software turns out to be very useful tools when
it talks about simulations, as they greatly facilitate the generation processes
of random numbers and control through their different functions. For
start working with spreadsheets to solve models of
we will start by answering the following questions:
What is a simulation?
6
functioning of the same (obviously, our analysis will be more precise as
let n be the number of experiments that we carry out.
In addition, the power of the 'PCs' has recently made it possible for the
administrator uses spreadsheets to assess investment risk
financial, project evaluation, retirement plans, and other types of decisions
business. The above is due to the flexibility and statistical capacity of the sheet
of calculus, which makes it special for the development of models of
simulation, particularly in the use of Monte Carlo simulation. In fact, it is
perhaps the most elegant spreadsheet of all software applications,
Well, it gives the user great power in conducting the analyses.
financial.
Every time the RANDOM function is used, any real number between 0 and 1
it has the same probability of being generated (hence the name of distribution
uniform.
7
2. The different generated numbers are statistically independent of each other.
from others (that is, the value of the number generated at a given moment does not
depends on those generated earlier).
The RANDBETWEEN function is a volatile function in Excel. This means that each
whenever we press the F9 key or change any of the model's inputs,
all the cells where the RANDOM function appears will be recalculated from
automatic form.
Benefits of simulation:
8
Exercise 1:
Solution
=RANDBETWEEN(8,12)
This cell containing the function is copied to the remaining 3 years because it
will maintain the uniform distribution throughout the study period and the generated
set of random numbers that change with any type of update
that takes place in the spreadsheet.
4. Revenues will be equal to: =Year 1 demand * Selling price. Fixing the
cell that contains the selling price because it will always be the same,
then proceed to copy the argument from cell year 1 (=D15*$E$4)
in the following years.
5. The fixed costs are already provided in the statement, therefore they are fixed for all the
cells of the 4 years
6. Variable costs are given by = Year 1 Revenues * Variable Costs, they are set the
second cell used in the argument for being constant. (=H15*$E$6)
9
7. Annual amortization will be equal to the fixed amount of $10,000, so the cell is anchored.
in which that value is found and moves through the other years. (=$E$7)
8. Profit before tax, in this section is when the profit is obtained
the company before the government arrives and collects its respective taxes. The
first year is = first year income - fixed cost of year 1 - variable cost of
first year - annual amortization. (=H15-L15-P15-T15) And it shifts through the
cells that correspond to the other years.
Net income before tax is given by =Income before tax
year1 - (Profit before tax year1 * Cost of capital), the cell is fixed that
it contains the cost. (=X15-(X15*$E$8)) Then its argument is shifted three
cells to the right.
10. Net profit after tax, which is when it has already gone to the tax authority and has been completed.
the respective discount. This cell will contain =Net profit before the
tax year1 - (net profit before tax year1 * tax rate) and this
the last one is set as a constant value. (=AB15-(AB15*$E$9)) It is dragged down
argument for the following years.
11. With the net cash flow, a year 0 is added which means that it will be
where it starts when initiating production, that is, the investment that is made and is
It appears as an expense, so it should be multiplied by -1.
It will be necessary to place in this cell: =Project start-up cost*(-1), fixing
the entire argument since it will be a value that will not change (=$E$3*-1)
The first year of net cash flow is given by: =Net income of the first
year + amortization of year 1. (=AF15+T15) The argument is shifted in the
cells of the remaining 3 years.
It is so because depreciation is considered the wear and tear of machines and each
year is increasing, which results in a money outflow on the part of the
company but in terms of net cash flow the machine wears out one
amount that is not deducted from the company but is only a measurement for
that in the cash flow is contemplated since that money is still in the
bank.
12. Net present value is given by the Excel function NPV() which returns the
net present value of an investment based on a discount rate and a
series of future payments and entries. In this case, it will be =startup cost of
project + NPV(0.06, NPV year1, NPV year2, NPV year3, NPV year4) is used
generally the rate del 6% in some banks.
(=AJ15 + VNA(0.06, AK15, AL15, AM15, AN15))
13. Average NPV given by =AVERAGE($AO$15:AO15) function that
returns the average of the selected range of cells, focusing on the first
cell for accumulation.
10
14. Now that the table is complete, it is moved down 200 rows and is
they obtain the following data:
11
12
Analysis of results.
The company's focus will be on the current net present value because it is the
that reflects the profits they obtain in those 4 years
13
Exercise 2:
solution
The first step is to establish the different rate services offered by the
airline with their respective growth rates.
Subsequently, the values for the first period are determined, that is, the data
current passengers using the airline.
In this data, the year of study can be seen in the first column, the
period of the year subject to analysis which for this occasion are quarters, the data
current passengers using the airline per quarter and a
sum of the total passengers who use the services of the company.
=INT([Link](RAND(),E4*(1+E$2)^0.25,E4/20))
14
Due to the fact that we are working with people, the units must be discrete.
for that reason the INTEGER function is used to approximate the result
closest lower. The next part of the formula is the [Link] function that
returns the inverse of the normal cumulative function for a mean and deviation
specific standards. Within the parameters of the [Link] function are
the probability, the mean and the standard deviation. For the parameter of the
probability uses the RANDOM function which generates numbers between 0 and 1
every time you click on the spreadsheet, this is very convenient for
these types of procedures that require a probability value. The
the mean parameter defined by the equation E4*(1+E$2)^0.25 refers to
to the value of the previous period plus a variation determined by the rate of
growth previously defined in cell E2. And finally a standard deviation
defined by E4/20 that complies with the growth that the rate has year after year.
15
The advantage of this arrangement is that the number of years that can be projected is
analyst desires, as was previously established, the simulation is carried out
for each of the periods from the current year until 2023.
16
Using the RANDOM function, another set of data was determined, in
In a few words, another simulation was made. The variability of the data can be seen.
that have a tendency to increase over the years, this is due to the rate
of growth or decline which can vary according to the data
statisticians.
17
Drastic changes can be observed in the numbers of Rate 1, Rate 2 and
Rate 3 due to the change in its growth rates.
In addition to the table, this system has a graphics area that also varies.
in each simulation, which makes it easier to visualize the trends of each one
of the rates.
18
Growth rates can vary, as can the number of users.
in the first period. This makes it possible for the same model to be applied to
different situations, such as sales projections for a product line.
Using population growth rates, it is also possible to determine the
number of people who will use public services in the coming years.
19
20
Exercise 3:
Solution
Pseudo-random values are generated with the Rand() function in Excel, it was used
from the IF(condition, true, false) function, to determine the event
corresponding associated with the pseudo-random value obtained (note that we use
also the MIN function, since in no case will we be able to sell more licenses
that the available ones). The rest of the formulas are quite clear
21
Next, a sample of the table is shown for n iterations.
with the autocomplete function in Excel. Note that it is necessary to anchor the
reference cells for logical conditions.
Finally, it is possible to estimate the expected value of the random variable that
provide the benefits without more than finding the average of the 100 observations
that we just carried out. Likewise, we will use the functions STDDEV and
[Link] to find, respectively, the standard deviation of
the obtained sample and the confidence interval (at a 95% level) for the value
expected.
22
The sample mean is calculated using the average function and for the limits of the
confidence interval for the sample mean - the value of the interval amplitude
trustworthy.
Based on this analysis, we can perform the simulation for the purchase of 150,
200, 250 y 300 licencias.
23
Conclusions:
24