Cells
Bases: _LinkNodeCell
, _BaseObj
A patch cell of a RasterLayer
.
Subclassing this class to create a custom cell.
When class attribute max_agents
is assigned,
the agents
property will be limited to the number of agents.
Attributes:
Name | Type | Description |
---|---|---|
agents |
_CellAgentsContainer
|
The agents located at here. |
layer |
PatchModule
|
The |
Source code in abses/cells.py
get ¶
Gets the value of an attribute or registered property. Automatically update the value if it is the dynamic variable of the layer.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
attr |
str
|
The name of attribute to get. |
required |
Returns:
Name | Type | Description |
---|---|---|
Any |
Any
|
The value of the attribute. |
Raises:
Type | Description |
---|---|
AttributeError
|
Attribute value of the associated patch cell. |
Source code in abses/cells.py
neighboring ¶
Get the grid around the patch.