Family#

class panorama.systems.models.Family(name='', transitivity=0, window=1, presence='', func_unit=None, duplicate=0, exchangeable=None, multi_system=False, multi_model=False)#

Bases: _BasicFeatures, _FuFamFeatures

Represents a family entity with configurable attributes and methods to manage its properties.

This class is designed to encapsulate the attributes and behavior of a “family” entity, providing methods for initialization, property management, and reading family data from structured inputs like JSON files. It supports various configurations related to transitivity, duplicate handling, and exchangeable properties while interacting with functional units.

name#

The name associated with the family instance, representing its identifier or label.

Type:

str

transitivity#

Represents the transitivity value, indicating the structural property of the family.

Type:

int

window#

Defines the processing window or range, typically a limit or scope.

Type:

int

presence#

Indicates the presence condition or state of the family instance.

Type:

str

duplicate#

Parameter controlling the duplication count or flag for this family.

Type:

int

exchangeable#

Defines a set of exchangeable features or components related to the family.

Type:

Set[str]

multi_system#

Specifies if the family supports operation across multiple systems.

Type:

bool

multi_model#

Specifies if the family is configured to handle multiple models.

Type:

bool

__init__(name='', transitivity=0, window=1, presence='', func_unit=None, duplicate=0, exchangeable=None, multi_system=False, multi_model=False)#

Initializes an instance of the class with specified attributes.

Parameters:
  • name (str) – The name associated with the instance.

  • transitivity (int) – Transitivity value, typically indicating the relationship type in a structure.

  • window (int) – Specifies the window parameter for processing, generally indicates a range or limit.

  • presence (str) – Describes the presence condition or state of the instance.

  • func_unit (FuncUnit) – Functional unit associated with the instance represents a unit of functionality.

  • duplicate (int) – Duplicate control parameter typically denotes count or flag for duplicates.

  • exchangeable (Set[str]) – Set of exchangeable elements or features related to instance behavior.

  • multi_system (bool) – Indicates if the instance supports multi-system functionality.

  • multi_model (bool) – Indicates if the instance supports multiple models or configurations.

__repr__()#

Provides a string representation of the object. This method is intended to provide a clear and concise human-readable representation of the object in the form of its class name and name attribute.

Returns:

str – A string containing the class name and the object’s name attribute.

__str__()#

Converts the object representation to its string form.

This method is used to return a string representation of the class instance, primarily for debugging or logging purposes. It includes the name of the class and the value of the name attribute.

Returns:

str – A formatted string containing the class name and the name attribute.

property func_unit: FuncUnit#

Gets the parent FuncUnit associated with this instance.

Returns:

FuncUnit – The parent functional unit.

property model: Model#

Returns the model associated with the functional unit.

Returns:

Model – The model instance associated with the functional unit.

read(data_fam)#

Read family.

Parameters:

data_fam (dict) – Data JSON file with families.

read_parameters(parameters, param_keys)#

Reads and assigns parameters from a provided dictionary or falls back to parent attributes if the parameter is not found.

Parameters:
  • parameters (Dict[str, Union[str, int, bool]]) – A dictionary containing parameter key-value pairs.

  • param_keys (Set[str]) – A list of keys to be retrieved from the parameters’ dictionary.