Package modelarium
Class ModelSettings
java.lang.Object
modelarium.ModelSettings
Encapsulates all configurable settings for a simulation model run.
Provides setters for various parameters such as the number of agents, simulation length, multithreading behaviour, result handling, and environment/agent generators.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanbooleanbooleanbooleanintintintintintvoidsetAgentGenerator(AgentGenerator agentGenerator) Sets the generator responsible for creating initial agent populations.voidsetAreAttributeSetResultsStoredOnDisk(boolean areAttributeSetResultsStoredOnDisk) Sets whether attribute set results are stored on disk or in memory.voidsetAreProcessesSynced(boolean areProcessesSynced) Specifies whether simulation processes are synchronised (e.g., central coordinator).voidsetBaseAgentAttributeSetCollection(AttributeSetCollection baseAgentAttributeSetCollection) Sets the base attribute configuration for all agents.voidsetBaseEnvironmentAttributeSetCollection(AttributeSetCollection baseEnvironmentAttributeSetCollection) Sets the base attribute configuration for the environment.voidsetDoAgentStoresHoldAgentCopies(boolean doAgentStoresHoldAgentCopies) Sets whether agent stores retain copies of agents or references.voidsetEnvironmentGenerator(EnvironmentGenerator environmentGenerator) Sets the generator responsible for creating the simulation environment.voidsetIsCacheUsed(boolean isCacheUsed) Enables or disables use of caching mechanisms within agent stores.voidsetModelScheduler(ModelScheduler modelScheduler) Sets the scheduler used to coordinate agent and environment updates.voidsetNumOfAgents(int numOfAgents) Sets the number of agents to initialise.voidsetNumOfCores(int numOfCores) Sets the number of processing cores to use for simulation.voidsetNumOfTicksToRun(int numOfTicksToRun) Sets the number of simulation ticks (excluding warm-up).voidsetNumOfWarmUpTicks(int numOfWarmUpTicks) Sets the number of warm-up ticks before data is collected.voidsetResults(Results results) Sets the results instance that will be used to store and process simulation data.<T extends Results>
voidsetResultsClass(Class<T> resultsClass) Sets the results class that will be used to store and process simulation data.
-
Constructor Details
-
ModelSettings
public ModelSettings()
-
-
Method Details
-
setNumOfAgents
public void setNumOfAgents(int numOfAgents) Sets the number of agents to initialise. -
setNumOfCores
public void setNumOfCores(int numOfCores) Sets the number of processing cores to use for simulation. -
setNumOfTicksToRun
public void setNumOfTicksToRun(int numOfTicksToRun) Sets the number of simulation ticks (excluding warm-up). -
setNumOfWarmUpTicks
public void setNumOfWarmUpTicks(int numOfWarmUpTicks) Sets the number of warm-up ticks before data is collected. -
setBaseAgentAttributeSetCollection
public void setBaseAgentAttributeSetCollection(AttributeSetCollection baseAgentAttributeSetCollection) Sets the base attribute configuration for all agents. -
setBaseEnvironmentAttributeSetCollection
public void setBaseEnvironmentAttributeSetCollection(AttributeSetCollection baseEnvironmentAttributeSetCollection) Sets the base attribute configuration for the environment. -
setAreProcessesSynced
public void setAreProcessesSynced(boolean areProcessesSynced) Specifies whether simulation processes are synchronised (e.g., central coordinator). -
setDoAgentStoresHoldAgentCopies
public void setDoAgentStoresHoldAgentCopies(boolean doAgentStoresHoldAgentCopies) Sets whether agent stores retain copies of agents or references. -
setIsCacheUsed
public void setIsCacheUsed(boolean isCacheUsed) Enables or disables use of caching mechanisms within agent stores. -
setAreAttributeSetResultsStoredOnDisk
public void setAreAttributeSetResultsStoredOnDisk(boolean areAttributeSetResultsStoredOnDisk) Sets whether attribute set results are stored on disk or in memory. -
setResultsClass
Sets the results class that will be used to store and process simulation data. -
setResults
Sets the results instance that will be used to store and process simulation data. -
setAgentGenerator
Sets the generator responsible for creating initial agent populations. -
setEnvironmentGenerator
Sets the generator responsible for creating the simulation environment. -
setModelScheduler
Sets the scheduler used to coordinate agent and environment updates. -
getNumOfAgents
public int getNumOfAgents()- Returns:
- the number of agents configured for the model
-
getNumOfCores
public int getNumOfCores()- Returns:
- the number of cores the simulation will use
-
getNumOfTicksToRun
public int getNumOfTicksToRun()- Returns:
- the number of active simulation ticks (excluding warm-up)
-
getNumOfWarmUpTicks
public int getNumOfWarmUpTicks()- Returns:
- the number of warm-up ticks before simulation begins recording data
-
getTotalNumOfTicks
public int getTotalNumOfTicks()- Returns:
- the total number of ticks including warm-up and active simulation
-
getBaseAgentAttributeSetCollection
- Returns:
- the default attribute set assigned to agents at creation
-
getBaseEnvironmentAttributeSetCollection
- Returns:
- the default attribute set assigned to the environment
-
getAreProcessesSynced
public boolean getAreProcessesSynced()- Returns:
- true if processes are synchronised during simulation
-
getDoAgentStoresHoldAgentCopies
public boolean getDoAgentStoresHoldAgentCopies()- Returns:
- true if agent stores are configured to hold agent copies
-
getIsCacheUsed
public boolean getIsCacheUsed()- Returns:
- true if caching is enabled for agent lookups
-
getAreAttributeSetResultsStoredOnDisk
public boolean getAreAttributeSetResultsStoredOnDisk()- Returns:
- true if attribute set results are stored on disk, false if attribute set results are stored in memory
-
getResults
public Results getResults() throws NoSuchMethodException, InvocationTargetException, InstantiationException, IllegalAccessException- Returns:
- a new results instance used to process and store simulation output
- Throws:
NoSuchMethodExceptionInvocationTargetExceptionInstantiationExceptionIllegalAccessException
-
getAgentGenerator
- Returns:
- the agent generator assigned to this model run
-
getEnvironmentGenerator
- Returns:
- the environment generator assigned to this model run
-
getModelScheduler
- Returns:
- the scheduler used for simulation progression
-