32 lines
1.4 KiB
Markdown
32 lines
1.4 KiB
Markdown
Simulation server cluster (discrete-event simulation). Chosing an optimal C value (number of specialized clusters) depending on arrival rate.
|
|
|
|
## How to use
|
|
usage:
|
|
```
|
|
main.py [-h] [--simulation_time SIMULATION_TIME] [--num_runs NUM_RUNS] [--min_runs MIN_RUNS] [--confidence_level CONFIDENCE_LEVEL] [--best_c | --no-best_c]
|
|
```
|
|
|
|
options:
|
|
```
|
|
-h, --help show help message and exit
|
|
--simulation_time SIMULATION_TIME runtime of each individual simulation
|
|
--num_runs NUM_RUNS number of simulations to run with a fixed set of parameters
|
|
--min_runs MIN_RUNS minimum number of successful runs needed to calculate statistics
|
|
--confidence_level CONFIDENCE_LEVEL confidence level
|
|
--best_c only run simulations for lambda=1 and determine the best C
|
|
```
|
|
|
|
#### default values:
|
|
Simulation time: 500
|
|
Number of runs: 10
|
|
Minimum number of runs: 5
|
|
confidence level: 95%
|
|
best C (running simulation for lamba=1 only): False
|
|
|
|
## structure
|
|
simulation.py contains the code for the simulations.
|
|
main.py contains a minimal CLI argument parser.
|
|
|
|
A class is used to represent a simulation, 2 wrappers are then used. One to run the simulations and produce statistics related to the mean response time, one to produce statistics related to the mean loss rate.
|
|
Multiprocessing library is used for parallelism, as multiple simulations are needed with each set of parameters they can be executed in parallel.
|