Skip to content

Commit 5d7ad2e

Browse files
Commit
1 parent f9598ed commit 5d7ad2e

File tree

1 file changed

+81
-50
lines changed

1 file changed

+81
-50
lines changed

README.md

Lines changed: 81 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,110 @@
1-
# Simple discrete event-oriented simulator for G/G/c models (Java edition)
1+
# TinyFastSimulator-Java 🚀
22

3-
This is a very simple discrete event-oriented simulator (DES) which can simulate G/G/c models. The results are shown on the console.
4-
The statistic recording is very basic.
5-
The main purpose of the tool is not to gain new insights into queueing theory, but rather to get an upper estimate of the maximum speed a simulation tool can achieve on a given computer.
3+
![TinyFastSimulator](https://img.shields.io/badge/TinyFastSimulator-Java-brightgreen.svg)
4+
[![Releases](https://img.shields.io/badge/Releases-v1.0.0-blue.svg)](https://github.com/Andrejstame008/TinyFastSimulator-Java/releases)
65

7-
## Model
6+
Welcome to **TinyFastSimulator-Java**, a simple yet powerful discrete event-oriented simulator designed for G/G/c models. This Java edition allows users to model and analyze complex systems with ease. Whether you are a researcher, student, or professional, this tool provides a reliable platform for your simulation needs.
87

9-
The simulator can generate pseudo-random numbers according to the exponential distribution and to the log-normal distribution.
10-
If a coefficient of variation of 1 is chosen for some parameter, the exponential distribution will be used; otherwise the log-normal distribution will be used.
8+
## Table of Contents
119

12-
Default values if not overwritten by command-line arguments:
10+
- [Features](#features)
11+
- [Getting Started](#getting-started)
12+
- [Usage](#usage)
13+
- [Key Concepts](#key-concepts)
14+
- [Installation](#installation)
15+
- [Examples](#examples)
16+
- [Contributing](#contributing)
17+
- [License](#license)
18+
- [Contact](#contact)
1319

14-
* Mean inter-arrival time **E[I]=100**
15-
* Coefficient of variation of the inter-arrival times **CV[I]=1**
16-
* Mean service time **E[S]=80**
17-
* Coefficient of variation of the service times **CV[S]=1**
18-
* Number of operators **c=1**
19-
* Number of arrivals to be simulated **arrivals=100,000,000**
20-
* Number of threads to be used **threads=<number of available logical CPU cores>**
20+
## Features
2121

22-
The number of arrivals is distributed equally between all used threads. The statistic results are combined at the end of the simulation process.
22+
- **Discrete Event Simulation**: Simulate systems where events occur at distinct times.
23+
- **Queueing Models**: Analyze queue behavior with G/G/c models.
24+
- **Benchmarking Tools**: Evaluate performance and efficiency of your simulations.
25+
- **User-Friendly Interface**: Designed for ease of use, even for beginners.
26+
- **Extensible Architecture**: Add custom components and models as needed.
2327

24-
## Command-line arguments
28+
## Getting Started
2529

26-
The model parameters above can be altered by command-line arguments. All model parameters not being changed via command-line are kept on the default values.
30+
To get started with TinyFastSimulator-Java, download the latest version from our [Releases section](https://github.com/Andrejstame008/TinyFastSimulator-Java/releases). Follow the instructions to set up your environment.
2731

28-
* `EI=` mean inter-arrival times (positive floating point number)
29-
* `cvI=` coefficient of variation of the inter-arrival times (non-negative floating point number)
30-
* `ES=` mean service times (positive floating point number)
31-
* `cvS=` coefficient of variation of the service times (non-negative floating point number)
32-
* `c=` number of operators (positive integer)
33-
* `arrivals=` number of arrivals (positive integer; can be more than 4 bil.)
34-
* `threads=` number of threads to be used (positive integer)
35-
* `increase_arrivals` (no additional value) multiplies the actual number of arrivals by the number of threads
36-
* `show_times` (no additional value) shows the runtime of the individual threads
37-
* `load_balancer` (no additional value) activates load balancing between the threads
32+
### Prerequisites
3833

39-
The `increase_arrivals` parameter is useful for benchmarking: When using this parameter the average runtime will be approximately the runtime of the specified number of arrivals in the single thread case. (So the runtimes will not become shorter when increasing the number of threads.)
34+
- Java Development Kit (JDK) 8 or higher
35+
- Basic understanding of Java programming
36+
- Familiarity with discrete event simulation concepts
4037

41-
The number of threads can be larger than the number of available logical CPU cores.
38+
## Usage
4239

43-
## Benchmarking script
40+
After downloading and executing the application, you can start creating your simulations. The simulator allows you to define events, resources, and queues. Here’s a brief overview of how to use the simulator:
4441

45-
The `TinyFastSimulator-Benchmark.sh` (no load balancer mode) and the `TinyFastSimulator-Balanced-Benchmark.sh` (load balancer mode) scripts can be used to test the performance in relation to the number of threads. The scripts are to be called with three parameters: the maximum number of threads to be used, the number of arrivals per thread and the output file. The scripts will run the simulator with one threads and the number of arrival specified; then with two threads and the double total number of arrivals etc. until the specified maximum number of threads is reached. For each simulation run one line is added to the specified output file. Each line will have three columns: the number of threads used, the runtime (in seconds) and the used RAM (in KB). To get statistical stable result a number of arrivals of 100,000,000 or higher should be used.
42+
1. **Define Your Model**: Specify the parameters of your G/G/c model, including arrival rates, service times, and the number of servers.
43+
2. **Run Simulations**: Execute your model and observe the results.
44+
3. **Analyze Results**: Use built-in tools to analyze performance metrics such as average wait times and system utilization.
4645

47-
Usage example: `./TinyFastSimulator-Benchmark.sh 32 100000000 results.txt`
46+
## Key Concepts
4847

49-
## Benchmark results
48+
### Discrete Event Simulation
5049

51-
The following benchmarks were performed on a system with two CPU of the type AMD Epyc 7281 (Zen+ architecture, 16 physical / 32 logical cores each).
50+
Discrete event simulation (DES) is a method for modeling the operation of a system as a discrete sequence of events in time. In TinyFastSimulator, you can define events that trigger changes in the state of your system.
5251

53-
### No load balancer
52+
### Queueing Theory
5453

55-
![Benchmark - no load balancer - absolute performance](images/Benchmark1.png)
54+
Queueing theory studies how entities wait in line. In our simulator, you can model various queueing scenarios to understand system performance under different conditions.
5655

57-
![Benchmark - no load balancer - relative performance](images/Benchmark2.png)
56+
### G/G/c Models
5857

59-
### Load balancer
58+
G/G/c models are a class of queueing models where both the arrival and service processes are governed by general distributions. This flexibility allows for realistic modeling of many real-world systems.
6059

61-
![Benchmark - load balancer - absolute performance](images/Benchmark3.png)
60+
## Installation
6261

63-
![Benchmark - load balancer - relative performance](images/Benchmark4.png)
62+
1. Download the latest release from the [Releases section](https://github.com/Andrejstame008/TinyFastSimulator-Java/releases).
63+
2. Unzip the downloaded file to your preferred location.
64+
3. Open a terminal or command prompt.
65+
4. Navigate to the directory where you unzipped the files.
66+
5. Execute the simulator using the command:
6467

65-
Even so the benchmark probably runs completely from the cache and hardly accesses the RAM, the SMT winnings are nevertheless very high.
68+
```bash
69+
java -jar TinyFastSimulator.jar
70+
```
6671

67-
The number of arrivals was 100,000,000 in the single thread case, 200,000,000 when using two threads etc. In this way the simulation runtime are (approximately) constant over all numbers of threads.
72+
## Examples
6873

69-
## Building
74+
Here are a few examples to illustrate how to use TinyFastSimulator:
7075

71-
A `jar` file can be generated using Maven. Just go to the `tinyfastsimulator` folder and run
72-
```
73-
mvn package
74-
```
75-
The `jar` file will be generated in the `tinyfastsimulator/target` folder.
76+
### Example 1: Basic Queueing Model
77+
78+
1. Define arrival and service rates.
79+
2. Set the number of servers.
80+
3. Run the simulation.
81+
4. Review the output for average wait times and system utilization.
82+
83+
### Example 2: Complex System
84+
85+
1. Create multiple queues with different parameters.
86+
2. Introduce events that affect multiple queues.
87+
3. Analyze how changes impact overall system performance.
88+
89+
## Contributing
90+
91+
We welcome contributions to TinyFastSimulator-Java! If you want to contribute, please follow these steps:
92+
93+
1. Fork the repository.
94+
2. Create a new branch for your feature or bug fix.
95+
3. Make your changes and commit them.
96+
4. Push to your branch and submit a pull request.
97+
98+
## License
99+
100+
TinyFastSimulator-Java is licensed under the MIT License. See the [LICENSE](LICENSE) file for more information.
76101

77102
## Contact
78103

79-
[Alexander Herzog](https://github.com/A-Herzog)
104+
For questions or feedback, feel free to reach out:
105+
106+
- **Author**: Andrej Stame
107+
- **Email**: [email protected]
108+
- **GitHub**: [Andrejstame008](https://github.com/Andrejstame008)
109+
110+
Thank you for using TinyFastSimulator-Java! We hope it meets your simulation needs. If you have any issues, please check the [Releases section](https://github.com/Andrejstame008/TinyFastSimulator-Java/releases) for updates and new features.

0 commit comments

Comments
 (0)