paref.moo_algorithms.stopping_criteria.max_iterations_reached#
Classes
|
Stopping criteria based on a maximal number of iterations |
- class paref.moo_algorithms.stopping_criteria.max_iterations_reached.MaxIterationsReached(max_iterations: int = 50)[source]#
Bases:
StoppingCriteriaStopping criteria based on a maximal number of iterations
If a defined maximum of iterations is reached, this stopping criteria is met.
Examples
Initialze stopping criteria
>>> stopping_criteria = MaxIterationsReached(max_iterations=1)
Evaluate stopping criteria - since this is the first iteration the stopping criteria is not met
>>> stopping_criteria() False
Since the max iterations (=1) are reached the stopping criteria is met
>>> stopping_criteria() True
- Parameters:
max_iterations (int) – maximum number of iterations
- __call__(blackbox_function: BlackboxFunction) bool[source]#
- Returns:
true if the maximal iterations are reached and false otherwise
- Return type:
bool