Uses of Class
modelarium.entities.agentsets.AgentSet
Packages that use AgentSet
Package
Description
Provides mutable and read-only collections of agents.
Defines the simulation views supplied to attribute behaviour.
Provides extension points for constructing a model's agents and environment.
Implements Modelarium's worker and co-ordinator runtime.
Provides policies for ordering local agent execution on each tick.
Provides a lambda-backed scheduler and its tick function interface.
-
Uses of AgentSet in modelarium.entities.agentsets
Methods in modelarium.entities.agentsets that return AgentSetModifier and TypeMethodDescriptionAgentSet.duplicate()Returns a duplicate of this agent set.AgentSet.getFilteredAgents(Predicate<ReadOnlyAgent> agentFilter) Returns a living-only filtered view of the agent set.AgentSet.getFilteredAgents(Predicate<ReadOnlyAgent> agentFilter, boolean includeDeadAgents) Returns a filtered view of the agent set.Methods in modelarium.entities.agentsets with parameters of type AgentSetModifier and TypeMethodDescriptionvoidAdds all agents from anotherAgentSet.voidAgentSet.addDeepCopy(AgentSet agentSet) Adds a deep copy of each agent from anotherAgentSet.voidUpdates this set with all agents from another set.Constructors in modelarium.entities.agentsets with parameters of type AgentSetModifierConstructorDescriptionReadOnlyAgentSet(AgentSet mutableVersion) Constructs a new immutable agent set wrapping the specified mutable agent set. -
Uses of AgentSet in modelarium.entities.contexts
Methods in modelarium.entities.contexts that return AgentSetModifier and TypeMethodDescriptionprotected AgentSetSimulationContext.localAgentSet()Returns the entity's local agent set.Methods in modelarium.entities.contexts with parameters of type AgentSetModifier and TypeMethodDescriptionvoidAdds each agent in an agent set to the current core's local agent set, creating the contexts the agents need to run.voidAdds each agent in an agent set to the current core's local agent set, creating the contexts the agents need to run.voidAdds each agent in an agent set to the current core's local agent set, creating the contexts the agents need to run. -
Uses of AgentSet in modelarium.entities.generators
Methods in modelarium.entities.generators that return AgentSetModifier and TypeMethodDescriptionDefaultAgentGenerator.generateAgents(Config config, RandomGenerator random) Generates a completeAgentSetbased on the number of agents specified in the model settings.Methods in modelarium.entities.generators that return types with arguments of type AgentSetModifier and TypeMethodDescriptionAgentGenerator.generateAgentsForEachThread(Config config, RandomGenerator random) Generates the model's agents and distributes them across the model's worker cores.DefaultAgentGenerator.generateAgentsForEachThread(Config config, RandomGenerator random) Distributes agents across processing threads in a round-robin fashion.FunctionalAgentGenerator.generateAgentsForEachThread(Config config, RandomGenerator random) Generates the model's agents using the logic specified during construction and distributes them across the model's worker cores.Constructor parameters in modelarium.entities.generators with type arguments of type AgentSetModifierConstructorDescriptionFunctionalAgentGenerator(BiFunction<Config, RandomGenerator, List<AgentSet>> getAgentsForEachThreadFunction) Constructs a new generator with the specified logic and uses the default reset logic.FunctionalAgentGenerator(BiFunction<Config, RandomGenerator, List<AgentSet>> getAgentsForEachThreadFunction, Runnable resetFunction) Constructs a new generator with the specified logic. -
Uses of AgentSet in modelarium.multithreading
Constructors in modelarium.multithreading with parameters of type AgentSetModifierConstructorDescriptionCoordinatorThread(String name, Config config, Environment environment, modelarium.multithreading.requestresponse.RequestResponseController requestResponseController, modelarium.clock.Clock sharedClock, AgentSet predefinedGlobalAgentSet, Map<String, String> agentThreadMap) Constructs the coordinator thread with required references.WorkerThread(String threadName, Config config, modelarium.multithreading.requestresponse.RequestResponseController requestResponseController, Environment environment, AgentSet agentsInThread, modelarium.clock.Clock sharedClock, RandomGenerator randomGenerator) Constructs a new worker thread to simulate a subset of agents. -
Uses of AgentSet in modelarium.scheduler
Methods in modelarium.scheduler with parameters of type AgentSetModifier and TypeMethodDescriptionvoidInOrderScheduler.runTick(String threadName, ReadOnlyClock clock, ReadOnlyEnvironment environment, AgentSet agentSet, RandomGenerator random) Executes each agent'srun()method in the order they are stored in the agent set.voidRandomOrderScheduler.runTick(String threadName, ReadOnlyClock clock, ReadOnlyEnvironment environment, AgentSet agentSet, RandomGenerator random) Executes each agent'srun()method in a randomised order.voidScheduler.runTick(String threadName, ReadOnlyClock clock, ReadOnlyEnvironment environment, AgentSet agentSet, RandomGenerator random) Executes a single simulation tick for the provided agent set. -
Uses of AgentSet in modelarium.scheduler.functional
Methods in modelarium.scheduler.functional with parameters of type AgentSetModifier and TypeMethodDescriptionvoidFunctionalScheduler.runTick(String threadName, ReadOnlyClock clock, ReadOnlyEnvironment environment, AgentSet agentSet, RandomGenerator random) Executes a single simulation tick by delegating to the user-provided function.voidTickFunction.runTick(String threadName, ReadOnlyClock clock, ReadOnlyEnvironment environment, AgentSet agentSet, RandomGenerator randomGenerator) Executes a single simulation tick for the provided agent set.