Wall Dataclass
Module defining wall representation for the AMR Hub ABM simulation.
Wall
dataclass
Representation of a wall in the AMR Hub ABM simulation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
start
|
tuple[float, float]
|
The starting coordinates of the wall as a tuple (x, y). |
required |
end
|
tuple[float, float]
|
The ending coordinates of the wall as a tuple (x, y). |
required |
thickness
|
float
|
The thickness of the wall. Defaults to 0.2 units. |
0.2
|
Source code in src/amr_hub_abm/spatial/wall.py
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | |
line
property
Get the line representation of the wall.
polygon
property
Get the polygon representation of the wall based on its thickness.
plot(ax, **kwargs)
Plot the wall on a given matplotlib axis.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
ax
|
Axes
|
The axis on which to plot the wall. |
required |
**kwargs
|
dict
|
Additional keyword arguments to pass to the fill method for styling the wall (e.g., color, alpha). |
{}
|
Source code in src/amr_hub_abm/spatial/wall.py
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 | |