mbdlyb_ui.functional.functions

Copyright (c) 2023 - 2026 TNO-ESI All rights reserved.

Classes

FormRequiredForRelation

Represent an editable form required for relation.

FunctionCPTPage

Display the function CPT probability table editor.

FunctionCreatePage

Display the function create editing page.

FunctionDetailPage

Display the function detail properties and relations.

FunctionUpdatePage

Display the function update editing page.

ObservesRelationCreatePage

Display the observes relation create editing page.

ObservesRelationUpdatePage

Display the observes relation update editing page.

RequiredForRelationCreatePage

Display the required for relation create editing page.

RequiredForRelationRepairPage

Display the required for relation repair editing page.

RequiredForRelationUpdatePage

Display the required for relation update editing page.

SubfunctionRelationCreatePage

Display the subfunction relation create editing page.

SubfunctionRelationTablePage

Display the subfunction relation table relation table.

SubfunctionRelationUpdatePage

Display the subfunction relation update editing page.

TestsRelationCreatePage

Display the tests relation create editing page.

TestsRelationUpdatePage

Display the tests relation update editing page.

Functions

add_rfr(rf_relations, initial)

Append a required-for repair relation and refresh the table.

drop_rfr(rf_relations, rf_relation)

Remove a required-for repair relation and refresh the table.

function_form(function, states, cluster[, update])

Render the function name and state editing controls.

observes_relation_form(o_relation)

Render the observed node and relation weight controls.

repair_rfr_table(rf_relations, initial_relation[, ...])

Render editable required-for repair relation rows.

requiredfor_relation_form(rf_relation, root)

Render the required-for target, weight, and operating mode controls.

requiredfor_relation_repair_form(rf_relations, ...)

Render editable repair relations and associated costs.

subfunction_relation_form(sf_relation)

Render the parent function and relation weight controls.

tests_relation_form(t_relation)

Render the tested node and relation weight controls.

Module Contents

class mbdlyb_ui.functional.functions.FormRequiredForRelation(idx: int, start_node: mbdlyb.functional.gdb.GFunction, end_node: mbdlyb.functional.gdb.GFunction | None = None, weight: float | None = None, operating_modes: list[str] | None = None)

Bases: mbdlyb_ui.functional.helpers.RequiredForRelation

Represent an editable form required for relation.

idx
class mbdlyb_ui.functional.functions.FunctionCPTPage(function_id: str)

Bases: mbdlyb_ui.functional.base.CPTPage

Display the function CPT probability table editor.

class mbdlyb_ui.functional.functions.FunctionCreatePage(cluster_id: str)

Bases: mbdlyb_ui.functional.base.FunctionalPage

Display the function create editing page.

function: mbdlyb.functional.gdb.GFunction
states: mbdlyb_ui.functional.helpers.StateTable
class mbdlyb_ui.functional.functions.FunctionDetailPage(function_id)

Bases: mbdlyb_ui.functional.base.FunctionalPage

Display the function detail properties and relations.

function: mbdlyb.functional.gdb.GFunction
class mbdlyb_ui.functional.functions.FunctionUpdatePage(function_id: str)

Bases: mbdlyb_ui.functional.base.FunctionalPage

Display the function update editing page.

function: mbdlyb.functional.gdb.GFunction
states: mbdlyb_ui.functional.helpers.StateTable
class mbdlyb_ui.functional.functions.ObservesRelationCreatePage(function_id: str)

Bases: mbdlyb_ui.functional.base.FunctionalPage

Display the observes relation create editing page.

function: mbdlyb.functional.gdb.GFunction
o_relation: mbdlyb_ui.functional.helpers.ObservesRelation
class mbdlyb_ui.functional.functions.ObservesRelationUpdatePage(function_id: str, observable_id: str)

Bases: mbdlyb_ui.functional.base.FunctionalPage

Display the observes relation update editing page.

function: mbdlyb.functional.gdb.GFunction
o_relation: mbdlyb_ui.functional.helpers.ObservesRelation
class mbdlyb_ui.functional.functions.RequiredForRelationCreatePage(function_id: str)

Bases: mbdlyb_ui.functional.base.FunctionalPage

Display the required for relation create editing page.

function: mbdlyb.functional.gdb.GFunction
rf_relation: mbdlyb_ui.functional.helpers.RequiredForRelation
class mbdlyb_ui.functional.functions.RequiredForRelationRepairPage(function_id: str, dep_function_id: str)

Bases: mbdlyb_ui.functional.base.FunctionalPage

Display the required for relation repair editing page.

function: mbdlyb.functional.gdb.GFunction
rf_relation: FormRequiredForRelation
rf_relations: list[FormRequiredForRelation]
class mbdlyb_ui.functional.functions.RequiredForRelationUpdatePage(function_id: str, dep_function_id: str)

Bases: mbdlyb_ui.functional.base.FunctionalPage

Display the required for relation update editing page.

function: mbdlyb.functional.gdb.GFunction
rf_relation: mbdlyb_ui.functional.helpers.RequiredForRelation
class mbdlyb_ui.functional.functions.SubfunctionRelationCreatePage(function_id: str)

Bases: mbdlyb_ui.functional.base.FunctionalPage

Display the subfunction relation create editing page.

sf_relation: mbdlyb_ui.functional.helpers.SubfunctionOfRelation
class mbdlyb_ui.functional.functions.SubfunctionRelationTablePage(function_id: str)

Bases: mbdlyb_ui.functional.base.FunctionalPage

Display the subfunction relation table relation table.

eligable_sfs: dict[str, dict]
function: mbdlyb.functional.gdb.GFunction
groups: dict[str, list[str]]
class mbdlyb_ui.functional.functions.SubfunctionRelationUpdatePage(function_id: str, subfunction_id: str)

Bases: mbdlyb_ui.functional.base.FunctionalPage

Display the subfunction relation update editing page.

sf_relation: mbdlyb_ui.functional.helpers.SubfunctionOfRelation
class mbdlyb_ui.functional.functions.TestsRelationCreatePage(function_id: str)

Bases: mbdlyb_ui.functional.base.FunctionalPage

Display the tests relation create editing page.

function: mbdlyb.functional.gdb.GFunction
t_relation: mbdlyb_ui.functional.helpers.TestsRelation
class mbdlyb_ui.functional.functions.TestsRelationUpdatePage(function_id: str, test_id: str)

Bases: mbdlyb_ui.functional.base.FunctionalPage

Display the tests relation update editing page.

function: mbdlyb.functional.gdb.GFunction
t_relation: mbdlyb_ui.functional.helpers.TestsRelation
mbdlyb_ui.functional.functions.add_rfr(rf_relations: list[FormRequiredForRelation], initial: FormRequiredForRelation)

Append a required-for repair relation and refresh the table.

Parameters:
  • rf_relations – Editable required-for repair relations.

  • initial – Whether to create the first repair relation.

mbdlyb_ui.functional.functions.drop_rfr(rf_relations: list[FormRequiredForRelation], rf_relation: FormRequiredForRelation)

Remove a required-for repair relation and refresh the table.

Parameters:
  • rf_relations – Editable required-for repair relations.

  • rf_relation – Required-for relation being edited.

mbdlyb_ui.functional.functions.function_form(function: mbdlyb.functional.gdb.GFunction, states: mbdlyb_ui.functional.helpers.StateTable, cluster: mbdlyb.functional.gdb.GCluster, update: bool = True)

Render the function name and state editing controls.

Parameters:
  • function – Function whose properties are edited.

  • states – Editable state names for the function.

  • cluster – Parent cluster used to validate the function name.

  • update – Whether the function already exists for name validation.

mbdlyb_ui.functional.functions.observes_relation_form(o_relation: mbdlyb_ui.functional.helpers.ObservesRelation)

Render the observed node and relation weight controls.

Parameters:

o_relation – Observes relation being edited.

mbdlyb_ui.functional.functions.repair_rfr_table(rf_relations: list[FormRequiredForRelation], initial_relation: FormRequiredForRelation, start_options: dict[str, str] | None = None, end_options: dict[str, str] | None = None)

Render editable required-for repair relation rows.

Parameters:
  • rf_relations – Editable required-for repair relations.

  • initial_relation – Original required-for relation used for repair.

  • start_options – Available source nodes for the relation.

  • end_options – Available target nodes for the relation.

mbdlyb_ui.functional.functions.requiredfor_relation_form(rf_relation: mbdlyb_ui.functional.helpers.RequiredForRelation, root: mbdlyb.functional.gdb.GCluster)

Render the required-for target, weight, and operating mode controls.

Parameters:
  • rf_relation – Required-for relation being edited.

  • root – Root cluster used to list eligible relation targets.

mbdlyb_ui.functional.functions.requiredfor_relation_repair_form(rf_relations: list[FormRequiredForRelation], initial_relation: FormRequiredForRelation)

Render editable repair relations and associated costs.

Parameters:
  • rf_relations – Editable required-for repair relations.

  • initial_relation – Original required-for relation used for repair.

mbdlyb_ui.functional.functions.subfunction_relation_form(sf_relation: mbdlyb_ui.functional.helpers.SubfunctionOfRelation)

Render the parent function and relation weight controls.

Parameters:

sf_relation – Subfunction relation being edited.

mbdlyb_ui.functional.functions.tests_relation_form(t_relation: mbdlyb_ui.functional.helpers.TestsRelation)

Render the tested node and relation weight controls.

Parameters:

t_relation – Tests relation being edited.