0% found this document useful (0 votes)
15 views4 pages

Computer Simulation Exam Paper 2019

This document provides instructions for a university examination on computer simulation and modelling. It outlines general instructions that students cannot write on the exam paper or use books/notes as it is closed book. The exam consists of one compulsory question and two other questions to answer. The compulsory question covers concepts like simulation, modelling, random number generation and writing a program to simulate a motion sensor. The other questions address topics like the steps in simulation, using decision trees, characteristics of forecasting models, random number generators and applications of simulation.

Uploaded by

Mark Mumba
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views4 pages

Computer Simulation Exam Paper 2019

This document provides instructions for a university examination on computer simulation and modelling. It outlines general instructions that students cannot write on the exam paper or use books/notes as it is closed book. The exam consists of one compulsory question and two other questions to answer. The compulsory question covers concepts like simulation, modelling, random number generation and writing a program to simulate a motion sensor. The other questions address topics like the steps in simulation, using decision trees, characteristics of forecasting models, random number generators and applications of simulation.

Uploaded by

Mark Mumba
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

UNIVERSITY EXAMINATIONS

EXAMINATION FOR SEP/DEC 2019 FOR BACHELOR OF SCIENCE IN COMPUTER


SCIENCE
COURSE CODE: RCS 304: COURSE UNIT: COMPUTER SIMULATION AND
MODELLING
DATE _____________ TIME: 2 HOURS
GENERAL INSTRUCTIONS:
Students are NOT permitted to write on the examination paper during examination time.
This is a closed book examination. Text book/Reference books/notes are not permitted.

SPECIAL INSTRUCTIONS:
This examination paper consists Questions in Section A followed by section B.
Answer Question 1 and any Other Two questions.
QUESTIONS in ALL Sections should be answered in answer booklet(s).

1. PLEASE start the answer to EACH question on a NEW PAGE.


2. Keep your phone(s) switched off at the front of the examination room.
3. Keep ALL bags and caps at the front of the examination room and DO NOT
refer to ANY unauthorized material before or during the course of the
examination.
4. ALWAYS show your working.
5. Marks indicated in parenthesis i.e. ( ) will be awarded for clear and logical
answers.
6. Write your REGISTRATION No. clearly on the answer booklet(s).
7. For the Questions, write the number of the question on the answer booklet(s) in
the order you answered them.
8. DO NOT use your PHONE as a CALCULATOR.
9. YOU are ONLY ALLOWED to leave the exam room 30minutes to the end of the
Exam.
10. DO NOT write on the QUESTION PAPER. Use the back of your BOOKLET for
any calculations or rough work.

Page 1 of 4
QUESTION ONE 30 MARKS (COMPULSORY)
a) Describe the concept of Simulation and Modelling ( 3 Marks)
b) Explain the difference between Deterministic or Stochastic Simulation Models ( 4 Mark)

c) List four advantages for using simulation other than experimenting with real life
Systems? (4 Mark)

d) Explain the two types of random numbers and the desired properties of a good random
numbers generator ( 6Marks)
e) You have been tasked to simulate a PIR Motion Sensor using Tinkercad 3D CAD design
tool, explore the sample circuit below and write a sample program.

f) Create a variable to store the current state of the sensor (2 Marks)


g) Write the void setup code for the two pin modes (4 Marks)
h) Write the code that will check if sensor pin is HIGH. if it is, set the LED on ( 7 Marks )

Page 2 of 4
ANSWER ANY TWO QUESTIONS

Question Two (20 Marks)

a) Explain the steps that are followed in simulation and modelling (8 Marks)

b) Judy is a manager of a mobile factory company. Her factory has been quite successful the
past three years. She is wondering whether or not it is a good idea to expand her factory
this year. The cost to expand her factory is $1.5M. If she does nothing and the economy
stays good and people continue to buy lots of gadgets she expects $3M in revenue; while
only $1M if the economy is bad. If she expands the factory, she expects to receive $6M if
economy is good and $2M if economy is bad. She also assumes that there is a 40% chance
of a good economy and a 60% chance of a bad economy.

Draw a Decision Tree showing these choices showing if Ann should expand the factory or
not (12 Marks)

Question Three (20 Marks)

a) What are the general characteristics of forecasts modelling (5 Marks)


b) What are the advantages of using Linear Congruential Generator(LCG) in generation of
random numbers ( 3 Marks)
c) Explain atleast three application areas of simulation and modelling ( 6 Marks )
d) Assume we have 3 processes that we need to run in the order they arrive (FIFO). The first
process (P1) takes 5 seconds to finish, the second process (P2) takes 15 seconds and the
third process (P3) takes 10 seconds. Calculate throughput and the average waiting time
(6 Marks)
Question Four (20 Marks)

a) Explain the advantages of using Linear Congruential Generator(LCG) in generation of


random numbers ( 5 Marks)
b) Briefly discuss application of simulations and Modelling in business and logistics process
simulation (5 Marks )
c) Explain areas of performance evaluation in simulation and modelling ( 5 Marks )
d) Describe the factors to consider when evaluating and selecting simulation software

Page 3 of 4
Question Five
a) Explain how an activity duration may be specified ( 4 marks)
b) Briefly explain any three common techniques used to generate random numbers
(4 marks)
c) There are ten people in an office of which any one of them can talk on his/her phones any
Minute with a probability of 0.25. Write statements to simulate this situation and identify
the number of people who will be on phone between 9.00 am to 9.30 am (6 marks)
d) Explain three factors that affects the selection method for forecasting (6 Marks)

Page 4 of 4

Common questions

Powered by AI

Simulation and modeling are applied in various fields: in manufacturing, they optimize production processes and resource allocation; in healthcare, they assist in surgical procedure planning and equipment design; and in logistics, they improve supply chain efficiency and inventory management. These applications provide insights that enhance operational planning and strategic decision-making .

Linear Congruential Generators (LCG) are popular for their simplicity and speed, offering a good balance between performance and the quality of random numbers generated. LCGs produce numbers that appear statistically random and are reproducible, allowing for consistent simulation runs. This makes them suitable for simulations requiring large amounts of random data .

Different forecasting methods can significantly impact the effectiveness of business logistics. Quantitative methods such as time series analysis provide precise forecasts based on historical data, while qualitative methods like expert judgment offer flexibility in uncertain scenarios. Choosing the right method affects inventory management, supply chain efficiency, and cost-effectiveness. A combination often yields the most reliable results, aligning forecasts with business goals .

Simulation and modeling involve several key steps: defining the problem, constructing the conceptual model, developing the simulation model, validating the model, conducting the simulation experiments, and analyzing the results. Defining the problem ensures a clear understanding of the system requirements. Constructing the conceptual model involves creating an abstraction of the real system, which sets the foundation for the simulation. Developing the simulation model involves translating the conceptual model into a computer model. Validation ensures the model accurately represents the real world. Conducting experiments allows for observation under controlled conditions, and analyzing results helps in making informed decisions .

For the processes P1 (5s), P2 (15s), and P3 (10s), throughput is calculated as the total time taken divided by the number of processes = 30s/3 = 10s/process. Average waiting time is calculated as the cumulative sum of time waited by each subsequent process, divided by the number of processes: (0s + 5s + 20s)/3 = 8.33s/process .

To simulate, iterate for each minute from 9:00 to 9:30 (30 minutes), with a loop checking each person for phone activity using a random number generator with a threshold of 0.25. If the generated number is less than 0.25, consider the person as talking. Count occurrences in each iteration to find the total number each minute. This approach provides an estimated distribution of phone activity over time .

Good random number generators are vital for simulation accuracy as they ensure the unpredictability and statistical randomness of generated data. An effective generator should have properties like a long period before repetition, uniform distribution, independence among numbers, and reproducibility. These properties guarantee reliable simulations under varied conditions, necessary for credible results and decision-making .

Selecting the right simulation software involves considering factors such as the software's capabilities in modeling variety and complexity, ease of use, scalability, data-handling ability, and cost. Additionally, it's crucial to evaluate the software's compatibility with existing systems, support, and community resources. These considerations ensure the software fits the application's needs and supports comprehensive simulations .

Activity duration specification affects timelines by determining the accuracy and reliability of project schedules. Methods like probabilistic estimation provide ranges that accommodate uncertainties, while deterministic methods are precise but less flexible. Accurate duration forecasts enhance resource allocation and critical path identification, impacting project outcomes positively by reducing delays and underutilization of resources .

If Judy does nothing and the economy is good, she expects $3M; if bad, $1M. If she expands, she expects $6M if good and $2M if bad. With a 40% probability of a good economy and 60% of a bad one, the expected value if she expands is 0.4*$6M + 0.6*$2M = $3.6M and if she does nothing, 0.4*$3M + 0.6*$1M = $1.8M. Since the expansion's expected value is higher ($3.6M), expanding is financially advisable despite its cost of $1.5M .

You might also like