Skip to content

Consequent

Consequent

Proposition set that represents and evaluates the consequent of a rule.

structure

The structure of a rule is:
if (antecedent) then (consequent)

The structure of the consequent of a rule is:
then variable is [hedge]* term [and variable is [hedge]* term]* [with w]?


*-marked elements may appear zero or more times,
elements in brackets are optional,
elements in parentheses are compulsory, and
?-marked elements may appear once or not at all.

related

Attributes

conclusions instance-attribute

conclusions: list[Proposition] = []

text instance-attribute

text: str = text

Functions

__init__

__init__(text: str = '') -> None

Constructor.

text: consequent as text.

__repr__

__repr__() -> str

Return the code to construct the consequent in Python.

Returns:

Type Description
str

code to construct the consequent in Python.

__str__

__str__() -> str

Return the consequent as text.

Returns:

Type Description
str

consequent as text

is_loaded

is_loaded() -> bool

Return whether the consequent is loaded.

Returns:

Type Description
bool

consequent is loaded.

load

load(engine: Engine) -> None

Load the consequent using the engine to identify and get references to the input and output variables.

Parameters:

Name Type Description Default
engine Engine

engine to get references in the consequent.

required

modify

modify(activation_degree: Scalar, implication: TNorm | None) -> None

Modify the consequent with the activation degree and the implication operator.

Parameters:

Name Type Description Default
activation_degree Scalar

activation degree computed in the antecedent of the rule

required
implication TNorm | None

implication operator configured in the rule block.

required

unload

unload() -> None

Unload the consequent.