Control Rule Set Class
Represents an immutable set of process control rules that can be
evaluated over a RuleEvaluationContext.
Definition
Namespace: Numerics.NET.Statistics.ProcessControl
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.4.0
C#
Assembly: Numerics.NET (in Numerics.NET.dll) Version: 10.4.0
public sealed class ControlRuleSet- Inheritance
- Object → ControlRuleSet
Remarks
The rule engine is intentionally decoupled from control-chart factories. Evaluate rules by calling EvaluateRules(ControlRuleSet) on any series, which creates a RuleEvaluationContext automatically and invokes Evaluate(RuleEvaluationContext).
Obtain a pre-built ControlRuleSet through the static properties on ControlRuleSets, or construct one directly from a collection of IProcessRule instances.
Example
Evaluate rules against an I-MR chart series:
double[] observations = { 9.0, 11.0, 10.0, 12.0, 8.0, 10.0, 9.0, 11.0, 10.0, 10.0 };
IndividualsMovingRangeChartSet chart =
new IndividualsMovingRangeChartSet(Vector.Create(observations));
chart.Analyze();
RuleEvaluationResult result =
chart.IndividualsSeries.EvaluateRules(ControlRuleSets.Nelson);
if (result.HasViolations)
{
foreach (RuleViolation v in result.Violations)
Console.WriteLine($"[{v.RuleId}] Point {v.TriggerIndex}: {v.RuleName}");
}Constructors
| Control | Initializes a new ControlRuleSet from the specified rules. |
| Control | Initializes a new named ControlRuleSet from the specified rules. |
Properties
| Name | Gets the name of this rule set, used in EvaluatedRuleSet. |
| Rules | Gets the ordered collection of rules in this rule set. |
Methods
| Equals | Determines whether the specified object is equal to the current object. (Inherited from Object) |
| Evaluate | Evaluates the rule set against the supplied RuleEvaluationContext and returns all detected violations. |
| Get | Serves as the default hash function. (Inherited from Object) |
| Get | Gets the Type of the current instance. (Inherited from Object) |
| ToString | Returns a string that represents the current object. (Inherited from Object) |