langgoap.InfeasibilityExplanation#
- class InfeasibilityExplanation(conflicting_constraints, resource_shortfalls, suggestion)[source]#
Explanation of why a plan is infeasible.
- Parameters:
conflicting_constraints (tuple[ConstraintSpec, ...])
resource_shortfalls (tuple[ResourceShortfall, ...])
suggestion (str)
- conflicting_constraints#
Every hard constraint the plan violates. Resource totals are fixed per plan, so each violated bound is independently unsatisfiable and the set is its own minimal unsatisfiable subset.
- Type:
tuple[langgoap.goals.ConstraintSpec, …]
- resource_shortfalls#
Per-resource breakdown of violations.
- Type:
- suggestion#
Human-readable suggestion for resolving the conflict.
- Type:
str
- __init__(conflicting_constraints, resource_shortfalls, suggestion)#
- Parameters:
conflicting_constraints (tuple[ConstraintSpec, ...])
resource_shortfalls (tuple[ResourceShortfall, ...])
suggestion (str)
- Return type:
None
Methods
__init__(conflicting_constraints, ...)from_dict(data)Reconstruct from the dict produced by
to_dict().to_dict()Serialise to a JSON-native dict (inverse of
from_dict()).Attributes