Package org.simplesim.model
Interface Domain
- All Superinterfaces:
- ModelEntity
- All Known Implementing Classes:
- BasicDomain,- DynamicModel,- Floor,- Model,- RoutingDomain,- SimpleDomain,- StaticModel
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:
- 
Nested Class SummaryNested classes/interfaces inherited from interface org.simplesim.model.ModelEntityModelEntity.PortConnectionException, ModelEntity.PortOperationException, ModelEntity.UniqueConstraintViolationException
- 
Field SummaryFields inherited from interface org.simplesim.model.ModelEntityROOT_LEVEL
- 
Method SummaryModifier and TypeMethodDescriptiondefault booleancontainsEntity(ModelEntity entity) Checks, if this domain contains a given entity.default intReturns the number of entities of the domain.default DomaingetRoot()Returns the root domain of the model.default booleanisEmpty()default booleanisRoot()Checks if this domain is the root of the model.listAllAgents(boolean recursive) Returns all agents within this domainReturns an unmodifiable list of all entities of this domain - an entity can either be an agent or another domain.Methods inherited from interface org.simplesim.model.ModelEntityaddToDomain, getAddress, getFullName, getInport, getLevel, getName, getOutport, getParent, removeFromDomain
- 
Method Details- 
listAllAgentsReturns 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
 
- 
listDomainEntitiesList<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
 
- 
containsEntityChecks, if this domain contains a given entity.- Parameters:
- entity- the entity to be looked up
- Returns:
- true, if this domain contains the entity
 
- 
countDomainEntitiesdefault int countDomainEntities()Returns the number of entities of the domain.- Returns:
- the sub model count
 
- 
getRootReturns the root domain of the model.- Returns:
- the root domain
 
- 
isRootdefault boolean isRoot()Checks if this domain is the root of the model.- Returns:
- true if this domain it the root of the model
 
- 
isEmptydefault boolean isEmpty()
 
-