Repast Symphony Scheduling method priority and agent priority

193 Views Asked by At

I have a (I hope) simple question to those with experience with Repast Symphony.

The annotation based scheduling allows the setting of priorities. If I use the ScheduleParameters.FIRST_PRIORITY and ScheduleParameters.LAST_PRIORITY parameters for this, how is this interpreted by the overall scheduler if every agent executes these methods at every tick?

  1. First, all the agents execute the method with ScheduleParameters.FIRST_PRIORITY and only after that will all agents execute the method with ScheduleParameters.LAST_PRIORITY.

  2. For every agent, first the method with ScheduleParameters.FIRST_PRIORITY is executed and then the same agent executes the method with ScheduleParameters.LAST_PRIORITY. So every agent executes both methods before the next agent has its turn.

1

There are 1 best solutions below

1
On

Option 1. is correct. All actions scheduled with FIRST_PRIORITY will be executed, followed by all actions with LAST_PRIORITY. The scheduler actually has no notion of an agent, only actions (i.e. scheduled methods).