R: Run Time Terminator

mlr_terminators_run_time {bbotk} | R Documentation

## Run Time Terminator

### Description

Class to terminate the optimization after the optimization process took a number of seconds on the clock.

### Dictionary

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

    mlr_terminators$get("run_time")
    trm("run_time")

### Parameters

`secs`

  `numeric(1)`
  Maximum allowed time, in seconds, default is 100.

### Super class

`bbotk::Terminator` -> `TerminatorRunTime`

### Methods

#### Public methods

- `TerminatorRunTime$new()`

- `TerminatorRunTime$is_terminated()`

- `TerminatorRunTime$clone()`

Inherited methods

- `bbotk::Terminator$format()`

- `bbotk::Terminator$print()`

- `bbotk::Terminator$remaining_time()`

- `bbotk::Terminator$status()`

#### Method `new()`

Creates a new instance of this R6 class.

##### Usage

    TerminatorRunTime$new()

#### Method `is_terminated()`

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

##### Usage

    TerminatorRunTime$is_terminated(archive)

##### Arguments

`archive`

  (Archive).

##### Returns

`logical(1)`.

#### Method `clone()`

The objects of this class are cloneable with this method.

##### Usage

    TerminatorRunTime$clone(deep = FALSE)

##### Arguments

`deep`

  Whether to make a deep clone.

### Note

This terminator only works if `archive$start_time` is set. This is usually done by the Optimizer.

### See Also

Other Terminator: `Terminator`, `mlr_terminators_clock_time`, `mlr_terminators_combo`, `mlr_terminators_evals`, `mlr_terminators_none`, `mlr_terminators_perf_reached`, `mlr_terminators_stagnation_batch`, `mlr_terminators_stagnation`, `mlr_terminators`

### Examples

    trm("run_time", secs = 1800)

[Package bbotk version 0.5.3 Index]