[ library(tentative) | The ECLiPSe Libraries | Reference Manual | Alphabetic Index ]

# cs_violations(+CS, -Vio)

Get a tentative variable reflecting the violatedness of the constraint set

CS
  Constraint set
Vio
  A tentative variable (output)

## Description

Returns a tentative variable reflecting the (current and future) violatedness of the constraint set.

### Modes and Determinism

- cs_violations(+, -) is det

## Examples

        ?- length(Xs, 5), tent_set_all(Xs, 99), CS :~ alldifferent(Xs),
           cs_violations(CS, V).
        Xs = [Xi{99 -> 4}, Xi{99 -> 4}, Xi{99 -> 4}, Xi{99 -> 4}, Xi{99 -> 4}]
        CS = constraint_set(V{10 -> 0}, ...)
        V = V{10 -> 0}
        There is 1 delayed goal.
        Yes (0.00s cpu)

## See Also

cs_current_violations / 2