Class Environment

java.lang.Object
modelarium.ModelElement
modelarium.environments.Environment
All Implemented Interfaces:
DeepCopyable<ModelElement>

public class Environment extends ModelElement
Represents the simulation environment in the model.

The environment is a type of ModelElement and holds its own AttributeSetCollection, which it runs each simulation tick.

Environments typically represent shared state or conditions accessible by agents.

  • Constructor Details

    • Environment

      public Environment(String name, AttributeSetCollection attributeSets)
      Constructs a new environment with the given name and attribute sets.
      Parameters:
      name - the unique name of the environment
      attributeSets - the attribute sets associated with the environment
  • Method Details

    • run

      public void run()
      Executes all environment attribute sets for the current tick.
      Specified by:
      run in class ModelElement
    • deepCopy

      public Environment deepCopy()