ScalarObjective

class desdeo_problem.problem.ScalarObjective(name, evaluator, lower_bound=-inf, upper_bound=inf, maximize=None)[source]

Bases: ObjectiveBase

A simple objective function that returns a scalar.

To be depreciated

Parameters:
  • name (str) – Name of the objective.

  • evaluator (Callable) – The function to evaluate the objective’s value.

  • lower_bound (float) – The lower bound of the objective.

  • upper_bound (float) – The upper bound of the objective.

  • maximize (bool) – Boolean to determine whether the objective is to be maximized.

__name

Name of the objective.

Type:

str

__value

The current value of the objective function.

Type:

float

__evaluator

The function to evaluate the objective’s value.

Type:

Callable

__lower_bound

The lower bound of the objective.

Type:

float

__upper_bound

The upper bound of the objective.

Type:

float

maximize

List of boolean to determine whether the objectives are to be maximized. All false by default

Type:

List[bool]

Raises:

ObjectiveError – When ill formed bounds are given.

Attributes Summary

evaluator

evaluator for the objective

lower_bound

lower bound of the objective.

name

name

upper_bound

upper bound of the objective.

value

value

Attributes Documentation

evaluator

evaluator for the objective

Returns:

evaluator

Return type:

callable

Type:

Property

lower_bound

lower bound of the objective.

Returns:

lower bound of the objective

Return type:

float

Type:

Property

name

name

Returns:

name

Return type:

str

Type:

Property

upper_bound

upper bound of the objective.

Returns:

upper bound of the objective

Return type:

float

Type:

Property

value

value

Returns:

value

Return type:

float

Type:

Property