langgoap.explain_infeasibility#
- explain_infeasibility(plan, goal, meta)[source]#
Analyze an INFEASIBLE plan and explain which constraints conflict.
Resource totals of a fixed plan do not interact, so every violated hard constraint is independently unsatisfiable: the minimal unsatisfiable subset is exactly the set of violated constraints. All of them are reported, each with its own shortfall, so a plan over both its cost and its token budget names both (issue #25).
- Parameters:
plan (Plan) – The infeasible plan.
goal (GoalSpec) – Goal specification with constraints.
meta (CSPMetadata) – CSP metadata from the validation run.
- Returns:
An
InfeasibilityExplanationdescribing the conflict, orNoneif the plan is not infeasible (no hard violations).- Return type:
InfeasibilityExplanation | None