diff --git a/docs/src/modules/ROOT/images/optimization-algorithms/overview/terminationMultipleFlatLines.png b/docs/src/modules/ROOT/images/optimization-algorithms/overview/terminationMultipleFlatLines.png deleted file mode 100644 index 12213deb19..0000000000 Binary files a/docs/src/modules/ROOT/images/optimization-algorithms/overview/terminationMultipleFlatLines.png and /dev/null differ diff --git a/docs/src/modules/ROOT/images/optimization-algorithms/overview/terminationNoImprovement.png b/docs/src/modules/ROOT/images/optimization-algorithms/overview/terminationNoImprovement.png new file mode 100644 index 0000000000..c7335a9852 Binary files /dev/null and b/docs/src/modules/ROOT/images/optimization-algorithms/overview/terminationNoImprovement.png differ diff --git a/docs/src/modules/ROOT/images/optimization-algorithms/overview/terminationNoImprovement.svg b/docs/src/modules/ROOT/images/optimization-algorithms/overview/terminationNoImprovement.svg new file mode 100644 index 0000000000..8832ff4da3 --- /dev/null +++ b/docs/src/modules/ROOT/images/optimization-algorithms/overview/terminationNoImprovement.svg @@ -0,0 +1,7677 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + en + + + + + + No improvement after some time + +   +   + + + Time + + + BestScore + + + best score(score of best solution) + local optimum + + + + + + + + No improvement after 30 seconds + 70s + + 10s + 100s + + + + + diff --git a/docs/src/modules/ROOT/images/optimization-algorithms/overview/terminationNonStopCriteria.png b/docs/src/modules/ROOT/images/optimization-algorithms/overview/terminationNonStopCriteria.png new file mode 100644 index 0000000000..68ea029be3 Binary files /dev/null and b/docs/src/modules/ROOT/images/optimization-algorithms/overview/terminationNonStopCriteria.png differ diff --git a/docs/src/modules/ROOT/images/optimization-algorithms/overview/terminationNonStopCriteria.svg b/docs/src/modules/ROOT/images/optimization-algorithms/overview/terminationNonStopCriteria.svg new file mode 100644 index 0000000000..d18323d5bc --- /dev/null +++ b/docs/src/modules/ROOT/images/optimization-algorithms/overview/terminationNonStopCriteria.svg @@ -0,0 +1,7688 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + en + + + + + + Non-stop criterion + +   +   + + + Time + + + BestScore + + + best score(score of best solution) + + + + + + 70s + + 10s + 82s + + + + + + + No improvement after 12 seconds + new start point + + + diff --git a/docs/src/modules/ROOT/images/optimization-algorithms/overview/terminationSingleFlatLine.png b/docs/src/modules/ROOT/images/optimization-algorithms/overview/terminationSingleFlatLine.png deleted file mode 100644 index 6b935b7dbe..0000000000 Binary files a/docs/src/modules/ROOT/images/optimization-algorithms/overview/terminationSingleFlatLine.png and /dev/null differ diff --git a/docs/src/modules/ROOT/pages/optimization-algorithms/overview.adoc b/docs/src/modules/ROOT/pages/optimization-algorithms/overview.adoc index cb0445d15b..effdeb4b72 100644 --- a/docs/src/modules/ROOT/pages/optimization-algorithms/overview.adoc +++ b/docs/src/modules/ROOT/pages/optimization-algorithms/overview.adoc @@ -583,49 +583,44 @@ the solver improved the solution and how much time has passed without any improv Let's consider a solution process based on the following image. -image::optimization-algorithms/overview/terminationSingleFlatLine.png[align="center"] +image::optimization-algorithms/overview/terminationNoImprovement.png[align="center"] In the previous image, the unimproved time is represented by the flat red line. With the stop condition `stopFlatLineDetectionRatio` set to `0.5`, -and considering that the last best score was achieved at `10 seconds`, -the solver will terminate the process if no improvement is found within a maximum of 5 seconds. -This `5-seconds` limit is calculated -by multiplying the last improvement time (`10 seconds`) by the `stopFlatLineDetectionRatio` (`0.5`). +and considering the start point at `10 seconds`, the last best score achieved at `70 seconds`, +the solver will terminate the process if no improvement is found within a maximum of `30 seconds`. +This `30-seconds` limit is calculated +by multiplying the last improvement time (`70s - 10s = 60 seconds`) by the `stopFlatLineDetectionRatio` (`0.5`). Similarly, -setting the `stopFlatLineDetectionRatio` to `1.0` will lead to termination after `10 seconds` if there is no improvement. +setting the `stopFlatLineDetectionRatio` to `1.0` will lead to termination after `60 seconds` if there is no improvement. [NOTE] ==== The `Termination` process requires a minimum execution time, specified by `minimalExecutionTimeSeconds`. ==== -The solving process may identify points for improvement after periods of no progress -that are not significant enough to trigger the termination. -These periods are referred to as non-stop periods, which are defined by the `noStopFlatLineDetectionRatio`. +The solving process may identify no improvement periods that are not significant enough to trigger the termination. +These periods are referred to as *non-stop* periods, which are defined by the `noStopFlatLineDetectionRatio`. Let's analyze the next image: -image::optimization-algorithms/overview/terminationMultipleFlatLines.png[align="center"] +image::optimization-algorithms/overview/terminationNonStopCriteria.png[align="center"] -The orange flat line represents a non-stop period. +The orange flat line represents a *non-stop* period. By setting the `stopFlatLineDetectionRatio` to `0.5` and the `noStopFlatLineDetectionRatio` to `0.1`, -we can calculate the unimproved stop period as `8 * 0.5 = 4s`, -while the unimproved non-stop period is calculated as `8 * 0.1 = ~1s`. -The difference between the solutions found at `8 seconds` and `10 seconds` is `2 seconds`. -A flat line is accepted if the time difference between the solutions is greater -than or equal to the non-stop period and less than the stop period. - -Accepting a non-stop flat line means adjusting the start time to the last improvement time. -In the previous example, the start time will change from `0` to `8` seconds. - -As more time passes, the flat line must be longer to trigger termination. -Beginning at `0 seconds`, -the termination criterion will only be activated after `15 seconds` of no improvement: `30s * 0.5 = 15s`. -If we start counting from `8 seconds`, the time allowed for unimproved performance adjusts to `(30s - 8s) * 0.5 = 11s`. - -Evaluating the stopping criterion only from the beginning of the solving process may prevent the solver from terminating, -as the necessary period without improvement tends to increase. +we can calculate the unimproved stop period as `(70s - 10s) * 0.5 = 30s`, +while the unimproved non-stop period is calculated as `(70s - 10s) * 0.1 = 6s`. +The difference between the solutions found at `70 seconds` and `82 seconds` is `12 seconds`. +A *non-stop* period is accepted if the time difference between the last best solution and the new one is greater +than or equal to the *non-stop* period and less than the stop period. + +Accepting a *non-stop* stop period means adjusting the start time to the last improvement time. +In the previous example, the start time will change from `10` to `70` seconds. + +Evaluating the stopping criterion only at the beginning of the solver process may prevent it from terminating, +as the necessary period without improvement tends to increase over time. Adjusting the start time enables the solver -to advance its termination analysis when the solution remains unchanged for a specific duration. +to advance its termination analysis when the solution remains unchanged for a specific duration, +and terminate the solver after evaluating more recent events. [NOTE] ====