**mathsToPhysics** ========================================== .. py:module:: optimeed.optimize.mathsToPhysics .. toctree:: :titlesonly: :maxdepth: 1 arrayMathsToPhysics/index.rst interfaceMathsToPhysics/index.rst mathsToPhysics/index.rst Package Contents ---------------- Classes ~~~~~~~ .. autoapisummary:: optimeed.optimize.mathsToPhysics.InterfaceMathsToPhysics optimeed.optimize.mathsToPhysics.MathsToPhysics optimeed.optimize.mathsToPhysics.ArrayMathsToPhysics .. py:class:: InterfaceMathsToPhysics Interface to transform output from the optimizer to meaningful variables of the device .. py:method:: fromMathsToPhys(xVector, theDevice, opti_variables) :abstractmethod: Transforms an input vector coming from the optimization (e.g. [0.23, 4, False]) to "meaningful" variable (ex: length, number of poles, flag). :param xVector: List of optimization variables from the optimizer :param theDevice: :class:`~optimeed.InterfaceDevice.InterfaceDevice` :param opti_variables: list of :class:`~optimeed.optimize.OptimizationVariable.OptimizationVariable` .. py:method:: fromPhysToMaths(theDevice, opti_variables) :abstractmethod: Extracts a mathematical vector from meaningful variable of the Device :param theDevice: :class:`~optimeed.InterfaceDevice.InterfaceDevice` :param opti_variables: list of :class:`~optimeed.optimize.OptimizationVariable.OptimizationVariable` :return: List of optimization variables .. py:class:: MathsToPhysics Bases: :py:obj:`optimeed.optimize.mathsToPhysics.interfaceMathsToPhysics.InterfaceMathsToPhysics` Dummy yet powerful example of maths to physics. The optimization variables are directly injected to the device .. py:method:: fromMathsToPhys(xVector, theDevice, theOptimizationVariables) Transforms an input vector coming from the optimization (e.g. [0.23, 4, False]) to "meaningful" variable (ex: length, number of poles, flag). :param xVector: List of optimization variables from the optimizer :param theDevice: :class:`~optimeed.InterfaceDevice.InterfaceDevice` :param opti_variables: list of :class:`~optimeed.optimize.OptimizationVariable.OptimizationVariable` .. py:method:: fromPhysToMaths(theDevice, theOptimizationVariables) Extracts a mathematical vector from meaningful variable of the Device :param theDevice: :class:`~optimeed.InterfaceDevice.InterfaceDevice` :param opti_variables: list of :class:`~optimeed.optimize.OptimizationVariable.OptimizationVariable` :return: List of optimization variables .. py:method:: __str__() Return str(self). .. py:class:: ArrayMathsToPhysics Bases: :py:obj:`optimeed.optimize.mathsToPhysics.interfaceMathsToPhysics.InterfaceMathsToPhysics` Evaluate array M2P. Only use it if specifically needed .. py:method:: fromMathsToPhys(list_of_xvector, theDevice, theOptimizationVariables) Transforms an input vector coming from the optimization (e.g. [0.23, 4, False]) to "meaningful" variable (ex: length, number of poles, flag). :param xVector: List of optimization variables from the optimizer :param theDevice: :class:`~optimeed.InterfaceDevice.InterfaceDevice` :param opti_variables: list of :class:`~optimeed.optimize.OptimizationVariable.OptimizationVariable` .. py:method:: fromPhysToMaths(theDevice, theOptimizationVariables) Extracts a mathematical vector from meaningful variable of the Device :param theDevice: :class:`~optimeed.InterfaceDevice.InterfaceDevice` :param opti_variables: list of :class:`~optimeed.optimize.OptimizationVariable.OptimizationVariable` :return: List of optimization variables .. py:method:: __str__() Return str(self).