langgoap.ConstraintChain#
- class ConstraintChain(state)[source]#
A single in-progress fluent chain.
Users should not instantiate this directly — use the factories on
ConstraintBuilder.- Parameters:
state (_ChainState)
Methods
__init__(state)as_constraint(name)Terminate this chain and produce a ConstraintSpec.
as_objective(name)Terminate this chain and produce an objective entry.
bounded(*[, min, max])Attach resource bounds to this chain.
maximize()Mark this chain as a maximize objective.
minimize()Mark this chain as a minimize objective.
penalize(*[, level, weight])Mark this chain as a penalty-emitting constraint.
sum_resource(key)Sum the given resource key across all matching actions.
weight(w)Attach a weight to this chain.