FailureStatistics: Stateful Singleton
A stateful singleton class is used to record failure-on-demand occurrences during the simulation:
This class holds several counters for occurred and handled failures-on-demand during a simulation run. It also holds information about all potential failure types that may occur for the simulated PCM instance (this information is provided before simulation start by the DetermineFailureTypesJob). Moreover, it includes methods to log failure statistics on the console after the end of the simulation.
A clean long-term solution would be to collect all failure data in sensors (by now, this is partially realized through the "Execution result" state sensor). Then, there is no need for extra failure counters during simulation.
However, a central mapping of potential failure types to state ids of the sensors will still be necessary. If this mapping is not a singleton, it must be an object accessible at all relevant places. I expect some effort for this, because there are currently several places where this information is needed (see attachment).
Operating System: Windows 7
invested some initial time for investigating the issue
Attachment FailureStatistics.png has been added with description: Accesses to the FailureStatistics singleton during simulation