simEd-package: Simulation Education

simEd-packageR Documentation

Simulation Education

Description

Contains various functions to be used for simulation education, including simple Monte Carlo simulation functions, queueing simulation functions, variate generation functions capable of producing independent streams and antithetic variates, functions for illustrating random variate generation for various discrete and continuous distributions, and functions to compute time-persistent statistics. Also contains functions for visualizing: event-driven details of a single-server queue model; a Lehmer random number generator; variate generation via acceptance-rejection; and of generating a non-homogeneous Poisson process via thinning. Also contains two queueing data sets (one fabricated, one real-world) to facilitate input modeling. More details on the use of these functions can be found in Lawson and Leemis (2015) <doi:10.1109/WSC.2017.8248124>, in Kudlay, Lawson, and Leemis (2020) <doi:10.1109/WSC48552.2020.9384010>, and in Lawson and Leemis (2021) <doi:10.1109/WSC52266.2021.9715299>.

Request From Authors: If you adopt and use this package for your simulation course, we would greatly appreciate were you to email us (addresses below) to let us know, as we would like to maintain a list of adopters. Please include your name, university/affiliation, and course name/number. Thanks!

Details

The goal of this package is to facilitate use of R for an introductory course in discrete-event simulation.

This package contains animation functions for visualizing:

  • event-driven details of a single-server queue model (ssqvis);

  • a Lehmer random number generator (lehmer);

  • variate generation via acceptance-rejection (accrej);

  • generation of a non-homogeneous Poisson process via thinning (thinning).

The package contains variate generators capable of independent streams (based on Josef Leydold's rstream package) and antithetic variates for four discrete and eleven continuous distributions:

  • discrete: vbinom, vgeom, vnbinom, vpois

  • continuous: vbeta, vcauchy, vchisq, vexp, vgamma, vlnorm, vlogis, vnorm, vt, vunif, vweibull

All of the variate generators use inversion, and are therefore monotone and synchronized.

The package contains functions to visualize variate generation for the same four discrete and eleven continuous distributions:

  • discrete: ibinom, igeom, inbinom, ipois

  • continuous: ibeta, icauchy, ichisq, iexp, igamma, ilnorm, ilogis, inorm, it, iunif, iweibull

The package also contains functions that are event-driven simulation implementations of a single-server single-queue system and of a multiple-server single-queue system:

  • single-server: ssq

  • multiple-server: msq

Both queueing functions are extensible in allowing the user to provide custom arrival and service process functions. As of version 2.0.0, both of these functions provide animation capability.

The package contains functions that implement Monte Carlo simulation approaches for estimating probabilities in two different dice games:

  • Galileo's dice problem: galileo

  • craps: craps

The package contains three functions for computing time-persistent statistics:

  • time-average mean: meanTPS

  • time-average standard deviation: sdTPS

  • time-average quantiles: quantileTPS

The package also masks two functions from the stats package:

  • set.seed, which explicitly calls the stats version in addition to setting up seeds for the independent streams in the package;

  • sample, which provides capability to use independent streams and antithetic variates.

Finally, the package provides two queueing data sets to facilitate input modeling:

  • queueTrace, which contains 1000 arrival times and 1000 service times (all fabricated) for a single-server queueing system;

  • tylersGrill, which contains 1434 arrival times and 110 (sampled) service times corresponding to actual data collected during one business day at Tyler's Grill at the University of Richmond.

Acknowledgments

The authors would like to thank Dr. Barry L. Nelson, Walter P. Murphy Professor in the Department of Industrial Engineering & Management Sciences at Northwestern University, for meaningful feedback during the development of this package.

Author(s)

Barry Lawson [aut, cre, cph], Larry Leemis [aut], Vadim Kudlay [aut] Maintainer: Barry Lawson <blawson@bates.edu>


simEd documentation built on Nov. 27, 2023, 1:07 a.m.