Nautilus

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

Bases: desdeo_mcdm.interactive.InteractiveMethod.InteractiveMethod

Implements the basic NAUTILUS method as presented in Miettinen 2010.

In 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 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.

The decision maker has two possibilities to provide her/his preferences:

1. The decision maker can rank the objectives according to the relative importance of improving each current objective value.

Note

This ranking is not a global preference ranking of the objectives, but represents the local importance of improving each of the current objective values at that moment.

2. The decision maker can specify percentages reflecting how (s)he would like to improve the current objective values, by answering to the following question:

“Assuming you have one hundred points available, how would you distribute them among the current objective values so that the more points you allocate, the more improvement on the corresponding current objective value is desired?”

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 previous iteration point. This enables the decision maker to provide new preferences and change the direction of 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 Pareto optimal set too much.

NAUTILUS is specially suitable for avoiding undesired anchoring effects, for example in negotiation support problems, or just as a means of finding an initial Pareto optimal solution for any interactive procedure.

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.

  • objective_names (Optional[List[str]], optional) – Names of the objectives. 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, nadir, f_current)

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

calculate_iteration_point(itn, z_prev, f_current)

Calculate next iteration point towards the Pareto optimal solution.

calculate_preferential_factors(pref_method, …)

Calculate preferential factors based on the 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

new_lower_bounds (np.ndarray)

calculate_distance(z_current, nadir, f_current)[source]

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

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

  • nadir (np.ndarray) – Nadir vector.

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

Returns

Distance to the Pareto optimal set.

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(pref_method, pref_info, nadir, utopian)[source]

Calculate preferential factors based on the Decision maker’s preference information. These preferential factors are used as weights for objectives when solving an Achievement scalarizing function. The Decision maker (DM) has two possibilities to provide her/his preferences:

1. The DM can rank the objectives according to the relative importance of improving each current objective value.

Note

This ranking is not a global preference ranking of the objectives, but represents the local importance of improving each of the current objective values at that moment.

2. The DM can specify percentages reflecting how (s)he would like to improve the current objective values, by answering to the following question:

“Assuming you have one hundred points available, how would you distribute them among the current objective values so that the more points you allocate, the more improvement on the corresponding current objective value is desired?”

Parameters
  • pref_method (int) – Preference information method (either ranks (1) or percentages (2)).

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

  • nadir (np.ndarray) – Nadir vector.

  • utopian (np.ndarray) – Utopian vector.

Returns

Weights assigned to each of the objective functions in achievement scalarizing function.

Return type

np.ndarray

Examples

>>> pref_method = 1  # ranks
>>> pref_info = np.array([2, 2, 1, 1])  # first and second objective are the most important to improve
>>> nadir = np.array([-4.75, -2.87, -0.32, 9.71])
>>> utopian = np.array([-6.34, -3.44, -7.5, 0.])
>>> calculate_preferential_factors(pref_method, pref_info, nadir, utopian)
array([0.31446541, 0.87719298, 0.13927577, 0.10298661])
>>> pref_method = 2  # percentages
>>> pref_info = np.array([10, 30, 40, 20])  # DM wishes to improve most the value of objective 3, then 2,4,1
>>> nadir = np.array([-4.75, -2.87, -0.32, 9.71])
>>> utopian = np.array([-6.34, -3.44, -7.5, 0.])
>>> calculate_preferential_factors(pref_method, pref_info, nadir, utopian)
array([6.28930818, 5.84795322, 0.34818942, 0.51493306])
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, method)[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

start()[source]

Start the solution process with initializing the first request.

Returns

Initial request.

Return type

NautilusInitialRequest