Package modelarium

Class ModelSettings

java.lang.Object
modelarium.ModelSettings

public class ModelSettings extends Object
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 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

      public <T extends Results> void setResultsClass(Class<T> resultsClass)
      Sets the results class that will be used to store and process simulation data.
    • setResults

      public void setResults(Results results)
      Sets the results instance that will be used to store and process simulation data.
    • setAgentGenerator

      public void setAgentGenerator(AgentGenerator agentGenerator)
      Sets the generator responsible for creating initial agent populations.
    • setEnvironmentGenerator

      public void setEnvironmentGenerator(EnvironmentGenerator environmentGenerator)
      Sets the generator responsible for creating the simulation environment.
    • setModelScheduler

      public void setModelScheduler(ModelScheduler modelScheduler)
      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

      public AttributeSetCollection getBaseAgentAttributeSetCollection()
      Returns:
      the default attribute set assigned to agents at creation
    • getBaseEnvironmentAttributeSetCollection

      public AttributeSetCollection 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

      Returns:
      a new results instance used to process and store simulation output
      Throws:
      NoSuchMethodException
      InvocationTargetException
      InstantiationException
      IllegalAccessException
    • getAgentGenerator

      public AgentGenerator getAgentGenerator()
      Returns:
      the agent generator assigned to this model run
    • getEnvironmentGenerator

      public EnvironmentGenerator getEnvironmentGenerator()
      Returns:
      the environment generator assigned to this model run
    • getModelScheduler

      public ModelScheduler getModelScheduler()
      Returns:
      the scheduler used for simulation progression