mathsToPhysics

Package Contents

Classes

class InterfaceMathsToPhysics[source]

Interface to transform output from the optimizer to meaningful variables of the device

class MathsToPhysics[source]

Bases: optimeed.optimize.mathsToPhysics.interfaceMathsToPhysics.InterfaceMathsToPhysics

Dummy yet powerful example of maths to physics. The optimization variables are directly injected to the device

fromMathsToPhys(xVector, theDevice, theOptimizationVariables)[source]

Transforms an input vector coming from the optimization (e.g. [0.23, 4, False]) to “meaningful” variable (ex: length, number of poles, flag).

Parameters:
  • xVector – List of optimization variables from the optimizer
  • theDeviceInterfaceDevice
  • opti_variables – list of OptimizationVariable
fromPhysToMaths(theDevice, theOptimizationVariables)[source]

Extracts a mathematical vector from meaningful variable of the Device

Parameters:
  • theDeviceInterfaceDevice
  • opti_variables – list of OptimizationVariable
Returns:

List of optimization variables

__str__()[source]

Return str(self).

class ArrayMathsToPhysics[source]

Bases: optimeed.optimize.mathsToPhysics.interfaceMathsToPhysics.InterfaceMathsToPhysics

Evaluate array M2P. Only use it if specifically needed

fromMathsToPhys(list_of_xvector, theDevice, theOptimizationVariables)[source]

Transforms an input vector coming from the optimization (e.g. [0.23, 4, False]) to “meaningful” variable (ex: length, number of poles, flag).

Parameters:
  • xVector – List of optimization variables from the optimizer
  • theDeviceInterfaceDevice
  • opti_variables – list of OptimizationVariable
fromPhysToMaths(theDevice, theOptimizationVariables)[source]

Extracts a mathematical vector from meaningful variable of the Device

Parameters:
  • theDeviceInterfaceDevice
  • opti_variables – list of OptimizationVariable
Returns:

List of optimization variables

__str__()[source]

Return str(self).