.. _datastruct-exit-criteria:

exit_criteria
=============

Exit criteria for libEnsemble::

    exit_criteria: [dict]:

        Optional keys (At least one must be given):

        'sim_max' [int]:
            Stop when this many new points have been evaluated by sim_f
        'gen_max' [int]:
            Stop when this many new points have been generated by gen_f
        'elapsed_wallclock_time' [float]:
            Stop when this time (since the manager has been initialized) has elapsed
        'stop_val' [(str, float)]:
            Stop when H[str] < float for the given (str, float pair)

.. seealso::
  From `test_persistent_aposmm_dfols.py`_.

  ..  literalinclude:: ../../libensemble/tests/regression_tests/test_persistent_aposmm_dfols.py
      :start-at: exit_criteria
      :end-before: end_exit_criteria_rst_tag

.. _test_persistent_aposmm_dfols.py: https://github.com/Libensemble/libensemble/blob/develop/libensemble/tests/regression_tests/test_persistent_aposmm_dfols.py
