variable_builder

desdeo_problem.problem.variable_builder(names, initial_values, lower_bounds=None, upper_bounds=None)[source]

Automatically build all variable objects.

Parameters:
  • names (List[str]) – Names of the variables

  • initial_values (np.ndarray) – Initial values taken by the variables.

  • lower_bounds (Union[List[float], np.ndarray], optional) – Lower bounds of the variables. If None, it defaults to negative infinity. Defaults to None.

  • upper_bounds (Union[List[float], np.ndarray], optional) – Upper bounds of the variables. If None, it defaults to positive infinity. Defaults to None.

Raises:

VariableError – Lengths of the input arrays are different.

Returns:

List of variable objects

Return type:

List[Variable]