-
Notifications
You must be signed in to change notification settings - Fork 6
Description
Description of the problem
I think there might be some bugs in edge cases for batch processing. The test test_range_correct_distance_between_batches_and_inside
(here) fails some of the runs. The main issue is:
- The test first run a simulation with a simple model
of 5 tasks (A -> B|C -> D -> E
) with 20 cases. D
is batched so that it is only executed when the time since the last enablement (ready_wt
) is in between 2h and 3h.- In some runs, the simulated log (example) has 19 complete traces, but the last trace is missing
D
andE
. - This causes the test to fail, as it detects one missing batched
D
.
Guess of the reason behind it
I don't know the implementation, but I imagine this is some problem with the batch rules not being fulfilled at the point where there are no more activities pending to be executed, and the simulation ending without processing those pending batches.
If I remember correctly, we established some criteria like:
- For rules based on "size": If there are pending batches (unfulfilled rule), but there are no more activities to process (impossible to fulfill rule), throw the batches.
- For rules based on time: Just wait until the time rule is fulfilled (it will be at some point) and throw the batches there.
I guess what is happening is that Prosimos is running out of activities to process before the rule or the criteria 2. are fulfilled. Then, it ends the simulation. In the attached example, this last D
is supposed to be executed at 2022-10-01 01:55:16.376778+03:00
(or later if more D
s arrive). However, the last processed activity ends at 2022-10-01 00:05:27.240190+03:00
and no more activities are registered.