:py:mod:`desdeo_emo.selection.oAPD`
===================================

.. py:module:: desdeo_emo.selection.oAPD


Module Contents
---------------

Classes
~~~~~~~

.. autoapisummary::

   desdeo_emo.selection.oAPD.Optimistic_APD_Select




.. py:class:: Optimistic_APD_Select(pop: desdeo_emo.population.Population.Population, time_penalty_function: Callable, alpha: float = 2)

   Bases: :py:obj:`desdeo_emo.selection.SelectionBase.SelectionBase`

   The selection operator for the RVEA algorithm. Read the following paper for more
       details.
       R. Cheng, Y. Jin, M. Olhofer and B. Sendhoff, A Reference Vector Guided
       Evolutionary Algorithm for Many-objective Optimization, IEEE Transactions on
       Evolutionary Computation, 2016
   :param pop: The population instance
   :type pop: Population
   :param time_penalty_function: A function that returns the time component in the penalty function.
   :type time_penalty_function: Callable
   :param alpha: The RVEA alpha parameter, by default 2
   :type alpha: float, optional

   .. py:method:: do(pop: desdeo_emo.population.Population.Population, vectors: desdeo_emo.utilities.ReferenceVectors.ReferenceVectors) -> List[int]

      Select individuals for mating on basis of Angle penalized distance.

      :param pop: The current population.
      :type pop: Population
      :param vectors: Class instance containing reference vectors.
      :type vectors: ReferenceVectors

      :returns: List of indices of the selected individuals
      :rtype: List[int]


   .. py:method:: _partial_penalty_factor() -> float

      Calculate and return the partial penalty factor for APD calculation.
          This calculation does not include the angle related terms, hence the name.
          If the calculated penalty is outside [0, 1], it will round it up/down to 0/1

      :returns: The partial penalty value
      :rtype: float



