Professional Documents
Culture Documents
101 2018 3 B
101 2018 3 B
Simulation
DSC3703
Semester 1 and 2
Important Information:
Please register on MyUnisa, activate your myLife e-mail addresses and make sure that
you have regular access to the myUnisa module website, DSC3703-2018-S1/S2, as well as
your group website.
Note: This is an online module, and therefore your module is available on myUnisa. This is the
only document you will receive in printed format.
Bar code
Contents
6 ASSESSMENTS 7
6.1 Assessment plan . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
6.2 Assignment due dates . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
7 ASSIGNMENTS 8
8 EXAMINATION 11
9 CONCLUSION 11
2
DSC3703/101/3
Dear student
Welcome to the Department of Decision Sciences and the module, Simulation. We hope that you will find
this module interesting and that you will complete it successfully.
The purpose of this module is to provide the learner with a theoretical basis for structuring and solving
simulation models in practice.
Simulation is one of the main modelling tools of the subject discipline Operations Research (OR). In most
other OR subjects, such as linear programming, nonlinear programming, PERT/CPM and decision theory,
analytical methods are used to model problems. In simulation the emphasis falls on numerical techniques.
The OR student often finds this approach to modelling to be quite new and strange. A different logic than
usual is followed in structuring solutions. When studying other OR subjects, a linear way of thinking and
working may be applied in order to obtain the necessary knowledge and skills, since each subsection usually
follows logically from the previous one. In simulation however, a wide variety of techniques might have to
be applied simultaneously in the overall picture. This calls for a parallel way of thinking and working,
where subjects need to be mastered in a piece-wise fashion. Initially a student of simulation may thus feel
lost, because it might seem as if the different subjects have no connection. As each subsection is studied
however, he should keep in mind that everything will fall into place once the overall picture begins to take
shape.
The thinking skill that the student obtains through this learning process, is usually extremely useful in
practice. Therefore the aim of this module is to help the student obtain the necessary thinking skills and
theoretical basis for analysing problems in order to find solutions and gain a better understanding of a
system by using certain simulation techniques.
2.2 Outcomes
Learning outcome 1. Students are able to structure static (Monte Carlo) and dynamic simulation
models.
Assessment criteria
1. Recognise an instance of and explain the different concepts dealing with static (Monte Carlo) and
dynamic simulation problems.
5. Set out the steps of an algorithm that model a static (Monte Carlo) or dynamic simulation problem.
3
6. Draw flow diagrams that model a static (Monte Carlo) or dynamic simulation problem.
7. Program simulation models by writing down relevant source codes in a structured programming.
Learning Outcome 2. Students can apply mathematical and statistical concepts in the generation,
analysis and interpretation of the input and output of simulation models.
Assessment criteria
1. Recognise an instance of and explain the different concepts dealing with the generation, analysis and
interpretation of the input and output data of simulation models.
3. Apply goodness-of-fit tests on data to determine whether rows of random numbers are from the
uniform distribution U[0; 1) or not.
4. Calculate summary statistics of data and draw conclusions about the underlying distribution.
5. Apply goodness-of-fit tests to data in order to choose suitable probability distributions for the input
or output data of a simulation model.
7. Derive algorithms for generating random numbers from statistical distributions such as the uniform
distribution, the exponential distribution, the Weibull distribution and the triangular distribution
according to the inverse transformation method.
8. Derive, set out and apply the steps of algorithms to generate random numbers from statistical
distributions according to the acceptance-rejection method.
9. Derive, set out and apply the steps of algorithms to generate random numbers from statistical
distributions according to the convolution method, such as the simplified convolution algorithm to
generate random numbers from the standard normal distribution.
11. State and derive formulae for the estimation of relevant performance measures for a simulation.
12. Discuss statistical issues regarding the estimation of performance measures in a simulation.
4
DSC3703/101/3
3.1 Lecturer
You will find the name of the lecturer responsible for this module under myUnisa. We suggest that you
write the name and contact details of the lecturer in the space below.
Lecturer:
The lecturer will assist you with any problems you may experience with the contents of the study material.
Feel free to contact the lecturer, but please phone beforehand to make an appointment if you wish to see
the lecturer in person.
3.2 Department
3.3 University
To contact the University follow the instructions in the brochure Study @ Unisa. Remember to have your
student number available whenever you contact the University. Whenever you write to a lecturer, please
include your student number to enable the lecturer to help you more effectively.
The following book has been prescribed for this module and you must purchase it:
WINSTON, W L. 2004.
Operations Research: Applications and Algorithms.
4th edition: Thomson.
We will refer to this book as Winston in the remainder of this tutorial letter.
Sections from Winston to be studied:
You must study Chapters 21, 22, and 23 and read Chapter 20.
5
4.2 Study material
The study guide and tutorial letter 101 are available on myUnisa.
The simulation models that are discussed in this module are all implemented in the software
“Mathematica”. The University has a Mathematica Campus License, which includes use of Mathematica on
Campus, together with a number of student licenses as well as home use licenses. Mathematica is available
to all registered students at Unisa (unlimited site licence).
For Mathematica use at home or on a laptop, a personal license key is required for each staff member or
student. Licenses are automatically generated and sent to students if they use their @mylife.unisa.ac.za
email address. To obtain this license key:
This link will only work if a @mylife.unisa.ac.za email address was used to create the profile. Other email
addresses will allow a profile to be created but will not generate a license.
Programming skill is essential in simulation. However, in this module you need only to be able to follow the
logic of a program written in a structured programming language.
If you have access to a computer that is linked to the internet, you can quickly access resources and
information at the University. The myUnisa learning management system is the University’s online campus
that will help you communicate with your lecturers, with other students and with the administrative
departments at Unisa Ű all through the computer and the internet. You can start at the main Unisa
website at http://www.unisa.ac.za and then click on the myUnisa orange block. This will take you to
the myUnisa website. To go to the myUnisa website directly, go to https://my.unisa.ac.za. Click on
the Claim UNISA Login on the right-hand side of the screen on the myUnisa website. You will then be
prompted to give your student number in order to claim your initial myUnisa details as well as your myLife
e-mail login details. For more information on myUnisa, consult the brochure Study @ Unisa, which you
received with your study material.
Since this is a semester module your study time is limited. In this limited period of time, you must work
through the study material and prepare for the examination. We suggest that you approach the study
material as follows:
• First, download Mathematica as indicated in section 4.3. Familiarize yourself with the basics of
Mathematica.
6
DSC3703/101/3
• Study Chapter 1, 2, 3 and 4. Study all the examples and understand the solutions that are provided.
Do all the exercises. Do assignment 01.
• After submitting Assignment 01, study Chapters, 5, 6 and 7. Extra exercises with solutions will be
posted on myUnisa (under Additional resources). Do Assignment 02.
6 ASSESSMENTS
The Management of the University has introduced compulsory assignments in all modules so that students
can benefit fully from Unisa’s formative tuition and assessment.
This tutorial letter contains two compulsory assignments, two for the first semester and another two for the
second semester. Each assignment will count 50% towards your semester mark. The semester mark will
contribute 20% and your examination mark 80% to your final mark. A sub-minimum of 40% applies to your
examination. It means that your semester mark will be ignored if your examination mark is less than 40%,
and your examination mark will then be your final mark. You need a final mark of at least 50% to pass.
You must submit the first compulsory assignment for this module on/before the due date to
obtain admission to the examination.
Admission will be obtained by submitting the first compulsory assignment on time. Please ensure that
this assignment reaches Unisa before the due dates. Late submission of this assignment will result
in you not being admitted to the examination.
7
7 ASSIGNMENTS
Question 1A Consider Example 3 (in Chapter 1 in the study guide). Assume that the interarrival times
(in minutes) for the first 20 customers are
and the service times (also in minutes) for the first customers are
Simulate the system until the 10 customers complete their waiting times. Compute the same performance
measures of the system as in the study guide.
Question 1B Consider Example 3 (in Chapter 1 in the study guide). Assume that the interarrival times
(in minutes) for the first 20 customers are
and the service times (also in minutes) for the first customers are
Simulate the system until the 10 customers complete their waiting times. Compute the same performance
measures of the system as in the study guide.
Question 2A Solve Exercise 1.1 in Chapter 1 of the study guide.
Question 2B Solve Exercise 1.1 in Chapter 1 of the study guide.
Question 3A Solve Exercise 1.2 in Chapter 1 of the study guide.
Question 3B Solve Exercise 1.2 in Chapter 1 of the study guide but assume that the interarrival time is 4
minutes and the mean service time is 3 minutes.
Question 4A Solve Exercise 3.1 and 3.3 in the study guide.
Question 4B Solve Exercise 3.2 and 3.3 in the study guide. Compute Z1027 for each of the 4 generators.
Question 5A Solve Exercise 4.1 in the study guide
Question 5B Solve Exercise 4.1 in the study guide
8
DSC3703/101/3
... and you are done with Assignment 01. I hope you have enjoyed it!
Question 6A
(b) In Exercise 1: Modelling inventory system (Chapter 7 in the study guide), assume that the size of the
demands, D are given by the following distribution:
D Probability
1 0,25
2 0,25
3 0,30
4 0,20
Solve the problem and indicate which inventory policy should be recommended.
Question 6B
(b) In Exercise 1: Modelling inventory system (Chapter 7 in the study guide), assume that the size of the
demands, D are given by the following distribution:
D Probability
1 0,25
2 0,25
3 0,30
4 0,20
Solve the problem and indicate which inventory policy should be recommended.
Question 7A
In Exercise 2: Production Model (Chapter 7 in the study guide), assume that the change in the Prime rate
is given by the following table
Value Probability
+0,00% 0,65
+0,25% 0,05
−0,25% 0,10
+0,50% 0,10
−0,50% 0,10
Solve the problem and advise the management whether the project should be considered or not.
Question 7B In Exercise 2: Production Model (Chapter 7 in the study guide), assume that the company
has a large number of moulding machines and that the number of machines that break down and require a
replacement part can be modelled by a Poisson distribution with parameter λ = 1. Solve the problem and
advise the management whether the project should be considered or not.
9
Question 8A Repeat Example 3 (Chapter 1 in the study guide) the interarrival times are distributed
according to the Weibull distribution with parameters α = 1.2 and β = 5.1 and the service times are
distributed according to the lognormal distribution LN (0, 1; 1).
Question 8B Repeat Example 3 (Chapter 1 in the study guide) the interarrival times are distributed
according to the Weibull distribution with parameters α = 1.2 and β = 5.1 and the service times are
distributed according to the lognormal distribution LN (0, 1; 1).
Question 9A
A company provides its three employees with health insurance under a group plan. For each employee, the
probability of incurring medical expenses during a year is 0.9, so the number of employees incurring
medical expenses during a year has a binomial distribution B(n; p) with parameters n = 3 and p = 0, 9.
Given that an employee incurs medical expenses during a year, the total amount for the year has the
distribution R1 000,00 with probability 0,9 or R100 000,00 with probability 0, 1. The company has a
R50 000,00 deductible clause with the insurance company so that each year the insurance company pays
the total medical expenses for the group in excess of R50 000,00, that is, if we denote by C the total annual
expenses of the company, then the insurance company will pay the amount max{0; C − 50 000}.
Use simulation to estimate the annual average cost of the insurance company and find a 95% confidence
interval of the cost of the insurance company. Take 10000 replications.
Question 9B
The ADC company is considering building a new hotel. The cost to purchase the land would be $1 million,
payable now. Construction costs would be approximately $2 million, payable at the end of year 1. However
the construction costs are uncertain. These costs could be up to 20 % higher or lower than the $2 million.
Assume then that the construction costs would follow a triangular distribution triang(a; c; b) where
a =$1,6 million, c =$2 million and b =$2,4 million.
ADC is very uncertain about the annual operating profits (or losses) that would be generated once the
hotel is constructed. Its best estimate for the annual operating profit that would be generated in years 2, 3,
4, and 5 is $700 000. Due to the great uncertainty, the estimate of the standard deviation of the annual
operating profit in each year is $70 000. Assume that the yearly profits are statistically independent and
follow the normal distribution.
After 5 years, ADC plans to sell the hotel. The selling price is likely to be somewhere between $4 million
and $8 million (assume a uniform distribution). ADC uses a 10% discount rate for calculating net present
value, NPV. For this purpose, it is assumed that each year profits are received at year end. Build a
simulation model to calculate average NPV of the project.
Question 10A
A small repair shop specialises in repairing German cars. The shop has one technician. The time required
to repair a car has an exponential distribution with mean 4, 8 hours. The shop’s business has been steadily
increasing. The shop’s management projects that, by next year, German cars will arrive randomly to be
repaired at a mean rate of 4 cars per day, so the time between arrivals will have an exponential distribution
with mean 6 hours. The management would like the total time in the shop until completion of a repair job
to be no more than 12 hours.
(a) Simulate the system to obtain an estimate of the average time a car spends in the shop and an
estimate of the probability that the objective of the management is attained. (Run your model for
10000 replications.)
10
DSC3703/101/3
Question 10B
A small repair shop specialises in repairing German cars. The shop has one technician. The time required
to repair a car has an exponential distribution with mean 4, 8 hours. The shop’s business has been steadily
increasing. The shop’s management projects that, by next year, German cars will arrive randomly to be
repaired at a mean rate of 4 cars per day, so the time between arrivals will have an exponential distribution
with mean 6 hours. The management would like the total time in the shop until completion of a repair job
to be no more than 12 hours.
(a) Simulate the system to obtain an estimate of the average time a car spends in the shop and an
estimate of the probability that the objective of the management is attained. (Run your model for
10000 replications.)
8 EXAMINATION
Use your Studies @ Unisa brochure for general examination guidelines and examination preparation
guidelines.
To be admitted to the examination you must submit the first compulsory assignment to
reach Unisa before the due date.
You must write the examination in May/June if you are registered for the first semester, and in
October/November if you are registered for the second semester.
If for some reason you cannot write the examination, you will have to re-register (and pay again!) for the
next semester.
The duration of the examination is two hours.
You will be allowed to use a programmable pocket calculator in the examination, but a non-
programmable calculator will be more than sufficient.
You may take only your writing materials and your pocket calculator into the examination hall.
To pass this module, you must obtain a final mark of at least 50%.
9 CONCLUSION
Do not hesitate to contact us by e-mail if you are experiencing problems with the content of this tutorial
letter or with any academic aspect of the module. We wish you a fascinating and satisfying journey
through the learning material and trust that you will complete the module successfully. Enjoy the journey!
DEPARTMENT OF DECISION SCIENCES
c
UNISA 2017
11