实体内置行为
图标

内置行为明细
| 名称 | 功能说明 | 参数1 | 参数2 | 参数3 | 返回数据格式 | 所属类型 | Agent | Cell | Link | 用于表达式 | 依赖 |
|---|---|---|---|---|---|---|---|---|---|---|---|
| Die | 死亡 | Individual | Agent / Link | ||||||||
| GetCell | 指定坐标获得Cell个体 | coordinates: [Number] | Result: Cell | Observer | Cell | ||||||
| GetNeighborCells | 获得调用者所在Cell为中心的指定半径内的所有Cell个体列表 | radius: 1 | Result: [Cell] | Individual | Cell | ||||||
| GetNeighbors | 获得指定半径内的Agents, 根据距离排序 | radius: 1 | Result: [Agent] | Individual | Cell | ||||||
| FilterEntities | 筛选List或Set内属于该种群的个体 | [Entity] | Result: [Entity] | Observer | Entity | ||||||
| GetAgentsOn | 获得Cell或Cell列表内的所有Agents | Cell / [Cell] | Result: [Agent] | Observer | Cell | ||||||
| GetRelatives | 获得Link网络中调用者的邻居节点 | Link | radius: 1 | weight: false | Result: [Agent] | Individual | Link | ||||
| GetPredecessors | 获得Link网络中调用者的有向前序节点 | Link | radius: 1 | weight: false | Result: [Agent] | Individual | Link | ||||
| GetSuccessors | 获得Link网络中调用者的有向后序节点 | Link | radius: 1 | weight: false | Result: [Agent] | Individual | Link | ||||
| RemoveNode | 移除Link网络中的指定节点 | Agent | Observer | Link | |||||||
| GetLink | 获得两Agent之间的Link个体或个体列表,若Link对象为不可重复则返回实体,若为可重复则返回实体List | from: Agent | to: Agent | Result: Link / [Link] | Observer | Link | |||||
| IsActive | 查看实体是否存活 | Bool | Individual | Agent / Link |
说明
- 内置行为均可被调用组件和请求(调用)组件调用,所以可用于流程建模
- 获取信息而不影响逻辑的行为(即除了
Die和RemoveNode)均可用于表达式 - 以Get开头的方法如果未能获取结果,则根据上表的返回数据格式相应返回
None或[] - 上表中“依赖”(右1列)表示系统将按照格中标注的该类实体是否存在于模型中来动态创建相应内置行为,这并不会影响建模使用,如公式栏的智能推荐、引用、请求访问等,但是如果建模使用了内置行为,而模型中不存在绑定类型实体时,运行模型会触发报错