``NLOpt_Algorithm`` ========================================================== .. py:module:: optimeed.optimize.optiAlgorithms.NLOpt_Algorithm Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: optimeed.optimize.optiAlgorithms.NLOpt_Algorithm.ConvergenceManager optimeed.optimize.optiAlgorithms.NLOpt_Algorithm.NLOpt_Algorithm .. py:class:: ConvergenceManager .. py:method:: add_point(newObj) .. py:method:: set_pop_size(popSize) .. py:class:: NLOpt_Algorithm Bases: :py:obj:`optimeed.optimize.optiAlgorithms.algorithmInterface.AlgorithmInterface`, :py:obj:`optimeed.core.Option_class` Interface for the optimization algorithm .. py:attribute:: ALGORITHM :value: 0 .. py:attribute:: POPULATION_SIZE :value: 1 .. py:method:: initialize(initialVectorGuess, listOfOptimizationVariables) This function is called once parameters can't be changed anymore, before "get_convergence". :param initialVectorGuess: list of variables that describe the initial individual :param listOfOptimizationVariables: list of :class:`optimeed.optimize.optiVariable.OptimizationVariable` :return: .. py:method:: compute() Launch the optimization :return: vector of optimal variables .. py:method:: __set_optimizationVariables(listOfOptimizationVariables, theOptimizationAlgorithm) :staticmethod: .. py:method:: set_evaluationFunction(evaluationFunction, callback_on_evaluation, numberOfObjectives, numberOfConstraints, array_evaluator) Set the evaluation function and all the necessary callbacks :param evaluationFunction: check :meth:`~optimeed.optimize.optimizer.evaluateObjectiveAndConstraints` :param callback_on_evaluation: check :meth:`~optimeed.optimize.optimizer.callback_on_evaluation`. Call this function after performing the evaluation of the individuals :param numberOfObjectives: int, number of objectives :param numberOfConstraints: int, number of constraints :param array_evaluator: If True, evaluate each generation at once using numpy array. Use it only with care, as it dismisses some features (expert mode) .. py:method:: set_maxtime(maxTime) Set maximum optimization time (in seconds) .. py:method:: __str__() Return str(self). .. py:method:: get_convergence() Get the convergence of the optimization :return: :class:`~optimeed.optimize.optiAlgorithms.convergence.interfaceConvergence.InterfaceConvergence`