RulesEngine v0.2.0 RulesEngine.InferenceRulesEngine View Source

a Rules Engine that continuously applies rules on known facts until no more rules are applicable.

Link to this section Summary

Functions

will fire (run) the provided rules against the provided facts on a RulesEngine which has been set up with the provided (RulesEngine) parameters

to implement the “skip_on…” parameters, we need to do an Enum.take_while first, to get the rules that will happen BEFORE the skip, and then do an Enum.each (or similar) to process them

fires the inference rules engine, which will continue to be called repeatedly as long as any of the rules’ conditions are true

will sort the rules (map) by priority with lowest priority value coming first. Will return a list

Link to this section Functions

Link to this function fire(params, rules, facts) View Source

will fire (run) the provided rules against the provided facts on a RulesEngine which has been set up with the provided (RulesEngine) parameters.

Link to this function get_pre_skip_rules(params, sorted_rules, facts) View Source

to implement the “skip_on…” parameters, we need to do an Enum.take_while first, to get the rules that will happen BEFORE the skip, and then do an Enum.each (or similar) to process them

Link to this function inference_fire(params, rules, facts) View Source

fires the inference rules engine, which will continue to be called repeatedly as long as any of the rules’ conditions are true

will sort the rules (map) by priority with lowest priority value coming first. Will return a list.