iwopy.core.opt_results.MultiObjOptResults

class iwopy.core.opt_results.MultiObjOptResults[source]

Bases: object

Container for optimization results for multi objective problems.

Parameters:
  • problem (iwopy.core.Problem) – The problem

  • success (bool) – Optimization success

  • vars_int (np.array) – Pareto-optimal variables, shape: (n_pop, n_vars_int)

  • vars_float (np.array) – Pareto-optimal variables, shape: (n_pop, n_vars_float)

  • objs (np.array) – Pareto front objective function values, shape: (n_pop, n_objectives)

  • cons (np.array) – Parteo front Constraint values, shape: (n_pop, n_constraints)

  • problem_results (Object) – The results of the variable application to the problem

success

Optimization success

Type:

bool

vars_int

Pareto-optimal variables, shape: (n_pop, n_vars_int)

Type:

np.array

vars_float

Pareto-optimal variables, shape: (n_pop, n_vars_float)

Type:

np.array

objs

Pareto front objective function values, shape: (n_pop, n_objectives)

Type:

np.array

cons

Parteo front Constraint values, shape: (n_pop, n_constraints)

Type:

np.array

problem_results

The results of the variable application to the problem

Type:

Object

pname

The problem’s name

Type:

str

vnames_int

The int variable names

Type:

list of str

vnames_float

The float variable names

Type:

list of str

onames

The names of objectives

Type:

list of str

cnames

The names of constraints

Type:

list of str

__init__(problem, success, vars_int, vars_float, objs, cons, problem_results)[source]

Methods

__init__(problem, success, vars_int, ...)

find_pareto_objmix(obj_weights[, max])

Find the point on the pareto front that approximates best the given weights of objectives

plot_pareto([obj_0, obj_1, ax, figsize, s, ...])

Get figure that shows the pareto front

__init__(problem, success, vars_int, vars_float, objs, cons, problem_results)[source]
find_pareto_objmix(obj_weights, max=False)[source]

Find the point on the pareto front that approximates best the given weights of objectives

Paramters

obj_weightslist of float

The weights of the objectives

maxbool

Find the maximal value of the weighted result (otherwise find the minimal value)

returns:

index – The index in the pareto front results

rtype:

int

plot_pareto(obj_0=0, obj_1=1, ax=None, figsize=(5, 5), s=50, color_val='orange', color_ival='red', title=None)[source]

Get figure that shows the pareto front

Parameters:
  • obj_0 (int) – The objective on the x axis

  • obj_1 (int) – The objective on the y axis

  • ax (pyplot.Axis, optional) – The axis to plot on

  • figsize (tuple) – The figure size, if ax is not given

  • s (float) – Scatter point size

  • color_val (str) – Color choice for valid points

  • color_ival (str) – Color choice for invalid points

  • title (str, optional) – The plot title

Returns:

ax – The plot axis

Return type:

pyplot.axis