libcppsim: A Simula-like, Portable Process-Oriented Simulation Library in C++

In this paper we describe the design and implementation of libcppsim, a generalpurpose, process-oriented simulation library written in C++. libcppsim provides a set of classes for implementing simulation processes, scheduling primitives, random variate generation and output data analysis functions. The main simulation entity provided by the library is the simulation process; the basic process scheduling primitives are modeled upon those provided by SIMULA’s simulation class. The modular object-oriented design of libcppsim allows users to extend its functionalities with minimal effort. In order to improve efficiency, simulation processes are not implemented as operating system threads; instead, they are implemented on top of coroutine objects which implements a cooperative quasiparallel process environment. Coroutines are implemented in a portable way in order to allow libcppsim to be used on different platforms.

[1]  J. Banks,et al.  Discrete-Event System Simulation , 1995 .

[2]  Pierre L'Ecuyer,et al.  Good Parameters and Implementations for Combined Multiple Recursive Random Number Generators , 1999, Oper. Res..

[3]  Jérôme Darmont DESP-C++: a discrete-event simulation package for C++ , 2000, Softw. Pract. Exp..

[4]  Bjarne Stroustrup,et al.  C++ Programming Language , 1986, IEEE Softw..

[5]  A. Varga,et al.  THE OMNET++ DISCRETE EVENT SIMULATION SYSTEM , 2003 .

[6]  J. Banks,et al.  Handbook of Simulation , 1998 .

[7]  J. Davenport Editor , 1960 .

[8]  Herb Schwetman,et al.  CSIM19: a powerful tool for building system models , 2001, Proceeding of the 2001 Winter Simulation Conference (Cat. No.01CH37304).

[9]  Chris D. Marlin Coroutines: A Programming Methodology, a Language Design and an Implementation , 1980, Lecture Notes in Computer Science.

[10]  Kristen Nygaard,et al.  SIMULA: an ALGOL-based simulation language , 1966, CACM.

[11]  Moreno Marzolla,et al.  Simulation Modeling of UML Software Architectures , 2003 .

[12]  Graham M. Birtwistle,et al.  DEMOS A System for Discrete Event Modelling on Simula , 1979, Springer New York.

[13]  K. Preston White,et al.  A comparison of five steady-state truncation heuristics for simulation , 2000, 2000 Winter Simulation Conference Proceedings (Cat. No.00CH37165).

[14]  Ralf S. Engelschall Portable Multithreading-The Signal Stack Trick for User-Space Thread Creation , 2000, USENIX Annual Technical Conference, General Track.

[15]  Jérôme Darmont DESP-C++: a discrete-event simulation package for C++ , 2000 .

[16]  Bjarne Stroustrup,et al.  The C++ programming language (3. ed.) , 1997 .

[17]  Mark Cameron Little,et al.  Construction and Use of a Simulation Package in C , 1993 .

[18]  Randy Brown,et al.  Calendar queues: a fast 0(1) priority queue implementation for the simulation event set problem , 1988, CACM.

[19]  Moreno Marzolla,et al.  Simulation-based performance modeling of UML software architectures , 2004 .