Simulation Engine

Let’s dive into the simulation engine. In this chapter we’ll take a higher-level perspective, for more concrete implementation details see the code repository.


Outcome simulation engine is provided as a code library. It can be used by any other program where we want to be able to work with outcome simulations.

The library exposes a set of useful functions that can be used to accomplish various tasks.

Some of the most important features of the engine are:

  • parsing user files
  • creating simulation instance
  • processing simulation instance
  • providing interface for reading and writing simulation instance data


At the core of the project is an experimental simulation engine. It's designed around a few basic ideas:

  • simulation models and data are created by users, therefore
  • the engine doesn't contain simulation models or data ("moving parts" like entities and components are generic)
  • data-driven architecture, everything is based on addressed variables
  • cycle-based processing scheme, meaning one clock and a set of


Cycle-based (sort of event-based)