gemseo.algos.optimization_history module#
Optimization history.
- class OptimizationHistory(constraints, database, design_space)[source]#
Bases:
object
An optimization history.
- Parameters:
constraints (Constraints) -- The constraints of the optimization problem.
database (Database) -- The database of the optimization problem.
design_space (DesignSpace) -- The design space.
- class Solution(objective, design, is_feasible, constraints, constraint_jacobian)[source]#
Bases:
NamedTuple
A solution of the problem.
Create new instance of Solution(objective, design, is_feasible, constraints, constraint_jacobian)
- Parameters:
- check_design_point_is_feasible(x_vect)[source]#
Check if a design point is feasible and measure its constraint violation.
The constraint violation measure at a design point \(x\) is
\[\lVert\max(g(x)-\varepsilon_{\text{ineq}},0)\rVert_2^2 +\lVert|\max(|h(x)|-\varepsilon_{\text{eq}},0)\rVert_2^2\]where \(\|.\|_2\) is the Euclidean norm, \(g(x)\) is the inequality constraint vector, \(h(x)\) is the equality constraint vector, \(\varepsilon_{\text{ineq}}\) is the tolerance for the inequality constraints and \(\varepsilon_{\text{eq}}\) is the tolerance for the equality constraints.
If the design point is feasible, the constraint violation measure is 0.
- get_data_by_names(names, as_dict=True, filter_non_feasible=False)[source]#
Return the data for specific names of variables.
- Parameters:
- Returns:
The data related to the variables.
- Raises:
ValueError -- When the database is empty.
- Return type:
- property feasible_points: tuple[list[ndarray[Any, dtype[inexact[Any]]]], list[dict[str, float | list[int]]]]#
The feasible points within a given tolerance.
This tolerance is defined by
OptimizationProblem.tolerances.equality
for equality constraints andOptimizationProblem.tolerances.inequality
for inequality ones.- Raises:
ValueError -- When the database is empty.
- property last_point: Solution#
The last point.
The last point is defined by:
the value of the objective function,
the value of the design variables,
the indicator of feasibility of the last point,
the value of the constraints,
the value of the gradients of the constraints.
- Raises:
ValueError -- When the database is empty.
- property optimum: Solution#
The optimum solution within a given feasibility tolerance.
This solution is defined by:
the value of the objective function,
the value of the design variables,
the indicator of feasibility of the optimal solution,
the value of the constraints,
the value of the gradients of the constraints.
- Raises:
ValueError -- When the database is empty.