Skip to content

Repository files navigation

Digital Simulation Toolkit

An interactive web application for learning, experimenting with, and analyzing concepts related to digital simulation, random number generation, random variables, statistical tests, and queueing theory.

Overview

Digital simulation relies on mathematical and statistical methods to model processes and generate data that can be used to represent real-world or theoretical systems.

This project provides an interactive environment where users can explore different simulation concepts, generate random numbers and random variables, perform statistical tests, import and export datasets, and experiment with a queueing theory simulation.

The application combines theoretical explanations with interactive tools, allowing users to understand the concepts and immediately experiment with them.

Features

Random Number Generation

The application includes several pseudo-random number generation methods, allowing users to generate sequences of numbers based on different mathematical algorithms.

Available generators include:

  • Linear Congruential Generator
  • Middle-Square Method
  • Additive Fibonacci Generator
  • Blum Blum Shub Generator

Generated values can be reviewed and exported for further analysis or simulation.

Randomness Tests

The application provides statistical tests to evaluate whether a generated dataset behaves as a sequence of random numbers.

Available tests include:

  • Frequency Test
  • Mean Test
  • Kolmogorov-Smirnov Test
  • Runs Test
  • Series Test

Users can also import datasets from Excel files to perform statistical tests on previously generated or external data.

Random Variable Generation

The application supports the generation of random variables using different probability distributions.

Available distributions include:

  • Uniform Distribution
  • Exponential Distribution
  • Poisson Distribution
  • Normal Distribution
  • Erlang Distribution
  • Binomial Distribution

These generated variables can be exported and used as input for further simulation exercises.

Data Import and Export

The application allows users to work with external datasets through Excel files.

Users can:

  • Export generated random numbers
  • Export generated random variables
  • Import datasets from Excel
  • Analyze imported datasets using statistical tests
  • Use generated data as input for simulation exercises

Queueing Theory Simulation

The application also includes a simulation based on queueing theory.

This section allows users to experiment with concepts related to:

  • Arrivals
  • Service processes
  • Queues
  • Waiting times
  • System behavior
  • Simulation results

The queueing simulation demonstrates how random variables and probability distributions can be applied to model a dynamic system.

Simulation Concepts

The project brings together several fundamental concepts from digital simulation and probability theory.

Pseudo-Random Number Generators

Pseudo-random number generators produce sequences of values that appear random while being generated through deterministic mathematical algorithms.

The application demonstrates several approaches, including:

  • Linear Congruential Generator
  • Middle-Square Method
  • Additive Fibonacci Generator
  • Blum Blum Shub

Probability Distributions

Random variables can be generated according to different probability distributions, including:

Distribution Application
Uniform Values with equal probability within a defined interval
Exponential Modeling time between independent events
Poisson Modeling the number of events occurring within an interval
Normal Modeling continuous values around a mean
Erlang Modeling processes involving multiple exponential stages
Binomial Modeling the number of successes across independent trials

Statistical Tests

The application includes statistical methods for analyzing generated or imported datasets:

Test Purpose
Frequency Test Evaluates the distribution of generated values across defined intervals
Mean Test Evaluates whether the sample mean behaves as expected
Kolmogorov-Smirnov Test Compares an empirical distribution with a theoretical distribution
Runs Test Evaluates the independence and randomness of a sequence
Series Test Analyzes patterns and relationships between generated values

Technologies

Technology Purpose
React Frontend application development
Vite Development environment and build tool
JavaScript Application logic and mathematical implementations
CSS User interface styling
Vercel Application deployment

How It Works

The application is organized around several simulation modules.

User
 │
 ├── Random Number Generators
 │      ├── Linear Congruential
 │      ├── Middle-Square
 │      ├── Additive Fibonacci
 │      └── Blum Blum Shub
 │
 ├── Randomness Tests
 │      ├── Frequency
 │      ├── Mean
 │      ├── Kolmogorov-Smirnov
 │      ├── Runs
 │      └── Series
 │
 ├── Random Variables
 │      ├── Uniform
 │      ├── Exponential
 │      ├── Poisson
 │      ├── Normal
 │      ├── Erlang
 │      └── Binomial
 │
 ├── Excel Import / Export
 │
 └── Queueing Theory Simulation

Project Structure

The application is built using React and Vite.

random-number-generator-simulation/
│
├── public/
├── src/
│   ├── ...
│
├── index.html
├── package.json
├── vite.config.js
├── eslint.config.js
├── vercel.json
└── ...

The src/ directory contains the main React application, components, simulation logic, and interface implementation.

Getting Started

Requirements

  • Node.js
  • npm
  • Git

Installation

  1. Clone the repository:
git clone https://github.com/SaVR0/random-number-generator-simulation.git
  1. Move into the project directory:
cd random-number-generator-simulation
  1. Install the dependencies:
npm install
  1. Start the development server:
npm run dev
  1. Open the local development URL provided by Vite in your browser.

Live Demo

The application is deployed and available online through Vercel.

View the Live Demo here

Project Status

The application is functional and the main simulation modules have been implemented. The current version includes:

  • Pseudo-random number generators
  • Randomness tests
  • Random variable generation
  • Probability distributions
  • Excel data import and export
  • Queueing theory simulation
  • Interactive explanations of simulation concepts

The project is still open to improvements, particularly in visual design, user experience, code optimization, and validation of individual simulation modules.

Future Improvements

Potential improvements for future versions include:

  • Improving the overall user interface and visual design
  • Improving responsive behavior across different screen sizes
  • Reviewing and optimizing simulation algorithms
  • Expanding statistical analysis capabilities
  • Adding more probability distributions
  • Adding additional pseudo-random number generation methods
  • Improving data visualization
  • Providing more detailed explanations of statistical test results
  • Improving Excel import and export functionality
  • Adding more queueing theory models
  • Adding automated tests for mathematical and statistical functions
  • Improving application performance and maintainability

Screenshots

The following screenshots showcase the main sections and interactive tools available in the application.

Home / Introduction

Home Screen

Random Number Generators

Generators Screen

Randomness Tests

Tests Screen

Random Variables

Variables Screen

Excel Import/Export

Excel Screen

Results / Analysis

Analysis Screen

Author

Sergio Velaides

About

Interactive toolkit for random number generation, statistical tests, and digital simulation.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages