LibSim is a C++ template library, that should provide a programmer with tools to build and run discrete-event simulation model. The library consists of three parts, as follows. Elements of one part of the library should have a common interface, providing high replaceability for the maximum usability and performance.
This is a core part of the library. It contains implementations for several simulation driver paradigms, as well as for different usage circumstances. All implementation should
Driver paradigms. Event-driven, process-oriented and threaded paradigms should be implemented.
Use case requirements. If some use cases imply any specific requirements to a simulation driver, the library should provide implementations that fill in those requirements.
For example, process-oriented driver can evaluate fast linear algorithm for managing a queue of processes. That algorithm is capable of processing 25M events per second for 10 consurrent processes, and works well up to ~170 processes in a queue, but turns completely unusable for more than 10000 processes.
Lazy logarithmic algorithm performs worse than linear on a small amount of processes. It can process 3М events per second for 10 concurrent processes, but is capable of managing millions of them, giving 300K events per second for 10M consurrent processes.
Obviously, both algorithms are useful. Fast linear is suited for simulation of small but complex systems (i.e. low-level software/hardware simulation), and lazy linear is intended to be used in multi-agent environments.
This is an interface part, that enables programmer to define simulation models to be run by simulation drivers. It is thought as a collection of boost-like concepts, and a set of predefined model classes that conform to thse concepts. One can inherit his model from the existing classes or build its own model class that conforms to an appropriate simulation concept.
There are several possible approaches to define model classes (adaptor template, collection template, inheritance, collection) that should be judged for their runtime performance.
Sublibraries that can be useful in ceirain use cases.
Logging part. Allows one to log execution trace of the simulation model in custom format.
Optimization part. Allows one to choose appropriate optimization plan and conduct series of simulation experiments, looking for the best combination of input parameters of the simulation model.
Debugging part. Allows one to debug simulation model like multi-threaded program using gdb remote debugging protocol.
Contact: Konstantin Savenkov