:py:mod:`desdeo_emo.problem`
============================

.. py:module:: desdeo_emo.problem


Submodules
----------
.. toctree::
   :titlesonly:
   :maxdepth: 1

   IOPIS/index.rst


Package Contents
----------------

Classes
~~~~~~~

.. autoapisummary::

   desdeo_emo.problem.IOPISProblem




.. py:class:: IOPISProblem(objectives: List[Union[desdeo_problem.ScalarObjective, desdeo_problem.VectorObjective]], variables: List[desdeo_problem.Variable], nadir: numpy.ndarray, ideal: numpy.ndarray, PIS_type: str, initial_preference: Union[List, Dict], constraints: List[desdeo_problem.ScalarConstraint] = None)

   Bases: :py:obj:`desdeo_problem.MOProblem`

   A problem class for the IOPIS formulation for interactive optimization.

   This variant uses the classification kind of preference information for
   the creation of the Preference incorporated space (PIS).

   :param objectives: A list containing
                      the objectives of the problem.
   :type objectives: List[Union[ScalarObjective, VectorObjective]]
   :param variables: A list containing the variables of the problem.
   :type variables: List[Variable]
   :param nadir: Nadir point of the problem.
   :type nadir: np.ndarray
   :param ideal: Ideal point of the problem.
   :type ideal: np.ndarray
   :param PIS: An instantiated classificationPIS class from desdeo-tools.
   :param constraints: A list of the constraints of the problem. Defaults to None.
   :type constraints: List[ScalarConstraint], optional

   .. py:method:: n_of_fitnesses() -> int
      :property:

      Property: number of dimensions of the fitness matrix.
      May be different than the number of objectives in inherited classes.

      :returns: number of fitness dimensions.
      :rtype: int


   .. py:method:: evaluate_fitness(objective_vectors: numpy.ndarray) -> numpy.ndarray

      Evaluate objective fitness.

      :param objective_vectors: objective vectors
      :type objective_vectors: np.ndarray

      :returns: Objective fitness
      :rtype: np.ndarray


   .. py:method:: reevaluate_fitness(objective_vectors: numpy.ndarray) -> numpy.ndarray

      Re-evaluate objective fitness.

      Calls update_ideal with objective_vectors.

      :param objective_vectors: objective vectors
      :type objective_vectors: np.ndarray

      :returns: Objective fitness
      :rtype: np.ndarray


   .. py:method:: update_preference(preference: Union[Dict, List])

      Update PIS preference

      :param preference: PIS preferences
      :type preference: Dict


   .. py:method:: update_ideal(objective_vectors: numpy.ndarray, fitness: numpy.ndarray)

      Update ideal vector.

      :param objective_vectors: Objective vectors
      :type objective_vectors: np.ndarray
      :param fitness: Fitness values for objective vectors
      :type fitness: np.ndarray


   .. py:method:: request_preferences(pop)


   .. py:method:: manage_preferences(population: desdeo_emo.population.Population.Population, preference=None)



