stop_criteria module¶
Various termination criteria for drivers¶
- exception gemseo.algos.stop_criteria.DesvarIsNan[source]¶
Bases:
gemseo.algos.stop_criteria.TerminationCriterion
Stops driver when the design variables are nan.
- with_traceback()¶
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- args¶
- exception gemseo.algos.stop_criteria.FtolReached[source]¶
Bases:
gemseo.algos.stop_criteria.TerminationCriterion
Exception raised when the f_tol_rel or f_tol_abs criteria is reached by the driver.
- with_traceback()¶
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- args¶
- exception gemseo.algos.stop_criteria.FunctionIsNan[source]¶
Bases:
gemseo.algos.stop_criteria.TerminationCriterion
Stops driver when a function has NaN value or NaN Jacobian.
- with_traceback()¶
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- args¶
- exception gemseo.algos.stop_criteria.MaxIterReachedException[source]¶
Bases:
gemseo.algos.stop_criteria.TerminationCriterion
Exception raised when the maximum number of iterations is reached by the driver.
- with_traceback()¶
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- args¶
- exception gemseo.algos.stop_criteria.MaxTimeReached[source]¶
Bases:
gemseo.algos.stop_criteria.TerminationCriterion
Exception raised when the maximum execution time is reached by the driver.
- with_traceback()¶
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- args¶
- exception gemseo.algos.stop_criteria.TerminationCriterion[source]¶
Bases:
Exception
Stop driver for some reason.
- with_traceback()¶
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- args¶
- exception gemseo.algos.stop_criteria.XtolReached[source]¶
Bases:
gemseo.algos.stop_criteria.TerminationCriterion
Exception raised when the x_tol_rel or x_tol_abs criteria is reached by the driver.
- with_traceback()¶
Exception.with_traceback(tb) – set self.__traceback__ to tb and return self.
- args¶
- gemseo.algos.stop_criteria.is_f_tol_reached(opt_problem, f_tol_rel=1e-06, f_tol_abs=1e-06, n_x=2)[source]¶
Tests if the tolerance on the objective function are reached The average function value of the last n_x points are taken Then it is checked that all points are within the distance of the center with relative and absolute tolerances specified by the user.
- Parameters
opt_problem (OptimizationProblem) – the optimization problem containing the iterations
x_tol_rel (float) – relative tolerance
x_tol_abs (float) – absolute tolerance
n_x (int) –
number of design vectors to account for
By default it is set to 2.
- gemseo.algos.stop_criteria.is_x_tol_reached(opt_problem, x_tol_rel=1e-06, x_tol_abs=1e-06, n_x=2)[source]¶
Tests if the tolerance on the design variables are reached The coordinate wise average of the last n_x points are taken Then it is checked that all points are within the distance of the center with relative and absolute tolerances specified by the user.
- Parameters
opt_problem (OptimizationProblem) – the optimization problem containing the iterations
x_tol_rel (float) –
relative tolerance
By default it is set to 1e-06.
x_tol_abs (float) –
absolute tolerance
By default it is set to 1e-06.
n_x (int) –
number of design vectors to account for
By default it is set to 2.