Skip to content

Rakibul73/Simulation_Modeling_Code

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

84 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simulation and Modeling in Python 3
Python NumPy SciPy Matplotlib OpenCV Jupyter Notebook Visual Studio Code

Installations

  • Python 3 can be downloaded from here. Make sure to check Add Python 3.x to PATH during installation.
  • NumPy, SciPy, and matplotlib etc libraries can be downloaded and installed using the commands:
pip install numpy
pip install scipy
pip install matplotlib
pip install library-name

or if you have multiple python version installed use this

py -3.9 -m pip install numpy
py -3.11 -m pip install numpy
.....

Code for Academic Course CIT-324 (Simulation and Modeling Sessional)

Chapter 2 ----------------------------


2.1 Area of Irreglar Figure using Monte Carlo Method

Jupyter File
Python File

2.2 Gambling Game using Monte Carlo Method

Jupyter File
Python File

2.3 Numerical Integration using Monte Carlo Method

Jupyter File Alternative 2    /    Jupyter File Alternative 3    /    Jupyter File
Python File Alternative 2    /    Python File Alternative 3

2.4 Determining Value of PI (π) using Monte Carlo Method

Jupyter File Alternative 2    /    Jupyter File
Python File Alternative 2

2.5 Random Walk Problem using Monte Carlo Method

Jupyter File (2D)    /    Jupyter File (3D)    /    Jupyter File (Book)
Python File (2D)    /    Python File (3D)

2.6 Reliability Problem (Bearing OLD & NEW Policy) using Monte Carlo Method

Jupyter File (old policy)    /    Jupyter File (new policy)    /    Jupyter File (old vs new compare)
Python File (old policy)    /    Python File (new policy)    /    Python File (Combine code)


Normally Distributed Random Numbers .

Use this numpy.random.randn() or this numpy.random.normal() for Normally distributed random number


2.7 Simulation of Bombing Problem using Monte Carlo Method

Jupyter File (Rectangular Shape)    /    Jupyter File (Circle Shape)    /    Jupyter File (Any Shape)
Python File (Rectangular Shape)    /    Python File (Circle Shape)    /    Python File (Any Shape)

2.8 Hinge Assembly using Stochastic Model

Jupyter File
Python File

2.9 Four Tubes Problem using Stochastic Model

Jupyter File
Python File


(Exercise 5) Random Walk with Probability using Monte Carlo Method

jupyter File (2D) Exercise    /    jupyter File (2D) Exercise 2
Python File (2D) Exercise    /    Python File (2D) Exercise 2

(Exercise 9) Uniform Distribution Random Variable

Jupyter File
Python File


Chapter 3 ----------------------------


3.2 Pure Pursuit Problem (Fighter Attacking Bomber)

Jupyter File (2D No Animation)    /    Jupyter File (3D No Animation)   
Python File (2D No Animation)    /    Python File (3D No Animation)    /    Python File (2D Animation)    /    Python File (3D Animation)

3.3 Simulation of a Chemical Reaction

jupyter File
Python File    /    Python File (Plot Animation)

3.6 A Serial Chase Problem

Jupyter File (No Plot Graph)    /    Jupyter File (Plot Graph + No Animation)   
Python File (No Plot Graph)    /    Python File (Plot Graph + No Animation)    /    Python File (Plot Animation) (D goes straight line in y)    /    Python File (Plot Animation) (D moves toward A)

3.7 Simulation of Exterior Ballistics

jupyter File
Python File

(Exercise 2) Bullet Trajectory

jupyter File
Python File

(Exercise 4) Cannon Fires Ball

jupyter File
Python File

(Exercise 10) Serial Chase Exercise

jupyter File
Python File


Chapter 4 ----------------------------


4.5 Mid Square Random Number Generator

jupyter File
Python File

4.6 Congruence or Residue Random Number Generator

jupyter File
Python File

4.7 Arithmetic Congruential Random Number Generator

jupyter File
Python File

4.11 Kolmogorov - Smirnov Test

jupyter File
Python File

4.12 Chi Squared Test

jupyter File
Python File

4.13 Testing for Autocorrelation

jupyter File
Python File

4.14 Poker Test

Jupyter File (3 Digit)    /    Jupyter File (4 Digit)    /    Jupyter File (5 Digit)
Python File (3 Digit)    /    Python File (4 Digit)    /    Python File (5 Digit)


Chapter 11 ----------------------------


11.2 Simulation of a Counter Service

jupyter File
Python File    /    Python File Alternative

11.3 Simulation of a Maintanence Replacement Problem

jupyter File
Python File

11.4 Simulation of a Capacity Planning Problem

jupyter File
Python File

11.5 Simulation of a Profit Analysis Problem

jupyter File
Python File

11.6 Simulation of a Inventory Problem

jupyter File
Python File    /    Python File Alternative 2    /    Python File Alternative 3



Masud Sir Part


Lab - 1 == Single Server Queue System Example

jupyter File
Python File    /    Python File Alternative 1    /    Python File Alternative 2    /    Python File Alternative 3

Lab - 2 == Poisson Distribution Example

jupyter File
Python File

Lab - 3 == Unimodal Multimodal Density Curves Normal Distribution Example

jupyter File
Python File

Lab - 4 == Exponential Distribution

jupyter File
Python File

Lab - 5 == Inverse Exponential Distribution Example (Random variates)

jupyter File
Python File