Built-in Properties
List of Built-in Properties
Built-in Property | Data Type | Belong to | Agent | Cell | Link | Assigned during initialization | Modified by formulas | Modified by components | Dependencies |
---|---|---|---|---|---|---|---|---|---|
Tick | Number | Global | |||||||
Now | DateTime | Global | |||||||
ID | Number | Individual | Entity | ||||||
Color | String | Individual | Cell/Link | ||||||
Size | Number | Individual | Cell/Link | ||||||
Shape | String | Individual | Cell/Link | ||||||
Coordinates | List[Number] | Individual | Move/Place At | Cell | |||||
Coordinates | List[Number] | Individual | Cell | ||||||
Angle | Number | Individual | Move | Cell | |||||
CurrentSpace | Cell Observer | Individual | Place At | Cell | |||||
CurrentCell | Cell | Individual | Cell | ||||||
LineType | String | Individual | Link | ||||||
Thickness | Number | Individual | Link | ||||||
Ends | List[Agent] | Individual | Link | ||||||
Weight | Number | Individual | Link | ||||||
PopulationSize | Number | Observer | Entity | ||||||
Individuals | List[Entity] | Observer | Entity | ||||||
Nodes | List[Agent] | Observer | Link | ||||||
MaxX | Number | Observer | Cell | ||||||
MinX | Number | Observer | Cell | ||||||
MaxY | Number | Observer | Cell | ||||||
MinY | Number | Observer | Cell |
Notes
- Built-in properties of entities can be overridden by custom properties with the same name.
- For the data type of entity, any instance not explicitly identified as an Observer refers to individual objects.
- The
Now
property only holds a value when the simulation is set to calendar mode in the global model settings. - The table's rightmost "Dependencies" column shows how the system dynamically creates built-in properties based on entity types in your model. While this doesn't affect modeling features (like formula bar smart suggestions, quotes, ask-to-access, etc.), you must include the required entity types that built-in properties depend on in your model to avoid runtime errors.
Description of Built-in Property Functions
Built-in Property | Global | Agent | Cell | Link |
---|---|---|---|---|
Tick | Current simulation step | |||
Now | Calendar time of the current simulation step | |||
ID | Unique natural number identifier of the individual | Unique natural number identifier of the individual | Unique natural number identifier of the individual | |
Color | Color: The color of an entity, configurable to display specific visual effects within the WorldView and Network View Charts. For detailed values, refer to the Usage of Color Properties. | Color of the entity; it can be displayed in charts | Color of the entity; it can be displayed in charts. | |
Size | Size of the Agent; it can be represented in relevant charts. | |||
Shape | The shape of an Agent, which configurable to display specific visual effects within the Worldview Charts. The system supports various enumerated values, as detailed in the notes below. | |||
Coordinates | Coordinates of the Agent in space | Nominal position of the Cell, i.e., its center coordinates | ||
Angle | Orientation angle of the Agent, [0,360). 0° is East, 90° is North. | |||
CurrentSpace | The space where the Agent is currently located | |||
CurrentCell | The grid cell where the Agent is currently located | |||
LineType | Line type of the Link entity. It can be set to show specific visual effects within the network view, using various enumerated values as detailed below. | |||
Thickness | Line width of the Link entity. It can be adjusted to display specific visual effects within the network view. | |||
Ends | The Agents at both ends of the Link entity | |||
Weight | Strength of the Link entity. When using methods to obtain closely related entities, distance can be calculated based on weight. Non-negative value. | |||
PopulationSize | Population size | Population size | Population size | |
Individuals | All individuals in the population | All individuals in the population | All individuals in the population | |
Nodes | All Agents in the network graph | |||
MaxX | Maximum X coordinate of a Cell in the space. | |||
MinX | Minimum X coordinate of a Cell in the space. | |||
MaxY | Maximum Y coordinate of a Cell in the space. | |||
MinY | Minimum Y coordinate of a Cell in the space. |
Notes
Shape
Values and Corresponding Icons: Refer to the table below for details, with the default beingarrow
.
Shape | Icon |
---|---|
arrow | ![]() |
ant | ![]() |
sheep | ![]() |
person | ![]() |
car | ![]() |
circle | ![]() |
wolf | ![]() |
LineType
: The system supports the following enumerated values:solid
,dashed
, anddotted
, with the default beingsolid
.
Using Color Properties
- The
Color
built-in property is formatted as a string value. For example, it can be set toblue
or a hexadecimal color code like#0000FF
. - HoloBit supports CSS Color standard RGB notation. You can use string names and hexadecimal color codes directly. See https://www.w3.org/TR/css-color-4/#named-colors for details.
- You can also use the global function
rgb(Number1, Number2, Number3)
provided by the system to return the color you need.
Model Example
Gradient Function
Usage of Built-in Properties in Modeling
- The usage of built-in properties is the same as regular custom properties.
- You can drag and drop quotes for these properties onto the canvas for graphical modeling.
- Within the scope, you can directly use the built-in properties' names in formulas or expressions. Outside the scope, you can access built-in properties using the format
entity_object.property_name
.