Skip to content

Bug in prioritization (prioritizes activity instances that are enabled after) #64

@david-chapela

Description

@david-chapela

I found a bug in the simulation with prioritization rules, not sure if it happens all the time or only under certain scenarios.

In the example I attached, 1000 cases with 3 different levels (rich, poor, poorer) of prioritization are generated.

  • What I expect, is Prosimos to execute all events until there's one waiting belonging to a case of higher priority.
  • However, what happens is that it first executes all activity instances of first-level cases (rich), then all activity instances of second-level cases (poor) and finally the ones of last-level cases (poorer).

This would make sense if there weren't "poorer" activities enabled when no others are, but there are. In fact, no activities are executed until the first "rich" is enabled, like if they were waiting for it.

I think this is because the arrival instants (timestamps at which each new case arrives) are generated all together, and without taking into account their enabled time, the first-level events are put first in the queue. Even if, following chronological order (at a certain timestamp), there are many last-level events waiting while the first-level events will still arrive in the future (however, they're already taken into account now).

prioritization-bug-example.zip

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions