Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

mlr_terminators_combo

Combine Terminators


Description

This class takes multiple Terminators and terminates as soon as one or all of the included terminators are positive.

Dictionary

This Terminator can be instantiated via the dictionary mlr_terminators or with the associated sugar function trm():

mlr_terminators$get("combo")
trm("combo")

Parameters

any

logical(1)
Terminate iff any included terminator is positive? (not all), default is TRUE.

Super class

bbotk::Terminator -> TerminatorCombo

Public fields

terminators

(list())
List of objects of class Terminator.

Methods

Public methods


Method new()

Creates a new instance of this R6 class.

Usage
TerminatorCombo$new(terminators = list(TerminatorNone$new()))
Arguments
terminators

(list())
List of objects of class Terminator.


Method is_terminated()

Is TRUE iff the termination criterion is positive, and FALSE otherwise.

Usage
TerminatorCombo$is_terminated(archive)
Arguments
archive

(Archive).

Returns

logical(1).


Method print()

Printer.

Usage
TerminatorCombo$print(...)
Arguments
...

(ignored).


Method remaining_time()

Returns the remaining runtime in seconds. If any = TRUE, the remaining runtime is determined by the time-based terminator with the shortest time remaining. If non-time-based terminators are used and any = FALSE, the the remaining runtime is always Inf.

Usage
TerminatorCombo$remaining_time(archive)
Arguments
archive

(Archive).

Returns

integer(1).


Method status_long()

Returns max_steps and current_steps for each terminator.

Usage
TerminatorCombo$status_long(archive)
Arguments
archive

(Archive).

Returns

Method clone()

The objects of this class are cloneable with this method.

Usage
TerminatorCombo$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.

See Also

Examples

trm("combo",
  list(trm("clock_time", stop_time = Sys.time() + 60),
    trm("evals", n_evals = 10)), any = FALSE
)

bbotk

Black-Box Optimization Toolkit

v0.3.2
LGPL-3
Authors
Marc Becker [cre, aut] (<https://orcid.org/0000-0002-8115-0400>), Jakob Richter [aut] (<https://orcid.org/0000-0003-4481-5554>), Michel Lang [aut] (<https://orcid.org/0000-0001-9754-0393>), Bernd Bischl [aut] (<https://orcid.org/0000-0001-6002-6980>), Martin Binder [aut], Olaf Mersmann [ctb]
Initial release

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.