Class BasicDomain

All Implemented Interfaces:
Domain, ModelEntity
Direct Known Subclasses:
Model, RoutingDomain, StaticModel

public abstract class BasicDomain extends BasicModelEntity implements Domain
Implements all basic functionality of a domain.

Domains serve as a compartment for other entities within the simulation model. These entities may be agents or other domains. Therefore, simulation model are build as a tree-like structure with Domain as branching and BasicAgent as leaf, resembling a composite pattern. The domain adds the following features for entity management:

  • add and remove entities to this domain
  • provide information of the entities contained in this domain
  • list all agents in this domain and its subdomains
See Also:
  • Field Details

    • ROOT_ADDRESS

      public static final int[] ROOT_ADDRESS
  • Constructor Details

    • BasicDomain

      public BasicDomain()
  • Method Details

    • listAllAgents

      public final List<Agent> listAllAgents(boolean recursive)
      Description copied from interface: Domain
      Returns all agents within this domain
      Specified by:
      listAllAgents in interface Domain
      Parameters:
      recursive - true if listing should be done recursively for agents in all subdomains, too
      Returns:
      list of all agents of this domain
    • listDomainEntities

      public final List<ModelEntity> listDomainEntities()
      Description copied from interface: Domain
      Returns an unmodifiable list of all entities of this domain - an entity can either be an agent or another domain.
      Specified by:
      listDomainEntities in interface Domain
      Returns:
      an unmodifiable list of all entities of this domain