Skip to main content

Built-in Behaviors of Entities

Icon

built-in-behaviors-of-entities

List of Built-in Behaviors

Built-in BehaviorsDescriptionParameter 1Parameter 2Parameter 3ReturnBelong toAgentCellLinkFor FormulasDependencies
DieDieIndividualAgent / Link
GetCellGet cell at specified coordinatescoordinates: [Number]Result: CellObserverCell
GetNeighborCellsGet a list of all Cell individuals within a specified radius centered around the caller's Cell.radius: 1Result: [Cell]IndividualCell
GetNeighborsGet Agents within a specified radius, sorted by distanceradius: 1Result: [Agent]IndividualCell
FilterEntitiesFilter individuals belonging to the same population from a List or Set[Entity]Result: [Entity]ObserverEntity
GetAgentsOnGet all Agents on a cell or list of cellsCell / [Cell]Result: [Agent]ObserverCell
GetRelativesGet neighbor nodes of the caller in a networkLinkradius: 1weight: falseResult: [Agent]IndividualLink
GetPredecessorsGet directed predecessor nodes of the caller in a networkLinkradius: 1weight: falseResult: [Agent]IndividualLink
GetSuccessorsGet directed successor nodes of the caller in a networkLinkradius: 1weight: falseResult: [Agent]IndividualLink
RemoveNodeRemove a specified node from the networkAgentObserverLink
GetLinkGet Link individuals or a list of them between two Agents. If the Link object is non-repeatable, return an entity; if it is repeatable, return the list of entities.from: Agentto: AgentResult: Link/[Link]ObserverLink
IsActiveChecks whether the entity is currently active.BoolIndividualAgent / Link

Notes

  • The Call and Ask components can access all built-in behaviors. This makes them beneficial for graphical modeling.
  • Behaviors that retrieve information without changing the logic (i.e., except Die and RemoveNode) can be used in expressions.
  • Methods beginning with 'Get,' if unable to obtain results, will return None or [] according to the return data format in the above table.
  • The table's rightmost "Dependencies" column shows how the system dynamically creates built-in behaviors based on entity types in your model. While this doesn't affect modeling features (like formula bar suggestions, quotes, ask-to-access, etc.), you must include the required entity types in your model to avoid runtime errors.