scalarization.MOEADSF

Module Contents

Classes

MOEADSFBase

A base class for representing scalarizing functions for the MOEA/D algorithm.

Tchebycheff

Implements the Tchebycheff scalarizing function.

WeightedSum

Implements the Weighted sum scalarization function

PBI

Implements the PBI scalarization function

exception scalarization.MOEADSF.MOEADSFError[source]

Bases: Exception

Raised when an error related to the MOEADSF classes is encountered.

Initialize self. See help(type(self)) for accurate signature.

class scalarization.MOEADSF.MOEADSFBase[source]

Bases: abc.ABC

A base class for representing scalarizing functions for the MOEA/D algorithm. Instances of the implementations of this class should work as function.

abstract __call__(objective_vector: numpy.ndarray, reference_vector: numpy.ndarray, ideal_vector: numpy.ndarray, nadir_vector: numpy.ndarray) float | numpy.ndarray[source]

Evaluate the SF.

Parameters:
  • objective_vector (np.ndarray) – The objective vector to calculate the values.

  • reference_vector (np.ndarray) – The reference vector to calculate the values.

  • ideal_vector (np.ndarray) – The ideal objective vector.

  • nadir_vector (np.ndarray) – The nadir objective vector.

Returns:

Either a single SF value or a vector of

values if objective is a 2D array.

Return type:

Union[float, np.ndarray]

class scalarization.MOEADSF.Tchebycheff[source]

Bases: MOEADSFBase

Implements the Tchebycheff scalarizing function.

__call__(objective_vector: numpy.ndarray, reference_vector: numpy.ndarray, ideal_vector: numpy.ndarray) float | numpy.ndarray[source]

Evaluate the Tchebycheff scalarizing function for minimization problems.

Parameters:
  • objective_vector (np.ndarray) – A vector representing a solution in the objective space.

  • reference_vector (np.ndarray) – A reference vector representing the direction

  • ideal_vector (np.ndarray) – The ideal objective vector

Raises:

MOEADSFError – The dimensions of the objective vector and reference_vector don’t match.

Note

The shaped of objective_vector and reference_vector must match.

class scalarization.MOEADSF.WeightedSum[source]

Bases: MOEADSFBase

Implements the Weighted sum scalarization function

__call__(objective_vector: numpy.ndarray, reference_vector: numpy.ndarray) float | numpy.ndarray[source]

Evaluate the WeightedSum scalarizing function.

Parameters:
  • objective_vector (np.ndarray) – A vector representing a solution in the objective space.

  • reference_vector (np.ndarray) – A reference vector representing the direction

Raises:

MOEADSFError – The dimensions of the objective vector and reference_vector don’t match.

Note

The shaped of objective_vector and reference_vector must match. A reference point is not needed.

class scalarization.MOEADSF.PBI(theta: float = 5)[source]

Bases: MOEADSFBase

Implements the PBI scalarization function

Parameters:

theta (float) – A penalty parameter used by the function

theta

A penalty parameter used by the function

Type:

float

__call__(objective_vector: numpy.ndarray, reference_vector: numpy.ndarray, ideal_vector: numpy.ndarray) float | numpy.ndarray[source]

Evaluate the PBI scalarizing function for minimization problems.

Parameters:
  • objective_vector (np.ndarray) – A vector representing a solution in the objective space.

  • reference_vector (np.ndarray) – A reference vector representing the direction

  • ideal_vector (np.ndarray) – The ideal objecive vector

Raises:

MOEADSFError – The dimensions of the objective vector and reference_vector don’t match.

Note

The shaped of objective_vector and reference_vector must match. The reference point is not needed.