src.pydasa.workflows.basic ========================== .. py:module:: src.pydasa.workflows.basic .. autoapi-nested-parse:: Module base.py =========================================== Base class for common attributes and methods shared across all workflow **PyDASA** workflow management. Classes: **WorkflowBase**: Base class for all workflow orchestrators with common analysis components and validation methods. Attributes ---------- .. autoapisummary:: src.pydasa.workflows.basic.Variables src.pydasa.workflows.basic.Coefficients src.pydasa.workflows.basic.FDUs Classes ------- .. autoapisummary:: src.pydasa.workflows.basic.WorkflowBase Module Contents --------------- .. py:data:: Variables accepts Variable instances or dicts. :type: Type hint for variables input .. py:data:: Coefficients accepts Coefficient instances or dicts. :type: Type hint for coefficients input .. py:data:: FDUs accepts framework strings, Schema objects, or FDU definitions. :type: Type hint for schema input .. py:class:: WorkflowBase **WorkflowBase** Base class for PyDASA workflow orchestrators. Provides common attributes and validation methods shared across: - **AnalysisEngine**: Dimensional analysis workflow (phenomena.py) - **SensitivityAnalysis**: Sensitivity analysis workflow (influence.py) - **MonteCarloSimulation**: Monte Carlo experiments workflow (practical.py) .. attribute:: _variables All variables in the model. :type: Dict[str, Variable] .. attribute:: _schema Dimensional framework schema. :type: Optional[Schema] .. attribute:: _coefficients All coefficients in the model. :type: Dict[str, Coefficient] .. attribute:: _results Consolidated results from workflow. :type: Dict[str, Dict[str, Any]] .. attribute:: _is_solved Flag indicating if the workflow has been solved. :type: bool .. py:method:: __post_init__() .. py:property:: variables :type: Dict[str, pydasa.elements.parameter.Variable] *variables* Get the variable dictionary. :returns: Copy of variables dictionary. :rtype: Dict[str, Variable] .. py:property:: schema :type: Optional[pydasa.dimensional.vaschy.Schema] *schema* Get the dimensional framework schema. :returns: Schema instance or None. :rtype: Optional[Schema] .. py:property:: coefficients :type: Dict[str, pydasa.dimensional.buckingham.Coefficient] *coefficients* Get the coefficient dictionary. :returns: Copy of coefficients dictionary. :rtype: Dict[str, Coefficient] .. py:property:: results :type: Dict[str, Dict[str, Any]] *results* Get the result dictionary in the workflow. :returns: Copy of results dictionary. :rtype: Dict[str, Dict[str, Any]] .. py:property:: is_solved :type: bool *is_solved* Check if the workflow is finished. :returns: True if solved, False otherwise. :rtype: bool .. py:method:: reset() *reset* Reset the workflow state while preserving input configuration. Clears coefficients, results, and solved state. .. py:method:: clear() *clear()* Clear all workflow attributes, including variables, coefficients, results, and solved state. .. py:method:: to_dict() *to_dict()* Convert the workflow instance to a dictionary representation, handling nested Schema, Variable, and Coefficient objects. :returns: Dictionary representation of the workflow. :rtype: Dict[str, Any] .. py:method:: from_dict(data) :classmethod: *from_dict()* Create workflow instance from dictionary representation, converting dicts back to Variable, Coefficient, and Schema objects as needed. :param data: Dictionary representation of the workflow. :type data: Dict[str, Any] :returns: Workflow instance created from the dictionary. :rtype: WorkflowBase