optiAlgorithms¶
Subpackages¶
Package Contents¶
Classes¶
-
class
MultiObjective_GA
(theGenerator=MyGenerator)[source]¶ Bases:
optimeed.optimize.optiAlgorithms.algorithmInterface.AlgorithmInterface
,optimeed.core.Option_class
Based on Platypus Library. Workflow: Define what to optimize and which function to call with a
Problem
Define the initial population with aGenerator
Define the algorithm. As options, define how to evaluate the elements with aEvaluator
, i.e., for multiprocessing. Define what is the termination condition of the algorithm withTerminationCondition
. Here, termination condition is a maximum time.-
initialize
(initialVectorGuess, listOfOptimizationVariables)[source]¶ This function is called just before running optimization algorithm.
-
set_evaluationFunction
(evaluationFunction, callback_on_evaluation, numberOfObjectives, numberOfConstraints, array_evaluator)[source]¶ Set the evaluation function and all the necessary callbacks
Parameters: - evaluationFunction – check
evaluateObjectiveAndConstraints()
- callback_on_evaluation – check
callback_on_evaluation()
. Call this function after performing the evaluation of the individuals - numberOfObjectives – int, number of objectives
- numberOfConstraints – int, number of constraints
- array_evaluator – If True, evaluate each generation at once using numpy array. Use it only with care, as it dismisses some features (expert mode)
- evaluationFunction – check
-
-
class
Monobjective_PSO
[source]¶ Bases:
optimeed.optimize.optiAlgorithms.algorithmInterface.AlgorithmInterface
,optimeed.core.Option_class
Interface for the optimization algorithm
-
initialize
(initialVectorGuess, listOfOptimizationVariables)[source]¶ This function is called once parameters can’t be changed anymore, before “get_convergence”.
Parameters: - initialVectorGuess – list of variables that describe the initial individual
- listOfOptimizationVariables – list of
optimeed.optimize.optiVariable.OptimizationVariable
Returns:
-
set_evaluationFunction
(evaluationFunction, callback_on_evaluate, numberOfObjectives, _numberOfConstraints, array_evaluator)[source]¶ Set the evaluation function and all the necessary callbacks
Parameters: - evaluationFunction – check
evaluateObjectiveAndConstraints()
- callback_on_evaluation – check
callback_on_evaluation()
. Call this function after performing the evaluation of the individuals - numberOfObjectives – int, number of objectives
- numberOfConstraints – int, number of constraints
- array_evaluator – If True, evaluate each generation at once using numpy array. Use it only with care, as it dismisses some features (expert mode)
- evaluationFunction – check
-
get_convergence
()[source]¶ Get the convergence of the optimization
Returns: InterfaceConvergence
-