Discard measurements that occur after termination of the simulation
If the simulation ends because its stop criteria are fulfilled (e.g. number of measurements), the active open workload users in the system still need to continue execution until they finish their usage scenario and "die". This is why all resources check the SchedulingFactory whether the simulation is still running before loading themselves.
If the simulation is stopped, they return the control as if they had consumed the resource, without actually causing the simulation time to advance.
With this behaviour, measurement results that occur after the stop criteria of the simulation are fulfilled are wrong, because some demands have not be consumed. This means the times are too short.
It could be an option to make the probe spec in SimuCom also check the SchedulingFactory, and only stores results if the simulation is still running.
I am not sure though, does that make sense?
If there is no useful central point where the SchedulingFactory could be queried, then we can also think of something else.
Operating System: Windows 7
Sensor data is available in the latest build, thanks for the fix.
I leave this bug open to check for simulation cleanup, and to wait for the improved solution mentioned by Philipp.
Note that some bugs have been fixed in the last months concerning the cleanup/stopped logic in the simulation w.r.t the cleanup of threads.
When the simulation has stopped, no workload threads should exist any more. Some of those threads haven't been removed properly before. I can do some simulation tests next week to check whether the cleanup works.
The overall utilization is not known until the simulation has stopped. However, from this point on, all arriving measurements will be discarded (cf. bug title). Thus I fixed the bug by bypassing the "simulation stopped"-check for overall utilization measurements. This is a kind of a hack, but it will likely be replaced with a better solution within the following weeks.
Could it be that some kind flush that is missing now?
Attachment example.zip has been added with description: PCM example, no sensor data for the resource sensors