Get all agents scheduled for exactly the given time. Removes them from the queue (they'll need to reschedule if they want to tick again).
Get all scheduled entries (for debugging/inspection). Returns entries sorted by time.
Get the scheduled time for an agent. Returns undefined if the agent is not scheduled.
Get the next scheduled time. Returns null if no agents are scheduled.
Called when an agent is added to the environment.
The newly added agent
Current environment time
Called when an agent is removed from the environment.
The agent being removed
Reset the scheduler state.
Schedule an agent to tick at a specific time. If the agent is already scheduled, the existing entry is replaced.
A priority queue-based scheduler for discrete event simulation.
Unlike the default interval-based scheduler, the PriorityScheduler allows agents to schedule themselves at arbitrary future times. This enables:
Example
Since
0.6.0