Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Discrete-Event Blocking System Simulation (Zig)

A compact, performance-oriented implementation of a blocking system with m parallel servers and no waiting room. Built entirely in Zig, with custom sampling routines, tight memory patterns, and minimal allocation overhead. The project explores how different arrival and service-time models influence blocking probability, using large-scale simulations to estimate the fraction of rejected customers and associated confidence intervals.

The baseline uses Poisson arrivals with exponential service times and is validated against the analytical Erlang-B formula. Additional experiments replace the arrival process with renewal models (Erlang and hyper-exponential) and vary service distributions while keeping the mean fixed. The goal is to study how these structural changes affect blocking behaviour and the width of confidence intervals across scenarios.

Build and Compilation Guide

Overview

This repository contains:

  • The compiled executable (./executable)
  • The full Zig source code (Zig 0.14.1)
  • No Zig installation is required unless you wish to inspect or recompile the code.

Contents

├── build.zig          # Build script (only needed for recompilation)
├── build.zig.zon      # Package config (optional)
├── executable         # Precompiled binary
└── src/
    ├── analysis.zig
    ├── main.zig       # Program Entry Point
    ├── root.zig       # Top-level file used in build.zig
    ├── sampling.zig
    ├── statistics.zig
    └── system.zig

Running the Program

From the root directory:

./executable

If you’re on macOS or Linux and get a permissions error:

chmod +x executable
./executable

Recompilation (Optional)

If you want to compile and run the code:

  1. Install Zig 0.14.1
  2. Run:
zig build run

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages