mathsToPhysics

Package Contents

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(self, xVector, theDevice, theOptimizationVariables)[source]
fromPhysToMaths(self, theDevice, theOptimizationVariables)[source]
__str__(self)[source]
class InterfaceMathsToPhysics[source]

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

abstract fromMathsToPhys(self, xVector, theDevice, opti_variables)[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

abstract fromPhysToMaths(self, theDevice, opti_variables)[source]

Extracts a mathematical vector from meaningful variable of the Device

Parameters
  • theDeviceInterfaceDevice

  • opti_variables – list of OptimizationVariable

Returns

List of optimization variables