pysolver_view.optimization.problems.hs71 module#
- class pysolver_view.optimization.problems.hs71.HS71Problem[source]#
Bases:
OptimizationProblemImplementation of the Hock Schittkowski problem No.71.
This class implements the following optimization problem:
\[\begin{split}\begin{align} \text{minimize} \quad & f(\mathbf{x}) = x_1x_4(x_1+x_2+x_3) + x_3 \\ \text{s.t.} \quad & x_1^2 + x_2^2 + x_3^2 + x_4^2 = 40 \\ & 25 - x_1 x_2 x_3 x_4 \le 0 \\ & 1 \le x_1, x_2, x_3, x_4 \le 5 \end{align}\end{split}\]Methods
evaluate_problem(x)`:
Compute objective, equality, and inequality constraint.
get_bounds()`:
Return variable bounds.
get_n_eq()`:
Get number of equality constraints.
get_n_ineq()`:
Get number of inequality constraints.
References
Hock and K. Schittkowski. Test examples for nonlinear programming codes. Lecture Notes in Economics and Mathematical Systems, 187, 1981. doi: 10.1007/978-3-642-48320-2.
- fitness(x)[source]#
Evaluate the objective function and constraints for given decision variables.
- Parameters:
- xarray-like
Vector of independent variables (i.e., degrees of freedom).
- Returns:
- array_like
Vector containing the objective function, equality constraints, and inequality constraints.
- get_bounds()[source]#
Get the bounds for each decision variable (Pygmo format)
- Returns:
- boundstuple of lists
A tuple of two items where the first item is the list of lower bounds and the second item of the list of upper bounds for the vector of decision variables. For example, ([-2 -1], [2, 1]) indicates that the first decision variable has bounds between -2 and 2, and the second has bounds between -1 and 1.