Interface Domain

All Superinterfaces:
ModelEntity
All Known Implementing Classes:
BasicDomain, DynamicModel, Floor, Model, RoutingDomain, SimpleDomain, StaticModel

public interface Domain extends ModelEntity
Domain are submodels of the simulation model.

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:
  • Method Details

    • listAllAgents

      List<Agent> listAllAgents(boolean recursive)
      Returns all agents within this 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

      List<ModelEntity> listDomainEntities()
      Returns an unmodifiable list of all entities of this domain - an entity can either be an agent or another domain.
      Returns:
      an unmodifiable list of all entities of this domain
    • containsEntity

      default boolean containsEntity(ModelEntity entity)
      Checks, if this domain contains a given entity.
      Parameters:
      entity - the entity to be looked up
      Returns:
      true, if this domain contains the entity
    • countDomainEntities

      default int countDomainEntities()
      Returns the number of entities of the domain.
      Returns:
      the sub model count
    • getRoot

      default Domain getRoot()
      Returns the root domain of the model.
      Returns:
      the root domain
    • isRoot

      default boolean isRoot()
      Checks if this domain is the root of the model.
      Returns:
      true if this domain it the root of the model
    • isEmpty

      default boolean isEmpty()