rules with '&'
I'm trying some rules with '&' but when I try to run your functions from {validatetoos} I have an error. Here the example:
rules <- validator( r1 = A1 == 0 & A2 == 0 & A3 <= A4 , r2 = A1 == 0 & A2 == 0 & A3 > A4 )
is_infeasible(rules)
Error in A[, v] : subscript out of bounds In addition: Warning message: In to_miprules(x) : Ignoring rules: r1, r2
Thanks for your question!
In validate and validator a record is considered valid if it obeys all rule.
So implicitely a rule set is "&"-ding all rules.
validatetools (and errorlocate) currently assume that rules are not composed by "&".
Current work-around is splitting your rules (replacing "&" with ",")
rules <- validator(
r1 = A1 == 0
, r2 = A2 == 0
, r3 = A3 <= A4
, r4 = A3 > A4
)
Suggestions for validatetools are welcome: validatetools could rewrite the ruleset to do exactly this...
Best,
Edwin