pyCBD.lib.extra module

Set of extra library blocks for more CBD possibilities.

These blocks will only be available if the corresponding packages are installed.

class pyCBD.lib.extra.FuzzyBlock(block_name, domains, rules)[source]

Bases: pyCBD.Core.BaseBlock

CBD block that integrates with the fuzzylogic library to allow for more extensive functionalities.

Parameters
  • block_name (str) – The name of the block.

  • domains (iter) – An iterable that contains all the Domains.

  • rules (Rule) – All the Rules for the fuzzy logic.

Input Ports

For each domain, an input port is added with the domain name as name. It takes a crisp input value from the external CBD model.

Output Ports

OUT1 – A crisp output value that corresponds to the fuzzy value(s).

compute(curIteration)[source]

Computes this block’s operation, based on its inputs and store it as an output signal.

Parameters

curIteration (int) – The iteration at which we must compute this value.