6.2.4.1. Difference Between Stoppers and ExitConditions¶
Stoppers
and ExitConditions
are small logic checks related to the termination of an optimization.
They behave similarly but have different purposes and should not be confused.
ExitConditions |
Stoppers |
|
---|---|---|
What does it do? |
Stops the entire optimization. |
Stops one running optimizer. |
What happens once triggered? |
The job ends. |
Other optimizers are unaffected |
When is it evaluated? |
Approximately every 10 function |
This is controlled by the |
Am I required to use one? |
Yes |
No |
What is checked? |
Generally, global properties |
Generally, optimizer specific |
Easy to setup? |
Yes. Generally determined by |
Generally, trickier to setup. |
Good to know? |
None. |
By default, wont trigger for the |
6.2.4.1.1. A note on combinations¶
You may use multiple Stoppers
or ExitConditions
in a single optimization.
If there is more than one specified then by default the stop or exit will be triggered if any of them are triggered.
You can tailor exactly how to evaluate multiple Stoppers
or ExitConditions
by specifying the StopperBooleanCombination
and ExitConditionBooleanCombination
keys respectively (Optimizer Stoppers or Exit Conditions for details).
When multiple conditions are used, then are evaluated lazily:
Given
x | y
, ifx
is True theny
is not evaluated.Given
x & y
, ifx
is False theny
is not evaluated.