NautilusV2

class desdeo_mcdm.interactive.NautilusV2(problem, starting_point, ideal, nadir, epsilon=1e-06, objective_names=None, minimize=None)[source]

Bases: desdeo_mcdm.interactive.InteractiveMethod.InteractiveMethod

Implements the NAUTILUS 2 method as presented in Miettinen 2015.

Similarly to NAUTILUS, starting from the nadir point, a solution is obtained at each iteration which dominates the previous one. Although only the last solution will be Pareto optimal, the Decision Maker (DM) never looses sight of the Pareto optimal set, and the search is oriented so that (s)he progressively focusses on the preferred part of the Pareto optimal set. Each new solution is obtained by minimizing an achievement scalarizing function including preferences about desired improvements in objective function values.

NAUTILUS 2 introduces a new preference handling technique which is easily understandable for the DM and allows the DM to conveniently control the solution process. Preferences are given as direction of improvement for objectives. In NAUTILUS 2, the DM has three ways to do this:

  1. The DM sets the direction of improvement directly.

  2. The DM defines the improvement ratio between two different objectives fi and fj. For example, if the DM wishes that the improvement of fi by one unit should be accompanied with the improvement of fj by θij units. Here, the DM selects an objective fi (i=1,…,k) and for each of the other objectives fj sets the value θij. Then, the direction of improvement is defined by

    δi=1 and δj=θij, j≠i.

  3. As a generalization of the approach 2, the DM sets values of improvement ratios freely for some selected pairs of objective functions.

As with NAUTILUS, after each iteration round, the decision maker specifies whether (s)he wishes to continue with the previous preference information, or define a new one.

In addition to this, the decision maker can influence the solution finding process by taking a step back to the previous iteration point. This enables the decision maker to provide new preferences and change the direction of the solution seeking process. Furthermore, the decision maker can also take a half-step in case (s)he feels that a full step limits the reachable area of the Pareto optimal set too much.

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

  • starting_point (np.ndarray) – Objective vector used as a starting point for method.

  • ideal (np.ndarray) – The ideal objective vector of the problem being represented by the Pareto front.

  • nadir (np.ndarray) – The nadir objective vector of the problem being represented by the Pareto front.

  • epsilon (float) – A small number used in calculating the utopian point. By default 1e-6.

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

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

Raises

NautilusException – One or more dimension mismatches are encountered among the supplies arguments.

Methods Summary

calculate_bounds(objectives, n_objectives, …)

Calculate the new bounds using Epsilon constraint method.

calculate_distance(z_current, …)

Calculates the distance from current iteration point to the Pareto optimal set.

calculate_doi(n_objectives, pref_info)

Calculate direction of improvement based on improvement ratios between pairs of objective functions.

calculate_iteration_point(itn, z_prev, f_current)

Calculate next iteration point towards the Pareto optimal solution.

calculate_preferential_factors(n_objectives, …)

Calculate preferential factors based on decision maker’s preference information.

handle_initial_request(request)

Handles the initial request by parsing the response appropriately.

handle_request(request)

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

iterate(request)

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

solve_asf(ref_point, x0, …[, …])

Solve achievement scalarizing function.

start()

Start the solution process with initializing the first request.

Methods Documentation

calculate_bounds(objectives, n_objectives, x0, epsilons, bounds, constraints, method)[source]

Calculate the new bounds using Epsilon constraint method.

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

  • n_objectives (int) – Total number of objectives.

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

  • epsilons (np.ndarray) – Previous iteration point.

  • bounds (Union[np.ndarray, None]) – Bounds for decision variables.

  • constraints (Callable) – Constraints of the problem.

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

Returns

New lower bounds for objective functions.

Return type

np.ndarray

calculate_distance(z_current, starting_point, f_current)[source]

Calculates the distance from current iteration point to the Pareto optimal set.

Parameters
  • z_current (np.ndarray) – Current iteration point.

  • starting_point (np.ndarray) – Starting iteration point.

  • f_current (np.ndarray) – Current optimal objective vector.

Returns

Distance to the Pareto optimal set.

Return type

np.ndarray

calculate_doi(n_objectives, pref_info)[source]

Calculate direction of improvement based on improvement ratios between pairs of objective functions.

Parameters
  • n_objectives (int) – Number of objectives.

  • pref_info (np.ndarray) – Preference information on how the DM wishes to improve the values of each objective function.

Returns

Direction of improvement.

Return type

np.ndarray

calculate_iteration_point(itn, z_prev, f_current)[source]

Calculate next iteration point towards the Pareto optimal solution.

Parameters
  • itn (int) – Number of iterations left.

  • z_prev (np.ndarray) – Previous iteration point.

  • f_current (np.ndarray) – Current optimal objective vector.

Returns

Next iteration point.

Return type

np.ndarray

calculate_preferential_factors(n_objectives, pref_method, pref_info)[source]

Calculate preferential factors based on decision maker’s preference information.

Parameters
  • n_objectives (int) – Number of objectives in problem.

  • pref_method (int) – Preference information method, either: Direction of improvement (1), improvement ratios between a selected objective and rest of the objectives (2), or improvement ratios freely for some selected pairs of objectives (3).

  • pref_info (np.ndarray) – Preference information on how the DM wishes to improve the values of each objective function. See the examples below.

Returns

Direction of improvement. Used as weights assigned to each of the objective functions in the achievement scalarizing function.

Return type

np.ndarray

Examples

>>> n_objectives = 4
>>> pref_method = 1  # deltas directly
>>> pref_info = np.array([1, 2, 1, 2]),  # second and fourth objective are the most important to improve
>>> calculate_preferential_factors(n_objectives, pref_method, pref_info)
np.array([1, 2, 1, 2])
>>> n_objectives = 4
>>> pref_method = 2  # improvement ratios between one selected objective and each other objective
>>> pref_info = np.array([1, 1.5, (7/3), 0.5])  # first objective's ratio is set to one
>>> calculate_preferential_factors(n_objectives, pref_method, pref_info)
np.array([1, 1.5, (7/3), 0.5])
>>> n_objectives = 4
>>> pref_method = 3  # improvement ratios between freely selected pairs of objectives
# format the tuples like this: (('index of objective', 'index of objective'), 'improvement ratio between the objectives')
>>> pref_info = np.array([((1, 2), 0.5), ((3, 4), 1), ((2, 3), 1.5)], dtype=object)
>>> calculate_preferential_factors(n_objectives, pref_method, pref_info)
np.array([1., 0.5, 0.75, 0.75])

Note

Remember to specify “dtype=object” in pref_info array when using preference method 3.

handle_initial_request(request)[source]

Handles the initial request by parsing the response appropriately.

Parameters

request (NautilusInitialRequest) – Initial request including Decision maker’s initial preferences.

Returns

New request with updated solution process information.

Return type

NautilusRequest

handle_request(request)[source]

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

Parameters

request (NautilusRequest) – Intermediate request including 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[NautilusRequest, NautilusStopRequest]

iterate(request)[source]

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

Parameters

request (Union[NautilusInitialRequest, NautilusRequest]) – Either initial or intermediate request.

Returns

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

Return type

Union[NautilusRequest, NautilusStopRequest]

solve_asf(ref_point, x0, preferential_factors, nadir, utopian, objectives, variable_bounds=None, method=None)[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 indicating 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

start()[source]

Start the solution process with initializing the first request.

Returns

Initial request.

Return type

NautilusInitialRequest