Package modelarium.scheduler.functional
Interface TickFunction
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
Functional interface for defining how a functional scheduler runs a single tick over a set of agents.
-
Method Summary
Modifier and TypeMethodDescriptionvoidrunTick(String threadName, ReadOnlyClock clock, ReadOnlyEnvironment environment, AgentSet agentSet, RandomGenerator randomGenerator) Executes a single simulation tick for the provided agent set.
-
Method Details
-
runTick
void runTick(String threadName, ReadOnlyClock clock, ReadOnlyEnvironment environment, AgentSet agentSet, RandomGenerator randomGenerator) Executes a single simulation tick for the provided agent set.- Parameters:
threadName- the name of the worker thread running the tickclock- the model's clock, giving the current tickenvironment- a read-only view of the worker's environmentagentSet- the set of agents to execute for this tickrandomGenerator- the random generator the tick logic can use
-