PatchLaserFrame#
- class PatchLaserFrame(*args, **kwargs)[source]#
Bases:
WrappedClassLaserFrame for patch-level properties in ABM models.
This class extends BasePatchLaserFrame to provide patch-level data storage and access patterns specific to agent-based models.
Initialize a LaserFrame object.
- Parameters:
capacity (int) – The maximum capacity of the frame. Must be a positive integer.
initial_count (int) – The initial number of active elements in the frame. Must be a positive integer <= capacity.
**kwargs (dict) – Additional keyword arguments to set as attributes of the object.
- Raises:
ValueError – If capacity or initial_count is not a positive integer, or if initial_count is greater than capacity.
Attributes
capacityReturns the capacity of the laser frame (total possible entries for dynamic properties).
countReturns the current count (equivalent to len()).
statesMethods