Learn R Programming

validatetools (version 0.5.2)

make_feasible: Make an infeasible system feasible.

Description

Make an infeasible system feasible, by removing the minimum (weighted) number of rules, such that the remaining rules are not conflicting. This function uses detect_infeasible_rules for determining the rules to be removed.

Usage

make_feasible(x, ...)

Value

validator object with feasible rules.

Arguments

x

validator object with the validation rules.

...

passed to detect_infeasible_rules

See Also

Other feasibility: detect_boundary_cat(), detect_boundary_num(), detect_infeasible_rules(), is_contradicted_by(), is_infeasible()

Examples

Run this code
rules <- validator( x > 0)

is_infeasible(rules)

rules <- validator( rule1 = x > 0
                  , rule2 = x < 0
                  )

is_infeasible(rules)

detect_infeasible_rules(rules)
make_feasible(rules)

# find out the conflict with this rule
is_contradicted_by(rules, "rule1")

Run the code above in your browser using DataLab