Properties

<< Click to Display Table of Contents >>

Navigation:  Defining Entity Types > Create a New Entity Type >

Properties

Previous pageReturn to chapter overviewNext page

The Properties tab of the entity type inspector provides a place to record a description or other notes about the entity type. You may also change the name of the entity type. The properties tab is also where you designate an entity as singular:

 

properties01 singular01

You may designate an entity as singular by checking the "Singular" box. If an entity type is defined as singular, only one entity of that type will exist in a simulation. Singular entities do not have collections, and you cannot initialize more than one of them in a run. At the same time, no reference is needed to access the information in a singular entity: simply use the entity name in place of the reference.

 

The most common example of a singular entity is the Model entity that is automatically included in every model. You can't make collections of Model entities or initialize multiple Model entities. However you may refer to model entity variables (such as time) simply by writing Model.time.

Designating an entity as singular is helpful in at least two ways:

 

A singular entity can hold information that many or most of the entities in the model will need, without having to create a reference from each entity. Often this information about the shared environment, for example, information about the weather affecting all organisms, or information about the financial climate that affects all businesses.

 

Clarifying and enforcing the requirement that a particular entity truly be one-of-a-kind. For example, a simulation of the US legal system will need one, and only one, Supreme Court.

 

Note: Once an Entity is made singular, all collection information, including collection-level diagrams, is lost and cannot be recovered even if the selection is reverted.