desdeo_mcdm.interactive.ReferencePointMethod

Module Contents

Classes

RPMInitialRequest

A request class to handle the Decision Maker's initial preferences for the first iteration round.

RPMRequest

A request class to handle the Decision Maker's preferences after the first iteration round.

RPMStopRequest

A request class to handle termination.

ReferencePointMethod

Implements the Reference Point Method as presented in |Wierzbicki_1982|.

Functions

validate_reference_point(→ None)

Validate Decion maker's reference point.

f1(xs)

exception desdeo_mcdm.interactive.ReferencePointMethod.RPMException[source]

Bases: Exception

Raised when an exception related to Reference Point Method (RFM) is encountered.

desdeo_mcdm.interactive.ReferencePointMethod.validate_reference_point(ref_point: numpy.ndarray, ideal: numpy.ndarray, nadir: numpy.ndarray) None[source]

Validate Decion maker’s reference point.

Parameters:
  • ref_point (np.ndarray) – Reference point.

  • ideal (np.ndarray) – Ideal vector.

  • nadir (np.ndarray) – Nadir vector.

Raises:

RPMException – In case reference point is invalid.

class desdeo_mcdm.interactive.ReferencePointMethod.RPMInitialRequest(ideal: numpy.ndarray, nadir: numpy.ndarray)[source]

Bases: desdeo_tools.interaction.request.BaseRequest

A request class to handle the Decision Maker’s initial preferences for the first iteration round.

classmethod init_with_method(method: desdeo_mcdm.interactive.InteractiveMethod.InteractiveMethod)[source]

Initialize request with given instance of ReferencePointMethod.

Parameters:

method (ReferencePointMethod) – Instance of ReferencePointMethod-class.

Returns:

Initial request.

Return type:

RPMInitialRequest

class desdeo_mcdm.interactive.ReferencePointMethod.RPMRequest(f_current: numpy.ndarray, f_additionals: numpy.ndarray, ideal: numpy.ndarray, nadir: numpy.ndarray)[source]

Bases: desdeo_tools.interaction.request.BaseRequest

A request class to handle the Decision Maker’s preferences after the first iteration round.

Parameters:
  • f_current (np.ndarray) – Current solution.

  • f_additionals (np.ndarray) – Additional solutions.

  • ideal (np.ndarray) – Idea vector.

  • nadir (np.ndarray) – Nadir vector.

class desdeo_mcdm.interactive.ReferencePointMethod.RPMStopRequest(x_h: numpy.ndarray, f_h: numpy.ndarray)[source]

Bases: desdeo_tools.interaction.request.BaseRequest

A request class to handle termination.

class desdeo_mcdm.interactive.ReferencePointMethod.ReferencePointMethod(problem: desdeo_problem.problem.MOProblem | desdeo_problem.problem.DiscreteDataProblem, ideal: numpy.ndarray, nadir: numpy.ndarray, epsilon: float = 1e-06, objective_names: List[str] | None = None, minimize: List[int] | None = None)[source]

Bases: desdeo_mcdm.interactive.InteractiveMethod.InteractiveMethod

Implements the Reference Point Method as presented in |Wierzbicki_1982|.

In the Reference Point Method, the Decision Maker (DM) specifies desirable aspiration levels for objective functions. Vectors formed of these aspiration levels are then used to derive scalarizing functions having minimal values at weakly, properly or Pareto optimal solutions. It is important that reference points are intuitive and easy for the DM to specify, their consistency is not an essential requirement. Before the solution process starts, some information is given to the DM about the problem. If possible, the ideal objective vector and the (approximated) nadir objective vector are presented.

At each iteration, the DM is asked to give desired aspiration levels for the objective functions. Using this information to formulate a reference point, achievement function is minimized and a (weakly, properly or) Pareto optimal solution is obtained. This solution is then presented to the DM. In addition, k other (weakly, properly or) Pareto optimal solutions are calculated using perturbed reference points, where k is the number of objectives in the problem. The alternative solutions are also presented to the DM. If (s)he finds any of the k + 1 solutions satisfactory, the solution process is ended. Otherwise, the DM is asked to present a new reference point and the iteration described above is repeated.

The idea in perturbed reference points is that the DM gets better understanding of the possible solutions around the current solution. If the reference point is far from the Pareto optimal set, the DM gets a wider description of the Pareto optimal set and if the reference point is near the Pareto optimal set, then a finer description of the Pareto optimal set is given.

In this method, the DM has to specify aspiration levels and compare objective vectors. The DM is free to change her/his mind during the process and can direct the solution process without being forced to understand complicated concepts and their meaning. On the other hand, the method does not necessarily help the DM to find more satisfactory solutions.

Parameters:
  • problem (MOProblem) – Problem to be solved.

  • ideal (np.ndarray) – The ideal objective vector of the problem.

  • nadir (np.ndarray) – The nadir objective vector of the problem. This may also be the “worst” objective vector provided by the Decision Maker if the approximation of Nadir vector is not applicable or if the Decision Maker wishes to provide even worse objective vector than what the approximated Nadir vector is.

  • epsilon (float) – A small number used in calculating the utopian point.

  • epsilon – A small number used in calculating the utopian point. Default value is 1e-6.

  • objective_names (Optional[List[str]], optional) – Names of the objectives. The length of the list must match the number of elements in ideal vector.

  • minimize (Optional[List[int]], optional) – Multipliers for each objective. ‘-1’ indicates maximization and ‘1’ minimization. Defaults to all objective values being minimized.

Raises:

RPMException – Dimensions of ideal, nadir, objective_names, and minimize-list do not match.

start() RPMInitialRequest[source]

Start the solution process with initializing the first request.

Returns:

Initial request.

Return type:

RPMInitialRequest

iterate(request: RPMInitialRequest | RPMRequest | RPMStopRequest) RPMRequest | RPMStopRequest[source]

Perform the next logical iteration step based on the given request type.

Parameters:

request (Union[RPMInitialRequest, RPMRequest]) – Either initial or intermediate request.

Returns:

A new request with content depending on the Decision Maker’s preferences.

Return type:

Union[RPMRequest, RPMStopRequest]

handle_initial_request(request: RPMInitialRequest) RPMRequest[source]

Handles the initial request by parsing the response appropriately.

Parameters:

request (RPMInitialRequest) – Initial request including the Decision Maker’s initial preferences.

Returns:

New request with updated solution process information.

Return type:

RPMRequest

handle_request(request: RPMRequest) RPMRequest | RPMStopRequest[source]

Handle the Decision Maker’s requests after the first iteration round, so-called intermediate requests.

Parameters:

request (RPMRequest) – Intermediate request including the Decision Maker’s response.

Returns:

In case last iteration, request to stop the solution process. Otherwise, new request with updated solution process information.

Return type:

Union[RPMRequest, RPMStopRequest]

calculate_prp(ref_point: numpy.ndarray, f_current: numpy.ndarray) numpy.ndarray[source]

Calculate perturbed reference points.

Parameters:
  • ref_point (np.ndarray) – Current reference point.

  • f_current (np.ndarray) – Current solution.

Returns:

Perturbed reference points.

Return type:

np.ndarray

solve_asf(ref_point: numpy.ndarray, x0: numpy.ndarray, preferential_factors: numpy.ndarray, nadir: numpy.ndarray, utopian: numpy.ndarray, objectives: Callable, variable_vectors: numpy.ndarray | None = None, variable_bounds: numpy.ndarray | None = None, method: desdeo_tools.solver.ScalarSolver.ScalarMethod | str | None = None) dict[source]

Solve Achievement scalarizing function.

Parameters:
  • ref_point (np.ndarray) – Reference point.

  • x0 (np.ndarray) – Initial values for decision variables.

  • preferential_factors (np.ndarray) – Preferential factors on how much would the Decision Maker wish to improve the values of each objective function.

  • nadir (np.ndarray) – Nadir vector.

  • utopian (np.ndarray) – Utopian vector.

  • objectives (np.ndarray) – The objective function values for each input vector.

  • variable_bounds (Optional[np.ndarray) – Lower and upper bounds of each variable as a 2D numpy array. If undefined variables, None instead.

  • method (Union[ScalarMethod, str, None]) – The optimization method the scalarizer should be minimized with.

Returns:

A dictionary with at least the following entries: ‘x’ indicating the optimal variables found, ‘fun’ the optimal value of the optimized function, and ‘success’ a boolean indicating whether the optimization was conducted successfully.

Return type:

dict

desdeo_mcdm.interactive.ReferencePointMethod.f1(xs)[source]