src.agent.default_geo_neighbor_helpers module
- class NeighborHelpers[source]
Bases:
object
Helper functions to determine the direction of a neighbor cell relative to a cell when initializing model to default geometry.
- ROOTCAP_CELL_IDs = [60, 90, 120, 136, 166, 210, 296, 75, 105, 135, 151, 181, 225, 311]
Determine the direction of a neighbor cell sharing one vertex in default geometry.
- Parameters:
cell (Cell) – The reference cell.
neighbor (Cell) – The neighboring cell being considered.
- Returns:
The direction of the neighbor relative to the cell (‘a’, ‘b’, ‘l’, ‘m’), or an empty string if no direction is applicable.
- Return type:
str
Notes
The direction is determined by comparing cell IDs. These directions will only be correct if model is initialized to default geometry.
- static check_if_neighbors_with_new_root_cap_cell(cell: Cell, sim: GrowingSim) None [source]
Checks if the neighbor is the next root cap cell.
- Parameters:
cell (Cell) – The current cell.
neighbor (Cell) – The neighboring cell.
- Returns:
- The direction of the neighbor (‘a’, ‘b’, ‘l’, ‘m’)
or None if no direction is found.
- Return type:
str
Determine the direction of a neighbor cell without shared vertices in default geometry.
- Parameters:
cell (Cell) – The reference cell.
neighbor (Cell) – The neighboring cell being considered.
- Returns:
The direction of the neighbor relative to the cell (‘a’, ‘b’, ‘l’, ‘m’), or an appropriate message if no standard direction is found.
- Return type:
str
Notes
This method accounts for special cases where neighboring cells do not share a common vertex. These assignments will only be true if model is initialized to default geometry.