ScalarMOProblem
 class desdeo_problem.problem.ScalarMOProblem(objectives, variables, constraints, nadir=None, ideal=None)[source]
Bases:
ProblemBase
A multiobjective optimization problem.
To be depreciated.
A multiobjective optimization problem with user defined objective functions, constraints and variables. The objectives each return a single scalar.
 Parameters:
objectives (List[ScalarObjective]) – A list containing the objectives of the problem.
variables (List[Variable]) – A list containing the variables of the problem.
constraints (List[ScalarConstraint]) – A list containing the constraints of the problem. If no constraints exist, None may be supllied as the value.
nadir (Optional[np.ndarray]) – The nadir point of the problem.
ideal (Optional[np.ndarray]) – The ideal point of the problem.
 __n_of_objectives
The number of objectives in the problem.
 Type:
int
 __n_of_variables
The number of variables in the problem.
 Type:
int
 __n_of_constraints
The number of constraints in the problem.
 Type:
int
 __nadir
The nadir point of the problem.
 Type:
np.ndarray
 __ideal
The ideal point of the problem.
 Type:
np.ndarray
 __objectives
A list containing the objectives of the problem.
 Type:
List[ScalarObjective]
 __constraints
A list conatining the constraints of the problem.
 Type:
List[ScalarConstraint]
 Raises:
ProblemError – Ill formed nadir and/or ideal vectors are supplied.
Attributes Summary
the list of constraints.
the ideal point of the problem.
the number of constraints.
the number of objectives.
the number of variables.
the nadir point of the problem.
the list of objectives.
the list of problem variables.
Methods Summary
evaluate
(decision_vectors[, use_surrogate])Evaluates the problem using an ensemble of input vectors.
Evaluate constraint values.
Get objective names.
Return the names of the objectives present in the problem in the order they were added.
Get the variable bounds.
Get variable lower bounds.
Get variable names.
Get variable upper bounds.
Attributes Documentation
 constraints
the list of constraints.
 Returns:
the list of constraints
 Return type:
List[_ScalarObjective]
 Type:
Property

ideal:
ndarray
the ideal point of the problem.
 Returns:
the ideal point of the problem.
 Return type:
np.ndarray
 Type:
Property
 n_of_constraints
the number of constraints.
 Returns:
the number of constraints.
 Return type:
int
 Type:
Property
 n_of_objectives
the number of objectives.
 Returns:
the number of objectives.
 Return type:
int
 Type:
Property
 n_of_variables
the number of variables.
 Returns:
the number of variables.
 Return type:
int
 Type:
Property

nadir:
ndarray
the nadir point of the problem.
 Returns:
the nadir point of the problem.
 Return type:
np.ndarray
 Type:
Property
 objectives
the list of objectives.
 Returns:
the list of objectives
 Return type:
List[ScalarObjective]
 Type:
Property
 variables
the list of problem variables.
 Returns:
the list of problem variables
 Return type:
List[_ScalarObjective]
 Type:
Property
Methods Documentation
 evaluate(decision_vectors, use_surrogate=False)[source]
Evaluates the problem using an ensemble of input vectors.
 Parameters:
decision_vectors (np.ndarray) – An 2D array of decision variable input vectors. Each column represent the values of each decision variable.
 Returns:
 If constraint are
defined, returns the objective vector values and corresponding constraint values. Or, if no constraints are defined, returns just the objective vector values with None as the constraint values.
 Return type:
Tuple[np.ndarray, Union[None, np.ndarray]]
 Raises:
ProblemError – The decision_vectors have wrong dimensions.
 evaluate_constraint_values()[source]
Evaluate constraint values.
Evaluate just the constraint function values using the attributes decision_vectors and objective_vectors
 Raises:
NotImplementedError –
 Return type:
Optional
[ndarray
]
Note
Currently not supported by ScalarMOProblem
 get_objective_names()[source]
Get objective names.
Return the names of the objectives present in the problem in the order they were added.
 Returns:
Names of the objectives in the order they were added.
 Return type:
List[str]
 get_uncertainty_names()[source]
Return the names of the objectives present in the problem in the order they were added.
 Returns:
Names of the objectives in the order they were added.
 Return type:
List[str]
 get_variable_bounds()[source]
Get the variable bounds.
Return the upper and lower bounds of each decision variable present in the problem as a 2D numpy array. The first column corresponds to the lower bounds of each variable, and the second column to the upper bound.
 Returns:
Lower and upper bounds of each variable as a 2D numpy array. If undefined variables, return None instead.
 Return type:
np.ndarray
 get_variable_lower_bounds()[source]
Get variable lower bounds.
Return the lower bounds of each variable as a list. The order of the bounds follows the order the variables were added to the problem.
 Returns:
An array with the lower bounds of the variables.
 Return type:
np.ndarray