The various ScheduleParameters.createX
methods all take a double value that specifies priority. For example, if you have
ScheduleParameters sp1 = ScheduleParameters.createRepeating(1, 1, 0);
ScheduleParameters sp2 = ScheduleParameters.createRepeating(1, 1, 10);
the priorities are 0 for sp1 and 10 for sp2. Actions scheduled with sp1 and sp2 will occur at tick 1 and then every tick thereafter. But sp2 actions will occur before the sp1 actions scheduled at the same tick.
There are also two special priority values ScheduleParameters.FIRST_PRIORITY
and ScheduleParameters.LAST_PRIORITY
that can be used to make sure an action executes before or after any other action schedule for the same tick.
See https://repast.github.io/docs/api/repast_simphony/repast/simphony/engine/schedule/ScheduleParameters.html for more info.