[ library(tentative) | Reference Manual | Alphabetic Index ]

cs_current_violations(+CS, -Vio)

Get the current violatedness of the constraint set
CS
Constraint set
Vio
An integer (output)

Description

Returns an integer representing the current violatedness of the constraint set.

Modes and Determinism

Examples

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

See Also

cs_violations / 2