``optiVariable`` ======================================== .. py:module:: optimeed.optimize.optiVariable Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: optimeed.optimize.optiVariable.OptimizationVariable optimeed.optimize.optiVariable.Real_OptimizationVariable optimeed.optimize.optiVariable.Binary_OptimizationVariable optimeed.optimize.optiVariable.Integer_OptimizationVariable .. py:class:: OptimizationVariable(attributeName) Contains information about the optimization of a variable .. py:attribute:: attributeName :type: str .. py:method:: get_attribute_name() Return the attribute to set .. py:method:: add_prefix_attribute_name(thePrefix) Used for nested object, lower the name by prefix. Example: R_ext becomes (thePrefix).R_ext .. py:method:: get_PhysToMaths(deviceIn) Convert the initial value of the variable contained in the device to optimization variable value :param deviceIn: :class:`~optimeed.InterfaceDevice.InterfaceDevice` :return: value of the corresponding optimization variable .. py:method:: do_MathsToPhys(variableValue, deviceIn) Apply the value to the device .. py:method:: __str__() Return str(self). .. py:class:: Real_OptimizationVariable(attributeName, val_min, val_max) Bases: :py:obj:`OptimizationVariable` Real (continuous) optimization variable. Most used type .. py:attribute:: val_min :type: float .. py:attribute:: val_max :type: float .. py:method:: get_min_value() .. py:method:: get_max_value() .. py:method:: get_PhysToMaths(deviceIn) Convert the initial value of the variable contained in the device to optimization variable value :param deviceIn: :class:`~optimeed.InterfaceDevice.InterfaceDevice` :return: value of the corresponding optimization variable .. py:method:: do_MathsToPhys(value, deviceIn) Apply the value to the device .. py:method:: __str__() Return str(self). .. py:class:: Binary_OptimizationVariable(attributeName) Bases: :py:obj:`OptimizationVariable` Boolean (True/False) optimization variable. .. py:method:: get_PhysToMaths(deviceIn) Convert the initial value of the variable contained in the device to optimization variable value :param deviceIn: :class:`~optimeed.InterfaceDevice.InterfaceDevice` :return: value of the corresponding optimization variable .. py:method:: do_MathsToPhys(value, deviceIn) Apply the value to the device .. py:method:: __str__() Return str(self). .. py:class:: Integer_OptimizationVariable(attributeName, val_min, val_max) Bases: :py:obj:`OptimizationVariable` Integer variable, in [min_value, max_value] .. py:attribute:: val_min :type: int .. py:attribute:: val_max :type: int .. py:method:: get_min_value() .. py:method:: get_max_value() .. py:method:: get_PhysToMaths(deviceIn) Convert the initial value of the variable contained in the device to optimization variable value :param deviceIn: :class:`~optimeed.InterfaceDevice.InterfaceDevice` :return: value of the corresponding optimization variable .. py:method:: do_MathsToPhys(value, deviceIn) Apply the value to the device .. py:method:: __str__() Return str(self).