Add support for real-time execution
There are currently two proposals for adding real-time support to DPsim:
- The traditional approach: We use a timer (timerfd_create) to suspend the execution of in DPsim's main loop before starting the calculation of the next timestep. Here we must be able to detect overruns in case the calculation of the current step exceeded the time step.
- Lukas' novel approach: Using C++ exceptions to interrupt the execution of the current timestep before starting with the next one.
Option 1 is very easy to implement but might not make use of the full time step. The wasted time could be used for running additional iterations and thereby improve the results.