optimizer
¶
Module Contents¶
-
default
¶
-
class
PipeOptimization
[source]¶ Provides a live interface of the current optimization
-
get_device
(self)[source]¶ - Returns
InterfaceDevice
(not process safe, deprecated)
-
-
class
OptiHistoric
(**kwargs)[source]¶ Bases:
object
Contains all the points that have been evaluated
-
class
_pointData
(currTime, objectives, constraints)[source]¶ -
time
:float¶
-
objectives
:List[float]¶
-
constraints
:List[float]¶
-
-
_DEVICE
= autosaved¶
-
_LOGOPTI
= logopti¶
-
_RESULTS
= results¶
-
_CONVERGENCE
= optiConvergence¶
-
get_convergence
(self)[source]¶ - Returns
convergence
InterfaceConvergence
-
class
-
class
Optimizer
[source]¶ Bases:
optimeed.core.options.Option_class
Main optimizing class
-
DISPLAY_INFO
= 1¶
-
KWARGS_OPTIHISTO
= 2¶
-
set_optimizer
(self, theDevice, theObjectiveList, theConstraintList, theOptimizationVariables, theOptimizationAlgorithm=default['Algo'], theCharacterization=default['Charac'], theMathsToPhysics=default['M2P'])[source]¶ Prepare the optimizer for the optimization.
- Parameters
theDevice – object of type
InterfaceDevice
theCharacterization – object of type
InterfaceCharacterization
theMathsToPhysics – object of type
InterfaceMathsToPhysics
theObjectiveList – list of objects of type
InterfaceObjCons
theConstraintList – list of objects of type
InterfaceObjCons
theOptimizationAlgorithm – list of objects of type
AlgorithmInterface
theOptimizationVariables – list of objects of type
OptimizationVariable
- Returns
-
run_optimization
(self)[source]¶ Perform the optimization.
- Returns
Collection
of the best optimized devices
-
evaluateObjectiveAndConstraints
(self, x)[source]¶ Evaluates the performances of device associated to entrance vector x. Outputs the objective function and the constraints, and other data used in optiHistoric.
This function is NOT process safe: “self.” is actually a FORK in multiprocessing algorithms. It means that the motor originally contained in self. is modified only in the fork, and only gathered by reaching the end of the fork. It is not (yet?) possible to access this motor on the main process before the end of the fork. This behaviour could be changed by using pipes or Managers.
- Parameters
x – Input mathematical vector from optimization algorithm
- Returns
dictionary, containing objective values (list of scalar), constraint values (list of scalar), and other info (motor, time)
-