Repast Simphony 调度方法优先级

Repast Simphony scheduling method priority

我有一个包含大约 10 个预定方法的模型。现在我对控制他们的执行有点困惑。我希望这些预定的方法按特定顺序执行。

我怎样才能拥有 ScheduleParameters.FIRST_PRIORITY、ScheduleParameters.Second_PRIORITY、ScheduleParameters.THIRD_PRIORITY、...和 ​​ScheduleParameters.LAST_PRIORITY。

各种ScheduleParameters.createX方法都采用指定优先级的双精度值。例如,如果您有

ScheduleParameters sp1 = ScheduleParameters.createRepeating(1, 1, 0); ScheduleParameters sp2 = ScheduleParameters.createRepeating(1, 1, 10);

sp1 的优先级为 0,sp2 的优先级为 10。使用 sp1 和 sp2 安排的操作将在第 1 个时间点发生,然后在之后的每个时间点发生。但是 sp2 动作将在 sp1 动作之前发生在同一个 tick 上。

还有两个特殊的优先级值 ScheduleParameters.FIRST_PRIORITYScheduleParameters.LAST_PRIORITY 可用于确保某个动作在同一时间刻度的任何其他动作计划之前或之后执行。

有关详细信息,请参阅 https://repast.github.io/docs/api/repast_simphony/repast/simphony/engine/schedule/ScheduleParameters.html