concepts.dsl.constraint.ground_assignment_value#
- ground_assignment_value(assignments, identifier, csp=None, allow_partial=False)[source]#
Get the value of a variable based on the assignment dictionary. It will follow the EQUAL assignment types.
- Parameters:
assignments (Dict[int, Assignment]) – the assignment dictionary.
csp (ConstraintSatisfactionProblem | None) – the constraint satisfaction problem. If None, the identifier must be an integer.
allow_partial (bool) – whether to allow partial assignment. If True, the function will return an optimistic value if the variable is not assigned.
- Returns:
the value of the variable in the assignment dict.
- Return type: