Discard measurements that occur after termination of the simulation

Description

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.

SchedulingFactory.getUsedSimulator().isStopped()

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.

Environment

Operating System: Windows 7
Platform: PC

Activity

Show:
User known
November 2, 2010, 3:09 PM

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.

User known
November 2, 2010, 12:56 PM

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.

User known
November 2, 2010, 11:37 AM

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.

User known
November 1, 2010, 10:48 PM

Could it be that some kind flush that is missing now?

User known
November 1, 2010, 8:59 PM

Attachment example.zip has been added with description: PCM example, no sensor data for the resource sensors

Assignee

Philipp Merkle

Reporter

Anne Koziolek

Labels

External issue URL

Severity

major

Priority

P5

External issue ID

640