Computer Simulation
eBook - ePub

Computer Simulation

A Foundational Approach Using Python

  1. 275 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

Computer Simulation

A Foundational Approach Using Python

About this book

Computer simulation is an effective and popular universal tool that can be applied to almost all disciplines. Requiring only basic knowledge of programming, mathematics, and probability theory, Computer Simulation: A Foundational Approach Using Python takes a hands-on approach to programming to introduce the fundamentals of computer simulation.

The main target of the book is computer science and engineering students who are interested mainly in directly applying the techniques to their research problems. The book will be of great interest to senior undergraduate and starting graduate students in the fields of computer science and engineering and industrial engineering.

Frequently asked questions

Yes, you can cancel anytime from the Subscription tab in your account settings on the Perlego website. Your subscription will stay active until the end of your current billing period. Learn how to cancel your subscription.
No, books cannot be downloaded as external files, such as PDFs, for use outside of Perlego. However, you can download books within the Perlego app for offline reading on mobile or tablet. Learn more here.
Perlego offers two plans: Essential and Complete
  • Essential is ideal for learners and professionals who enjoy exploring a wide range of subjects. Access the Essential Library with 800,000+ trusted titles and best-sellers across business, personal growth, and the humanities. Includes unlimited reading time and Standard Read Aloud voice.
  • Complete: Perfect for advanced learners and researchers needing full, unrestricted access. Unlock 1.4M+ books across hundreds of subjects, including academic and specialized titles. The Complete Plan also includes advanced features like Premium Read Aloud and Research Assistant.
Both plans are available with monthly, semester, or annual billing cycles.
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Yes! You can use the Perlego app on both iOS or Android devices to read anytime, anywhere — even offline. Perfect for commutes or when you’re on the go.
Please note we cannot support devices running on iOS 13 and Android 7 or earlier. Learn more about using the app.
Yes, you can access Computer Simulation by Yahya Esmail Osais in PDF and/or ePUB format, as well as other popular books in Informatica & Ingegneria informatica. We have over one million books available in our catalogue for you to explore.

Information

I
The Fundamentals
CHAPTER 1
Introduction
The purpose of computing is insight, not numbers.”
–Richard Hamming
The purpose of this chapter is to motivate the importance of simulation as a scientific tool. The chapter also introduces some essential concepts which are needed in the rest of the book. The lifecycle of a simulation study is described here along with an example. In addition, the advantages and limitations of simulation are discussed. The reader is urged to carefully read this chapter before moving on to the next ones.
1.1 THE PILLARS OF SCIENCE AND ENGINEERING
Science and engineering are based on three pillars: observation, experimentation, and computation. Figure 1.1 uses the analogy of a table with three legs to show the relationship between these three tools and science and engineering. Historically, humans have been using observation and experimentation to acquire new knowledge (i.e., science) and then apply the newly acquired knowledge to solve problems (i.e., engineering). This approach is very effective because the actual phenomenon (system) is observed (utilized). However, as the complexity increases, observation and experimentation become very costly and cumbersome. This is when computation becomes the only tool that can be used.
The outcome of an observational study is a set of facts. For example, if a burning candle is covered with a glass cup, it will eventually go out on its own. This is the observation. Scientists had to do research before they could realize the reason for this phenomenon. The reason is that there is still oxygen inside the glass cup which will eventually be used up by the flame. Once all the oxygen is consumed, the candle goes out.
On the other hand, experimentation is the act of making an experiment. An experiment is a physical setup. It is performed to make measurements. Measurements are raw data. Experimentation is popular among scientists.
Image
Figure 1.1
The three pillars of science and engineering: Observation (O), Experimentation (E), and Computation (C). By analogy, the table needs the three legs to stay up.
The output of the system is recorded as it occurs in an observational study. Furthermore, the response of the system is not influenced in any way and the environment in which the system operates cannot be manipulated. In experimentation, however, we can manipulate the environment in which the system operates and influence the response of the system.
A computation is a representation of the phenomenon or system under study in the form of a computer program. This representation can be as simple as a single mathematical equation or as complex as a program with a million lines of code. For mathematical equations, there are tools like calculus and queueing theory that can be used to obtain closed-form solutions. If a closed-form solution, on the other hand, cannot be obtained, approximation techniques can be used. If even an approximate solution cannot be obtained analytically, then computation has to be used.
In this book, we are interested in the use of computation as a tool for understanding the behavior of systems under different conditions. This goal is achieved by generating time-stamped data which is then statistically analyzed to produce performance summaries, like means and variances. The type of computation performed by the program which generates this type of data is referred to as event-oriented simulation. Developing such simulation programs is an art. The good news is that you can acquire this skill by practice. Therefore, it is recommended that you carefully study the examples in the book.
1.2 STUDYING THE QUEUEING PHENOMENON
Consider the situation in Figure 1.2 where five people have to wait in a queue at the checkout counter in a supermarket. This situation arises because there is only one cashier and more than one person wants to have access to him. This phenomenon is referred to as queueing. Let us see how observation, experimentation, and computation can be used to study this phenomenon.
Image
Figure 1.2
A queue at a checkout counter in a supermarket. A phenomenon arising whenever there is a shared resource (i.e., the cashier) and multiple users (i.e., the shoppers).
If we want, for example, to estimate the average time a customer spends at the checkout counter, we should manually record the time each customer spends waiting to be served plus the service time. Therefore, for each customer, we have t...

Table of contents

  1. Cover
  2. Half Title
  3. Title Page
  4. Copyright Page
  5. Table of Contents
  6. List of Programs
  7. List of Figures
  8. List of Tables
  9. Foreword
  10. Preface
  11. About the Author
  12. Abbreviations
  13. Symbols
  14. PART I The Fundamentals
  15. PART II Managing Complexity
  16. PART III Problem-Solving
  17. PART IV Sources of Randomness
  18. PART V Case Studies
  19. APPENDIX A ■ Overview of Python
  20. APPENDIX B ■ An Object-Oriented Simulation Framework
  21. APPENDIX C ■ The Chi-Squared Table
  22. APPENDIX D ■ The t-Distribution Table
  23. Bibliography
  24. Index