RuleBlock
RuleBlock
¶
Block of rules and fuzzy logic operators required to control an engine.
related
Attributes¶
Functions¶
__getitem__
¶
__init__
¶
__init__(
name: str = "",
description: str = "",
enabled: bool = True,
conjunction: TNorm | None = None,
disjunction: SNorm | None = None,
implication: TNorm | None = None,
activation: Activation | None = None,
rules: Iterable[Rule] | None = None,
) -> None
Constructor.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
name |
str
|
name of the rule block |
''
|
description |
str
|
description of the rule block |
''
|
enabled |
bool
|
enable the rule block |
True
|
conjunction |
TNorm | None
|
conjunction operator |
None
|
disjunction |
SNorm | None
|
disjunction operator |
None
|
implication |
TNorm | None
|
implication operator |
None
|
activation |
Activation | None
|
activation method |
None
|
rules |
Iterable[Rule] | None
|
list of rules. |
None
|
__iter__
¶
__repr__
¶
__repr__() -> str
Return the code to construct the rule block in Python.
Returns:
Type | Description |
---|---|
str
|
code to construct the rule block in Python. |
__str__
¶
__str__() -> str
Return the code to construct the rule block in the FuzzyLite Language.
Returns:
Type | Description |
---|---|
str
|
code to construct the rule block in the FuzzyLite Language. |
load_rules
¶
load_rules(engine: Engine) -> None
Load all the rules in the rule block.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
engine |
Engine
|
engine where this rule block is registered. |
required |
reload_rules
¶
reload_rules(engine: Engine) -> None
Reload all the rules in the rule block.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
engine |
Engine
|
engine where this rule block is registered. |
required |