RestartEveryNFailed

class pyoptex.doe.cost_optimal.codex.restart.RestartEveryNFailed(max_it)[source]

Restarts every max_it rejected samples. This is to counter bad search regions and reset to the best previsouly found design (state).

Attributes

iint

The current number of consecutively rejected iterations.

max_itint

The maximum number of consecutively rejected iterations.

__init__(max_it)[source]

Initializes the restart function

Parameters

max_itint

The maximum number of consecutively rejected iterations.

Methods

RestartEveryNFailed.accepted()

Log an accepted iteration.

RestartEveryNFailed.call(state, best_state)

Calls the restart function.

RestartEveryNFailed.rejected()

Log a rejected iteration.

RestartEveryNFailed.reset()

Resets the restart function