Learn R Programming

BatchExperiments (version 1.4.3)

addProblem: Add a problem to registry.

Description

Add a algorithm to problem and stores it on disk.

Usage

addProblem(
  reg,
  id,
  static = NULL,
  dynamic = NULL,
  seed = NULL,
  overwrite = FALSE
)

Arguments

reg

[ExperimentRegistry]

Registry.

id

[character(1)] Name of problem.

static

[any] Static part of problem that never changes and is not dependent on parameters. Default is NULL.

dynamic

[function(job, static, ...)] R generator function that creates dynamic / stochastic part of problem instance, which might be dependent on parameters. First parameter job is a Job object, second is static problem part static. Further parameters from design are passed to ... argument on instance creation time. The arguments job and static may be omitted. To retrieve job informations from the job object see the documentation on ExperimentJob. Default is NULL.

seed

[integer(1)] Start seed for this problem. This allows the “synchronization” of a stochastic problem across algorithms, so that different algorithms are evaluated on the same stochastic instance. The seeding mechanism works as follows, if a problem seed is defined: (1) Before the dynamic part of a problem is instantiated, the seed of the problem + replication - 1 is set, so for the first replication the exact problem seed is used. (2) The stochastic part of the problem is instantiated (3) From now on the usual experiment seed of the registry is used, see ExperimentRegistry. If seed is set to NULL this extra problem seeding is switched off, meaning different algorithms see different stochastic versions of the same problem. Default is NULL.

overwrite

[logical(1)] Overwrite the problem file if it already exists? Default is FALSE.

Value

[character(1)]. Invisibly returns the id.

See Also

Other add: addAlgorithm(), addExperiments()