bluemira.codes.process.template_builder ======================================= .. py:module:: bluemira.codes.process.template_builder .. autoapi-nested-parse:: PROCESS IN.DAT template builder Classes ------- .. autoapisummary:: bluemira.codes.process.template_builder.PROCESSTemplateBuilder Module Contents --------------- .. py:class:: PROCESSTemplateBuilder An API patch to make PROCESS a little easier to work with before the PROCESS team write a Python API. .. py:attribute:: _models :type: dict[str, bluemira.codes.process.model_mapping.PROCESSModel] .. py:attribute:: _constraints :type: list[bluemira.codes.process.equation_variable_mapping.Constraint] :value: [] .. py:attribute:: values :type: dict[str, Any] .. py:attribute:: variables :type: dict[str, float] .. py:attribute:: bounds :type: dict[str, dict[str, str]] .. py:attribute:: ixc :type: list[int] :value: [] .. py:attribute:: f_nd_impurity_electrons :type: list[float] :value: [0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0] .. py:attribute:: minmax :type: int :value: 0 .. py:attribute:: ioptimiz :type: int :value: 0 .. py:attribute:: maxcal :type: int :value: 1000 .. py:attribute:: epsvmc :type: float :value: 1e-08 .. py:attribute:: neqns :type: int :value: 0 .. py:method:: set_run_title(run_title: str) Set the run title .. py:method:: set_optimisation_algorithm(algorithm_choice: bluemira.codes.process.model_mapping.PROCESSOptimisationAlgorithm) Set the optimisation algorithm to use .. py:method:: set_optimisation_numerics(maxiter: int = 1000, tolerance: float = 1e-08) Set optimisation numerics :param maxiter: maximum number of iteration/calculations in process. :param tolerance: VMCON tolerance epsvmc .. py:method:: set_number_equality_constraints(num_equality_cons: int = 0) Set numbert of equality constraints used :param num_equality_cons: Number of equality constraints used in process .. py:method:: set_minimisation_objective(objective: bluemira.codes.process.equation_variable_mapping.Objective) Set the minimisation objective equation to use when running PROCESS .. py:method:: set_maximisation_objective(objective: bluemira.codes.process.equation_variable_mapping.Objective) Set the maximisation objective equation to use when running PROCESS :raises ValueError: Objective can only be a minimisation .. py:method:: set_model(model_choice: bluemira.codes.process.model_mapping.PROCESSModel) Set a model switch to the PROCESS run .. py:method:: add_constraint(constraint: bluemira.codes.process.equation_variable_mapping.Constraint, *, equality: bool = False) Add a constraint to the PROCESS run It must be stated whether the constraint is intended as an equality constraint .. py:method:: add_variable(name: str, value: float | None = None, lower_bound: float | None = None, upper_bound: float | None = None) Add an iteration variable to the PROCESS run :raises ValueError: Iteration variable not found .. py:method:: adjust_variable(name: str, value: float | None = None, lower_bound: float | None = None, upper_bound: float | None = None) Adjust an iteration variable in the PROCESS run :raises ValueError: No iteration variable found .. py:method:: add_input_value(name: str, value: float | collections.abc.Iterable[float]) Add a fixed input value to the PROCESS run .. py:method:: add_input_values(mapping: dict[str, Any]) Add a dictionary of fixed input values to the PROCESS run .. py:method:: add_impurity(impurity: bluemira.codes.process.api.Impurities, value: float) Add an impurity concentration .. py:method:: _add_to_dict(mapping: dict[str, Any], name: str, value: Any) .. py:method:: _check_model_inputs() Check the required inputs for models have been provided. .. py:method:: _check_constraint_inputs() Check the required inputs for the constraints have been provided .. py:method:: _check_missing_inputs(model: bluemira.codes.process.model_mapping.PROCESSModel | bluemira.codes.process.equation_variable_mapping.ConstraintSelection) .. py:method:: _check_missing_iteration_variables(constraint: bluemira.codes.process.equation_variable_mapping.ConstraintSelection) .. py:method:: make_inputs() -> bluemira.codes.process._inputs.ProcessInputs Make the ProcessInputs InVariable for the specified template