langgoap.ResourceShortfall#
- class ResourceShortfall(key, required, available_max=None, available_min=None, overrun=0.0)[source]#
A single resource that exceeds its constraint.
- Parameters:
key (str)
required (float)
available_max (float | None)
available_min (float | None)
overrun (float)
- key#
Resource identifier.
- Type:
str
- required#
Total consumption in the plan.
- Type:
float
- available_max#
Upper bound from the constraint (or None if the violation is a lower-bound violation).
- Type:
float | None
- available_min#
Lower bound from the constraint (or None if the violation is an upper-bound violation).
- Type:
float | None
- overrun#
Amount by which the constraint is violated. Always >= 0.
- Type:
float
- __init__(key, required, available_max=None, available_min=None, overrun=0.0)#
- Parameters:
key (str)
required (float)
available_max (float | None)
available_min (float | None)
overrun (float)
- Return type:
None
Methods
__init__(key, required[, available_max, ...])from_dict(data)Reconstruct from the dict produced by
to_dict().to_dict()Serialise to a JSON-native dict (inverse of
from_dict()).Attributes