bluemira.geometry.optimisation.problem ====================================== .. py:module:: bluemira.geometry.optimisation.problem .. autoapi-nested-parse:: Interface for defining a geometry-based optimisation problem. Attributes ---------- .. autoapisummary:: bluemira.geometry.optimisation.problem._GeomT Classes ------- .. autoapisummary:: bluemira.geometry.optimisation.problem.GeomOptimisationProblem Module Contents --------------- .. py:data:: _GeomT .. py:class:: GeomOptimisationProblem Bases: :py:obj:`abc.ABC`, :py:obj:`bluemira.optimisation.problem.OptimisationProblemBase` .. autoapi-inheritance-diagram:: bluemira.geometry.optimisation.problem.GeomOptimisationProblem :parts: 1 :private-bases: Interface for a geometry optimisation problem. This is an alternative to running a geometry optimisation using the :func:`.optimise_geometry` function. .. py:method:: objective(geom: _GeomT) -> float :abstractmethod: The objective function to minimise. .. py:method:: df_objective(geom: _GeomT) -> numpy.ndarray :abstractmethod: The derivative of the objective function. If not overridden, an approximation of the derivative is made using the 'central differences' method. This method is ignored if a non-gradient based algorithm is used when calling :meth:`.GeomOptimisationProblem.optimise`. .. py:method:: eq_constraints() -> list[bluemira.geometry.optimisation.typed.GeomConstraintT] List of equality constraints for the optimisation. See :func:`.optimise_geometry` for a description of the form these constraints should take. :returns: List of equality constraints for the optimisation. .. py:method:: ineq_constraints() -> list[bluemira.geometry.optimisation.typed.GeomConstraintT] List of inequality constraints for the optimisation. See :func:`.optimise_geometry` for a description of the form these constraints should take. :returns: List of inequality constraints for the optimisation. .. py:method:: keep_out_zones() -> list[bluemira.geometry.optimisation._optimise.KeepOutZone] List of geometric keep-out zones. An iterable of keep-out zones: closed wires that the geometry must not intersect. :returns: List of geometric keep-out zones. .. py:method:: optimise(geom: _GeomT, *, algorithm: bluemira.optimisation._algorithm.AlgorithmType = Algorithm.SLSQP, opt_conditions: collections.abc.Mapping[str, int | float] | None = None, opt_parameters: collections.abc.Mapping[str, Any] | None = None, keep_history: bool = False, check_constraints: bool = True, check_constraints_warn: bool = True) -> bluemira.geometry.optimisation._optimise.GeomOptimiserResult[_GeomT] Run the geometry optimisation. See :func:`.optimise_geometry` for a description of the parameters. :rtype: The result of the optimisation.