test.problem: Convenience constructor for the test.problem class.

Description Usage Arguments Value See Also Examples

View source: R/test.problem.R

Description

The method enables creating of objects of class "test.problem" for a few standard test problems.

Usage

1
test.problem(name, n.test = 100, dim, maxf, objective, lower, upper)

Arguments

name

The name of the test problem. Currently supports one of "parabola", "griewank", "rosenbrock", "rastrigin", or "ackley".

n.test

The number of tests to perform.

dim

Override the default dimension of the problem.

maxf

Override the default maximal number of function evaluations for the problem.

objective

Override the default objective for the function.

lower

Override the default lower bounds for the problem.

upper

Override the default upper bounds for the problem.

Value

An object of class "test.problem".

See Also

test.problem.

Examples

1
2
3
4
5
test.problem("rast")

test.problem("rast",dim=4,n.test=10)

test.problem("grie")

Example output

Test problem: rastrigin
Dimension: 2
Objective: 0
Max function eval.: 3000
Number of tests: 100
Test problem: rastrigin
Dimension: 4
Objective: 0
Max function eval.: 3000
Number of tests: 10
Test problem: griewank
Dimension: 2
Objective: 0.001
Max function eval.: 30000
Number of tests: 100

pso documentation built on May 29, 2017, 11:35 a.m.